Package com.iizix.swt
Class SWTBorderLayout
java.lang.Object
org.eclipse.swt.widgets.Layout
com.iizix.swt.SWTBorderLayout
Lays out a composite, arranging and resizing its components to fit in five regions: north, south, east, west, and center.
shell.setLayout(new SWTBorderLayout()); Button buttonWest=new Button(shell,SWT.PUSH); buttonWest.setText("West"); buttonWest.setLayoutData(new BorderLayout.BorderData(SWTBorderLayout.WEST)); Button buttonEast=new Button(shell,SWT.PUSH); buttonEast.setText("East"); buttonEast.setLayoutData(new BorderLayout.BorderData(SWTBorderLayout.EAST)); Button buttonNorth=new Button(shell,SWT.PUSH); buttonNorth.setText("North"); buttonNorth.setLayoutData(new BorderLayout.BorderData(SWTBorderLayout.NORTH)); Button buttonSouth=new Button(shell,SWT.PUSH); buttonSouth.setText("South"); buttonSouth.setLayoutData(new BorderLayout.BorderData(SWTBorderLayout.SOUTH)); Text text=new Text(shell,SWT.MULTI|SWT.BORDER|SWT.V_SCROLL|SWT.H_SCROLL); text.setText("Center"); text.setLayoutData(new SWTBorderLayout.BorderData(SWTBorderLayout.CENTER));
- Author:
- Christopher Mindus
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Indicates the region that a control belongs to.Field Summary
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionprotected Point
computeSize
(Composite composite, int wHint, int hHint, boolean flushCache) protected void
Methods inherited from class org.eclipse.swt.widgets.Layout
flushCache
Field Details
NORTH
public static final int NORTH- See Also:
SOUTH
public static final int SOUTH- See Also:
CENTER
public static final int CENTER- See Also:
EAST
public static final int EAST- See Also:
WEST
public static final int WEST- See Also:
Constructor Details
SWTBorderLayout
public SWTBorderLayout()
Method Details
computeSize
- Specified by:
computeSize
in classLayout
layout