Package org.eclipse.ui.forms.widgets
Class TableWrapData
- java.lang.Object
-
- org.eclipse.ui.forms.widgets.TableWrapData
-
public final class TableWrapData extends Object
Layout data used in conjunction withTableWrapLayout. Children in a composite that uses this layout should call setLayoutData and pass an instance of this class to control physical placement in the parent.- Since:
- 3.0
- See Also:
TableWrapLayout
-
-
Field Summary
Fields Modifier and Type Field Description intalignHorizontal alignment (LEFT, CENTER, RIGHT or FILL; default is LEFT).static intBOTTOMThe control will be aligned with the bottom of the cell.static intCENTERThe control will be centered horizontally unless it has the SWT.WRAP flag set or it is aCompositewith a layout that implementsILayoutExtension, in which case it will haveFILLalignment.intcolspanNumber of columns to span (default is 1).static intFILLThe control will have the same width as the column it occupies.static intFILL_GRABIn addition to filling width or height, the control will take part in allocation of any excess space.booleangrabHorizontalIftrue, take part in excess horizontal space distribution.booleangrabVerticalIftrue, will grab any excess vertical space (default isfalse).intheightHintHeight hint of the control (default is SWT.DEFAULT).intindentHorizontal indent (default is 0).static intLEFTThe control will be left-justified unless it has the SWT.WRAP flag set or it is aCompositewith a layout that implementsILayoutExtension, in which case it will haveFILLalignment.intmaxHeightMaximum height of the control (default is SWT.DEFAULT).intmaxWidthMaximum width of the control (default is SWT.DEFAULT).static intMIDDLEThe control will be centered vertically.static intRIGHTThe control will be right-justified unless it has the SWT.WRAP flag set or it is aCompositewith a layout that implementsILayoutExtension, in which case it will haveFILLalignment.introwspanNumber of rows to span (default is 1).static intTOPThe control will be aligned with the top of the cell.intvalignVertical alignment (TOP, MIDDLE, BOTTOM or FILL; default is TOP).
-
Constructor Summary
Constructors Constructor Description TableWrapData()The default constructor.TableWrapData(int align)The convenience constructor - allows passing the horizontal alignment style.TableWrapData(int align, int valign)The convenience constructor - allows passing the alignment styles.TableWrapData(int align, int valign, int rowspan, int colspan)The convenience constructor - allows passing the alignment styles, column and row spans.
-
-
-
Field Detail
-
LEFT
public static final int LEFT
The control will be left-justified unless it has the SWT.WRAP flag set or it is aCompositewith a layout that implementsILayoutExtension, in which case it will haveFILLalignment.- See Also:
- Constant Field Values
-
CENTER
public static final int CENTER
The control will be centered horizontally unless it has the SWT.WRAP flag set or it is aCompositewith a layout that implementsILayoutExtension, in which case it will haveFILLalignment.- See Also:
- Constant Field Values
-
RIGHT
public static final int RIGHT
The control will be right-justified unless it has the SWT.WRAP flag set or it is aCompositewith a layout that implementsILayoutExtension, in which case it will haveFILLalignment.- See Also:
- Constant Field Values
-
TOP
public static final int TOP
The control will be aligned with the top of the cell.- See Also:
- Constant Field Values
-
MIDDLE
public static final int MIDDLE
The control will be centered vertically.- See Also:
- Constant Field Values
-
BOTTOM
public static final int BOTTOM
The control will be aligned with the bottom of the cell.- See Also:
- Constant Field Values
-
FILL
public static final int FILL
The control will have the same width as the column it occupies.- See Also:
- Constant Field Values
-
FILL_GRAB
public static final int FILL_GRAB
In addition to filling width or height, the control will take part in allocation of any excess space. Note that this constant can only be passed to the constructor (cannot be directly assigned toalignvariable).- See Also:
- Constant Field Values
-
colspan
public int colspan
Number of columns to span (default is 1).
-
rowspan
public int rowspan
Number of rows to span (default is 1).
-
align
public int align
Horizontal alignment (LEFT, CENTER, RIGHT or FILL; default is LEFT).
-
valign
public int valign
Vertical alignment (TOP, MIDDLE, BOTTOM or FILL; default is TOP).
-
indent
public int indent
Horizontal indent (default is 0).
-
maxWidth
public int maxWidth
Maximum width of the control (default is SWT.DEFAULT).
-
maxHeight
public int maxHeight
Maximum height of the control (default is SWT.DEFAULT).
-
heightHint
public int heightHint
Height hint of the control (default is SWT.DEFAULT).
-
grabHorizontal
public boolean grabHorizontal
Iftrue, take part in excess horizontal space distribution. (default isfalse).
-
grabVertical
public boolean grabVertical
Iftrue, will grab any excess vertical space (default isfalse). Note that since TableWrapLayout works top-down and does not grows to fill the parent, this only applies to local excess space created by fixed-height children that span multiple rows.
-
-
Constructor Detail
-
TableWrapData
public TableWrapData()
The default constructor.
-
TableWrapData
public TableWrapData(int align)
The convenience constructor - allows passing the horizontal alignment style.- Parameters:
align- horizontal alignment (LEFT, CENTER, RIGHT, FILL or FILL_GRAB).
-
TableWrapData
public TableWrapData(int align, int valign)The convenience constructor - allows passing the alignment styles.- Parameters:
align- horizontal alignment (LEFT, CENTER, RIGHT, FILL or FILL_GRAB).valign- vertical alignment (TOP, MIDDLE, BOTTOM, FILL or FILL_GRAB).
-
TableWrapData
public TableWrapData(int align, int valign, int rowspan, int colspan)The convenience constructor - allows passing the alignment styles, column and row spans.- Parameters:
align- horizontal alignment (LEFT, CENTER, RIGHT, FILL or FILL_GRAB).valign- vertical alignment (TOP, MIDDLE, BOTTOM, FILL or FILL_GRAB)rowspan- row span (1 or more)colspan- column span (1 or more)
-
-