jruby/docs BETA
org.eclipse.swt.layout 11
C BorderData
C BorderLayout
C FillLayout
C FormAttachment
C FormData
C FormLayout
C GridData
C GridLayout
C RowData
C RowLayout
C TabFolderLayout
BorderLayout — members 9
F type() int
F marginWidth() int
F marginHeight() int
F spacing() int
F controlSpacing() int
F widthDistributionFactor() double
F heightDistributionFactor() double
C new()
M to_string() String

org.eclipse.swt.layout.BorderLayout

class extends Layout 9 members

BorderLayout places controls in five regions

+--------------------------------+
|       NORTH / TOP              |
+---+------------------------+---+
|   |                        |   |
| W |                        | E |
| E |                        | A |
| S |                        | S |
| T |                        | T |
| / |                        | / |
| L |       CENTER           | R |
| E |                        | I |
| F |                        | G |
| T |                        | H |
|   |                        | T |
|   |                        |   |
+---+------------------------+---+
|       SOUTH / BOTTOM           |
+--------------------------------+
The controls at the NORTH/SOUTH borders get their preferred heights, the controls at the EAST/WEST get their preferred widths and the center region grow/shrink according to the remaining space. If more than one control is placed inside a region the controls are equally distributed across their axis where the grow (CENTER controlled by the BorderLayout#type value)

Fields

fieldtypenote
type int type specifies how controls will be positioned within the center region. The default value is SWT#HORIZONTAL. Possible values are:
  • SWT#HORIZONTAL: Position the controls horizontally from left to right
  • SWT#VERTICAL: Position the controls vertically from top to bottom
marginWidth int marginWidth specifies the number of points of horizontal margin that will be placed along the left and right edges of the layout. The default value is 0.
marginHeight int marginHeight specifies the number of points of vertical margin that will be placed along the top and bottom edges of the layout. The default value is 0.
spacing int spacing specifies the number of points between the edge of one region and its neighboring regions. The default value is 0.
controlSpacing int controlSpacing specifies the number of points between the edge of one control and its neighboring control inside a region. The default value is 0.
widthDistributionFactor double If the width of the SWT#LEFT and SWT#RIGHT region exceeds the available space this factor is used to distribute the size to the controls, valid values range between [0 ... 1] The default value is 0.5 (equal distribution of available space)
heightDistributionFactor double If the height of the SWT#TOP and SWT#BOTTOM region exceeds the available space this factor is used to distribute the size to the controls, valid values range between [0 ... 1] The default value is 0.5 (equal distribution of available space)

Constructors

new

new ( )
Java: <init>()

Instance Methods

to_string

String to_string ( )
Java: toString()