- All Implemented Interfaces:
Externalizable,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CCSame functionality asgetHorizontal().setAlign(ConstraintParser.parseUnitValue(unitValue, true))only this method returnsthisfor chaining multiple calls.final CCSame functionality asgetVertical().setAlign(ConstraintParser.parseUnitValue(unitValue, true))only this method returnsthisfor chaining multiple calls.final CCcell(int... colRowWidthHeight) Set the cell(s) that the component should occupy in the grid.final CCdockEast()Same functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 3)thisfor chaining multiple calls.final CCSame functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 0)thisfor chaining multiple calls.final CCSame functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 2)thisfor chaining multiple calls.final CCdockWest()Same functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 1)thisfor chaining multiple calls.final CCThe end group(s) that this componet should be placed in.final CCSpecifies that the component should be put in the end groupsand will thus share the same ending coordinate as them within the group.final CCThe end group that this componet should be placed in.final CCexternal()Same functionality as} only this method returnsinvalid @link
{@link #setExternal(boolean true)thisfor chaining multiple calls.final CCflowX()Same functionality assetFlowX(Boolean.TRUE)only this method returnsthisfor chaining multiple calls.final CCflowY()Same functionality assetFlowX(Boolean.FALSE)only this method returnsthisfor chaining multiple calls.final CCCorresponds exactly to the "gap left right top bottom" keyword.final CCSets the horizontal gap before the component.final CCSets the horizontal gap before the component.final CCSets the gap above the component.final CCSets the gap above the component.final CCSets the gap above the component.final CCSets the gap above the component.final CCThe horizontal gap before and/or after the component.final CCThe vertical gap before (normally above) and/or after (normally below) the component.intgetCellX()Returns the absolute cell position in the grid or-1if cell positioning is not used.intgetCellY()Returns the absolute cell position in the grid or-1if cell positioning is not used.getDimConstraint(boolean isHor) Returns the vertical or horizontal dim constraint.intSets the docking side. -1 means no docking.
Valid sides are:north = 0, west = 1, south = 2, east = 3.getFlowX()Returns if the flow in the cell is in the horizontal dimension.intSets how a component that is hidden (not visible) should be treated by default.Returns the horizontal dimension constraint for this component constraint.getId()Returns the id used to reference this component in some constraints.Returns the newline size if it is a custom size.Returns the absolute resizing in the last stage of the layout cycle.getPos()Returns the absolute positioning of one or more of the edges.getPushX()"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing.getPushY()"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing.intgetSkip()Returns how many cells in the grid that should be skipped before the component that this constraint belongs to.intgetSpanX()Returns the number of cells the cell that this constraint's component will span in the indicated dimension.intgetSpanY()Returns the number of cells the cell that this constraint's component will span in the indicated dimension.intgetSplit()Returns in how many parts the current cell (that this constraint's component will be in) should be split in.getTag()Tags the component with metadata.Returns the vertical dimension constraint for this component constraint.Returns the wrap size if it is a custom size.final CCgrow()final CCgrow(float... widthHeight) grow weight for the component horizontally and optionally vertically.final CCgrowPrio(int... widthHeight) Grow priority for the component horizontally and optionally vertically.final CCgrowPrioX(int p) The grow priority compared to other components in the same cell.final CCgrowPrioY(int p) The grow priority compared to other components in the same cell.final CCgrowX()Grow weight for the component horizontally.final CCgrowX(float w) Grow weight for the component horizontally.final CCgrowY()Grow weight for the component vertically.final CCGrow weight for the component vertically.final CCThe size for the component as a min and/or preferref and/or maximum size.final CChideMode(int mode) How this component, if hidden (not visible), should be treated.final CCThe id used to reference this component in some constraints.booleanReturns if the absoluteposvalue should be corrections to the component that is in a normal cell.booleanReturns if this component should have its bounds handled by an external source and not this layout manager.booleanReturns if the flow should wrap to the next line/column before the component that this constraint belongs to.booleanisWrap()Returns if the flow should wrap to the next line/column after the component that this constraint belongs to.final CCThe maximum size for the component.final CCThe maximum size for the component.final CCThe minimum size for the component.final CCThe minimum size for the component.final CCnewline()Same functionality as} only this method returnsinvalid @link
{@link #setNewline(boolean true)thisfor chaining multiple calls.final CCSame functionality assetNewlineGapSize(BoundSize)only this method returnsthisfor chaining multiple calls.final CCpad(int top, int left, int bottom, int right) Same functionality assetPadding(UnitValue[])but the unit values as absolute pixels.final CCSame functionality assetPadding(ConstraintParser.parseInsets(pad, false))}only this method returnsthisfor chaining multiple calls.final CCSame functionality asx(String x)andy(String y)toghether.final CCfinal CCpush()Same functionality aspushX().pushY()which means this cell will push in both x and y dimensions.final CCSame functionality aspushX(weightX).pushY(weightY)which means this cell will push in both x and y dimensions.final CCpushX()Same functionality assetPushX(Float)which means this cell will push the rest of the row.final CCSame functionality assetPushX(Float weight)only this method returnsthisfor chaining multiple calls.final CCpushY()Same functionality as} which means this cell will push the rest of the column.invalid @link
{@link #setPushY(Float))final CCSame functionality assetPushY(Float weight)only this method returnsthisfor chaining multiple calls.voidvoidsetCellX(int x) Set an absolute cell x-position in the grid.voidsetCellY(int y) Set an absolute cell x-position in the grid.voidsetDockSide(int side) Sets the docking side. -1 means no docking.
Valid sides are:north = 0, west = 1, south = 2, east = 3.voidsetExternal(boolean b) If this boolean is true this component is not handled in any way by the layout manager and the component can have its bounds set by an external handler which is normally by the use of somecomponent.setBounds(x, y, width, height)directly (for Swing).voidSets if the flow in the cell is in the horizontal dimension.voidsetHideMode(int mode) Sets how a component that is hidden (not visible) should be treated by default.voidSets the horizontal dimension constraint for this component constraint.voidSets the id used to reference this component in some constraints.voidsetNewline(boolean b) Sets if the flow should wrap to the next line/column before the component that this constraint belongs to.voidSet the newline size and turns newline on if!voidsetPadding(UnitValue[] sides) Sets the absolute resizing in the last stage of the layout cycle.voidSets absolute positioning of one or more of the edges.void"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing.void"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing.voidsetSkip(int cells) Sets how many cells in the grid that should be skipped before the component that this constraint belongs to.voidsetSpanX(int cells) Sets the number of cells the cell that this constraint's component will span in the indicated dimension.voidsetSpanY(int cells) Sets the number of cells the cell that this constraint's component will span in the indicated dimension.voidsetSplit(int parts) Sets in how many parts the current cell (that this constraint's component will be in) should be split in.voidOptinal tag that gives more context to this constraint's component.voidSets the vertical dimension constraint for this component constraint.voidsetWrap(boolean b) Sets if the flow should wrap to the next line/column after the component that this constraint belongs to.voidSet the wrap size and turns wrap on if!final CCshrink(float... widthHeight) Shrink weight for the component horizontally and optionally vertically.final CCshrinkPrio(int... widthHeight) Shrink priority for the component horizontally and optionally vertically.final CCshrinkPrioX(int p) The shrink priority compared to other components in the same cell.final CCshrinkPrioY(int p) The shrink priority compared to other components in the same cell.final CCshrinkX(float w) Shrink weight for the component horizontally.final CCshrinkY(float w) Shrink weight for the component horizontally.final CCThe size group(s) that this componet should be placed in.final CCsizeGroupX(String s) Specifies that the component should be put in the size groupsand will thus share the same size as them within the group.final CCsizeGroupY(String s) The size group that this componet should be placed in.final CCskip()Same functionality as skip(1).final CCskip(int cells) Same functionality assetSkip(int)only this method returnsthisfor chaining multiple calls.final CCspan(int... cells) Same functionality asspanX(cellsX).spanY(cellsY)which means this cell will span cells in both x and y.final CCspanX()Same functionality as} which means this cell will span the rest of the row.invalid @link
{@link #setSpanX(int LayoutUtil.INF)final CCspanX(int cells) Same functionality assetSpanX(int cells)only this method returnsthisfor chaining multiple calls.final CCspanY()Same functionality as} which means this cell will span the rest of the column.invalid @link
{@link #setSpanY(int LayoutUtil.INF)final CCspanY(int cells) Same functionality assetSpanY(int cells)only this method returnsthisfor chaining multiple calls.final CCsplit()Same functionality as split(LayoutUtil.INF), which means split until one of the keywords that breaks the split is found for a component after this one (e.g. wrap, newline and skip).final CCsplit(int parts) Same functionality assetSplit(int parts)only this method returnsthisfor chaining multiple calls.final CCSame functionality assetTag(String tag)only this method returnsthisfor chaining multiple calls.final CCThe size for the component as a min and/or preferref and/or maximum size.final CCwrap()Same functionality as} only this method returnsinvalid @link
{@link #setWrap(boolean true)thisfor chaining multiple calls.final CCSame functionality assetWrapGapSize(BoundSize)only this method returnsthisfor chaining multiple calls.voidfinal CCSets the x-coordinate for the component.final CCSets the x2-coordinate for the component (right side).final CCSets the y-coordinate for the component.final CCSets the y2-coordinate for the component (bottom side).
-
Constructor Details
-
CC
public CC()Empty constructor.
-
-
Method Details
-
endGroupX
Specifies that the component should be put in the end groupsand will thus share the same ending coordinate as them within the group.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
s- A name to associate on the group that should be the same for other rows/columns in the same group.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
sizeGroupX
Specifies that the component should be put in the size groupsand will thus share the same size as them within the group.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
s- A name to associate on the group that should be the same for other rows/columns in the same group.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
minWidth
The minimum size for the component. The value will override any value that is set on the component itself.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
size- The size expressed as aUnitValue. E.g. "100px" or "200mm".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
width
The size for the component as a min and/or preferref and/or maximum size. The value will override any value that is set on the component itself.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
size- The size expressed as aBoundSize. E.g. "50:100px:200mm" or "100px".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
maxWidth
The maximum size for the component. The value will override any value that is set on the component itself.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
size- The size expressed as aUnitValue. E.g. "100px" or "200mm".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
gapX
The horizontal gap before and/or after the component. The gap is towards cell bounds and/or other component bounds.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
before- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".after- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
alignX
Same functionality asgetHorizontal().setAlign(ConstraintParser.parseUnitValue(unitValue, true))only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
align- The align keyword or for instance "100px". E.g "left", "right", "leading" or "trailing".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
growPrioX
The grow priority compared to other components in the same cell.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
p- The grow priority.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
growPrio
Grow priority for the component horizontally and optionally vertically.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
widthHeight- The new shrink weight and height. 1-2 arguments, never null.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
growX
Grow weight for the component horizontally. It default to weight100.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
growX
Grow weight for the component horizontally.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
w- The new grow weight.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
grow
grow weight for the component horizontally and optionally vertically.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
widthHeight- The new shrink weight and height. 1-2 arguments, never null.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
shrinkPrioX
The shrink priority compared to other components in the same cell.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
p- The shrink priority.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
shrinkPrio
Shrink priority for the component horizontally and optionally vertically.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
widthHeight- The new shrink weight and height. 1-2 arguments, never null.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
shrinkX
Shrink weight for the component horizontally.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
w- The new shrink weight.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
shrink
Shrink weight for the component horizontally and optionally vertically.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
widthHeight- The new shrink weight and height. 1-2 arguments, never null.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
endGroupY
The end group that this componet should be placed in.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
s- The name of the group. Ifnullthat means no group (default)- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
endGroup
The end group(s) that this componet should be placed in.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
xy- The end group for x and y repsectively. 1-2 arguments, not null.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
sizeGroupY
The size group that this componet should be placed in.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
s- The name of the group. Ifnullthat means no group (default)- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
sizeGroup
The size group(s) that this componet should be placed in.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
xy- The size group for x and y repsectively. 1-2 arguments, not null.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
minHeight
The minimum size for the component. The value will override any value that is set on the component itself.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
size- The size expressed as aUnitValue. E.g. "100px" or "200mm".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
height
The size for the component as a min and/or preferref and/or maximum size. The value will override any value that is set on the component itself.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
size- The size expressed as aBoundSize. E.g. "50:100px:200mm" or "100px".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
maxHeight
The maximum size for the component. The value will override any value that is set on the component itself.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
size- The size expressed as aUnitValue. E.g. "100px" or "200mm".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
gapY
The vertical gap before (normally above) and/or after (normally below) the component. The gap is towards cell bounds and/or other component bounds.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
before- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".after- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
alignY
Same functionality asgetVertical().setAlign(ConstraintParser.parseUnitValue(unitValue, true))only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
align- The align keyword or for instance "100px". E.g "top" or "bottom".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
growPrioY
The grow priority compared to other components in the same cell.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
p- The grow priority.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
growY
Grow weight for the component vertically. Defaults to100.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
growY
Grow weight for the component vertically.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
w- The new grow weight.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
shrinkPrioY
The shrink priority compared to other components in the same cell.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
p- The shrink priority.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
shrinkY
Shrink weight for the component horizontally.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
w- The new shrink weight.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
hideMode
How this component, if hidden (not visible), should be treated.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
mode- The mode. Default to the mode in theLC. 0 == Normal. Bounds will be calculated as if the component was visible.
1 == If hidden the size will be 0, 0 but the gaps remain.
2 == If hidden the size will be 0, 0 and gaps set to zero.
3 == If hidden the component will be disregarded completely and not take up a cell in the grid..- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
id
The id used to reference this component in some constraints.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
s- The id ornull. May consist of a groupID and an componentID which are separated by a dot: ".". E.g. "grp1.id1". The dot should never be first or last if present.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().
-
tag
Same functionality assetTag(String tag)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
tag- The new tag. May benull.- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
cell
Set the cell(s) that the component should occupy in the grid. Same functionality assetCellX(int col)andsetCellY(int row)together withsetSpanX(int width)andsetSpanY(int height). This method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
colRowWidthHeight- cellX, cellY, spanX, spanY repectively. 1-4 arguments, not null.- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2. Replacing cell(int, int) and cell(int, int, int, int)
- See Also:
-
span
Same functionality asspanX(cellsX).spanY(cellsY)which means this cell will span cells in both x and y. This method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com. Since 3.7.2 this takes an array/vararg whereas it previously only took two specific values, xSpan and ySpan.
- Parameters:
cells- spanX and spanY, when present, and in that order.- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2 Replaces span(int, int).
- See Also:
-
gap
Corresponds exactly to the "gap left right top bottom" keyword.- Parameters:
args- Same as for the "gap" keyword. Length 1-4, never null buf elements can be null.- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
gapBefore
Sets the horizontal gap before the component.Note! This is currently same as gapLeft(). This might change in 4.x.
- Parameters:
boundsSize- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
gapAfter
Sets the horizontal gap before the component.Note! This is currently same as gapLeft(). This might change in 4.x.
- Parameters:
boundsSize- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
gapTop
Sets the gap above the component.- Parameters:
boundsSize- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
gapLeft
Sets the gap above the component.- Parameters:
boundsSize- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
gapBottom
Sets the gap above the component.- Parameters:
boundsSize- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
gapRight
Sets the gap above the component.- Parameters:
boundsSize- The size of the gap expressed as aBoundSize. E.g. "50:100px:200mm" or "100px!".- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- Since:
- 3.7.2
-
spanY
Same functionality as} which means this cell will span the rest of the column. This method returnsinvalid @link
{@link #setSpanY(int LayoutUtil.INF)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
spanY
Same functionality assetSpanY(int cells)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
cells- The number of cells to span (i.e. merge).- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
spanX
Same functionality as} which means this cell will span the rest of the row. This method returnsinvalid @link
{@link #setSpanX(int LayoutUtil.INF)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
spanX
Same functionality assetSpanX(int cells)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
cells- The number of cells to span (i.e. merge).- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
push
Same functionality aspushX().pushY()which means this cell will push in both x and y dimensions. This method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
push
Same functionality aspushX(weightX).pushY(weightY)which means this cell will push in both x and y dimensions. This method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
weightX- The weight used in the push.weightY- The weight used in the push.- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
pushY
Same functionality as} which means this cell will push the rest of the column. This method returnsinvalid @link
{@link #setPushY(Float))thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
pushY
Same functionality assetPushY(Float weight)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
weight- The weight used in the push.- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
pushX
Same functionality assetPushX(Float)which means this cell will push the rest of the row. This method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
pushX
Same functionality assetPushX(Float weight)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
weight- The weight used in the push.- Returns:
thisso it is possible to chain calls. E.g.new LayoutConstraint().noGrid().gap().fill().- See Also:
-
split
Same functionality assetSplit(int parts)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
parts- The number of parts (i.e. component slots) the cell should be divided into.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
split
Same functionality as split(LayoutUtil.INF), which means split until one of the keywords that breaks the split is found for a component after this one (e.g. wrap, newline and skip).For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
- See Also:
-
skip
Same functionality assetSkip(int)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
cells- How many cells in the grid that should be skipped before the component that this constraint belongs to- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
skip
Same functionality as skip(1).For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- Since:
- 3.7.2
- See Also:
-
external
Same functionality as} only this method returnsinvalid @link
{@link #setExternal(boolean true)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
flowX
Same functionality assetFlowX(Boolean.TRUE)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
flowY
Same functionality assetFlowX(Boolean.FALSE)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
grow
Same functionality asgrowX()andgrowY().For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
newline
Same functionality as} only this method returnsinvalid @link
{@link #setNewline(boolean true)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
newline
Same functionality assetNewlineGapSize(BoundSize)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
gapSize- The gap size that will override the gap size in the row/colum constraints if!= null. E.g. "5px" or "unrel". Ifnullor""the newline size will be set to the default size and turned on. This is different compared tosetNewlineGapSize(BoundSize).- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
wrap
Same functionality as} only this method returnsinvalid @link
{@link #setWrap(boolean true)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
wrap
Same functionality assetWrapGapSize(BoundSize)only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
gapSize- The gap size that will override the gap size in the row/colum constraints if!= null. E.g. "5px" or "unrel". Ifnullor""the wrap size will be set to the default size and turned on. This is different compared tosetWrapGapSize(BoundSize).- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
dockNorth
Same functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 0)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
dockWest
Same functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 1)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
dockSouth
Same functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 2)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
dockEast
Same functionality as} only this method returnsinvalid @link
{@link #setDockSide(int 3)thisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
x
Sets the x-coordinate for the component. This is used to set the x coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the x position.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
x- The x position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
y
Sets the y-coordinate for the component. This is used to set the y coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the y position.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
y- The y position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
x2
Sets the x2-coordinate for the component (right side). This is used to set the x2 coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the x position.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
x2- The x2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
y2
Sets the y2-coordinate for the component (bottom side). This is used to set the y2 coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the y position.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
y2- The y2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
pos
Same functionality asx(String x)andy(String y)toghether.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
x- The x position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".y- The y position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
pos
Same functionality asx(String x),y(String y),y2(String y)andy2(String y)toghether.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
x- The x position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".y- The y position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".x2- The x2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".y2- The y2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
pad
Same functionality assetPadding(UnitValue[])but the unit values as absolute pixels. This method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
top- The top padding that will be added to the y coordinate at the last stage in the layout.left- The top padding that will be added to the x coordinate at the last stage in the layout.bottom- The top padding that will be added to the y2 coordinate at the last stage in the layout.right- The top padding that will be added to the x2 coordinate at the last stage in the layout.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
pad
Same functionality assetPadding(ConstraintParser.parseInsets(pad, false))}only this method returnsthisfor chaining multiple calls.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
pad- The string to parse. E.g. "10 10 10 10" or "20". If less than 4 groups the last will be used for the missing.- Returns:
thisso it is possible to chain calls. E.g.new ComponentConstraint().noGrid().gap().fill().- See Also:
-
getHorizontal
Returns the horizontal dimension constraint for this component constraint. It has constraints for the horizontal size and grow/shink priorities and weights.Note! If any changes is to be made it must be made direct when the object is returned. It is not allowed to save the constraint for later use.
- Returns:
- The current dimension constraint. Never
null.
-
setHorizontal
Sets the horizontal dimension constraint for this component constraint. It has constraints for the horizontal size and grow/shink priorities and weights.- Parameters:
h- The new dimension constraint. Ifnullit will be reset tonew DimConstraint();
-
getVertical
Returns the vertical dimension constraint for this component constraint. It has constraints for the vertical size and grow/shink priorities and weights.Note! If any changes is to be made it must be made direct when the object is returned. It is not allowed to save the constraint for later use.
- Returns:
- The current dimension constraint. Never
null.
-
setVertical
Sets the vertical dimension constraint for this component constraint. It has constraints for the vertical size and grow/shink priorities and weights.- Parameters:
v- The new dimension constraint. Ifnullit will be reset tonew DimConstraint();
-
getDimConstraint
Returns the vertical or horizontal dim constraint.Note! If any changes is to be made it must be made direct when the object is returned. It is not allowed to save the constraint for later use.
- Parameters:
isHor- If the horizontal constraint should be returned.- Returns:
- The dim constraint. Never
null.
-
getPos
Returns the absolute positioning of one or more of the edges. This will be applied last in the layout cycle and will not affect the flow or grid positions. The positioning is relative to the parent and can not (as padding) be used to adjust the edges relative to the old value. May benulland elements may benull.nullvalue(s) for the x2 and y2 will be interpreted as to keep the preferred size and thus the x1 and x2 will just absolutely positions the component.Note that
setBoundsInGrid(boolean)changes the interpretation of thisproperty slightly.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value as a new array, free to modify.
-
setPos
Sets absolute positioning of one or more of the edges. This will be applied last in the layout cycle and will not affect the flow or grid positions. The positioning is relative to the parent and can not (as padding) be used to adjust the edges relative to the old value. May benulland elements may benull.nullvalue(s) for the x2 and y2 will be interpreted as to keep the preferred size and thus the x1 and x2 will just absolutely positions the component.Note that
setBoundsInGrid(boolean)changes the interpretation of thisproperty slightly.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
pos-UnitValue[] {x, y, x2, y2}. Must benullor of length 4. Elements can benull.
-
isBoundsInGrid
public boolean isBoundsInGrid()Returns if the absoluteposvalue should be corrections to the component that is in a normal cell. Iffalsethe value ofposis truly absolute in that it will not affect the grid or have a default bounds in the grid.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
- See Also:
-
getCellX
public int getCellX()Returns the absolute cell position in the grid or-1if cell positioning is not used.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setCellX
public void setCellX(int x) Set an absolute cell x-position in the grid. If >= 0 this point points to the absolute cell that this constaint's component should occupy. If there's already a component in that cell they will split the cell. The flow will then continue after this cell.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
x- The x-position or-1to disable cell positioning.
-
getCellY
public int getCellY()Returns the absolute cell position in the grid or-1if cell positioning is not used.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setCellY
public void setCellY(int y) Set an absolute cell x-position in the grid. If >= 0 this point points to the absolute cell that this constaint's component should occupy. If there's already a component in that cell they will split the cell. The flow will then continue after this cell.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
y- The y-position or-1to disable cell positioning.
-
getDockSide
public int getDockSide()Sets the docking side. -1 means no docking.
Valid sides are:north = 0, west = 1, south = 2, east = 3.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current side.
-
setDockSide
public void setDockSide(int side) Sets the docking side. -1 means no docking.
Valid sides are:north = 0, west = 1, south = 2, east = 3.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
side- -1 or 0-3.
-
isExternal
public boolean isExternal()Returns if this component should have its bounds handled by an external source and not this layout manager.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setExternal
public void setExternal(boolean b) If this boolean is true this component is not handled in any way by the layout manager and the component can have its bounds set by an external handler which is normally by the use of somecomponent.setBounds(x, y, width, height)directly (for Swing).The bounds will not affect the minimum and preferred size of the container.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
b-truemeans that the bounds are not changed.
-
getFlowX
Returns if the flow in the cell is in the horizontal dimension. Vertical iffalse. Only the first component is a cell can set the flow.If
nullthe flow direction is inherited by from theLC.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setFlowX
Sets if the flow in the cell is in the horizontal dimension. Vertical iffalse. Only the first component is a cell can set the flow.If
nullthe flow direction is inherited by from theLC.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
b-Boolean.TRUEmeans horizontal flow in the cell.
-
getHideMode
public int getHideMode()Sets how a component that is hidden (not visible) should be treated by default. For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.- Returns:
- The mode:
0 == Normal. Bounds will be calculated as if the component was visible.
1 == If hidden the size will be 0, 0 but the gaps remain.
2 == If hidden the size will be 0, 0 and gaps set to zero.
3 == If hidden the component will be disregarded completely and not take up a cell in the grid..
-
setHideMode
public void setHideMode(int mode) Sets how a component that is hidden (not visible) should be treated by default.- Parameters:
mode- The mode:
0 == Normal. Bounds will be calculated as if the component was visible.
1 == If hidden the size will be 0, 0 but the gaps remain.
2 == If hidden the size will be 0, 0 and gaps set to zero.
3 == If hidden the component will be disregarded completely and not take up a cell in the grid..
-
getId
Returns the id used to reference this component in some constraints.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The id or
null. May consist of a groupID and an componentID which are separated by a dot: ".". E.g. "grp1.id1". The dot should never be first or last if present.
-
setId
Sets the id used to reference this component in some constraints.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
id- The id ornull. May consist of a groupID and an componentID which are separated by a dot: ".". E.g. "grp1.id1". The dot should never be first or last if present.
-
getPadding
Returns the absolute resizing in the last stage of the layout cycle. May benulland elements may benull.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
nullor of length 4.
-
setPadding
Sets the absolute resizing in the last stage of the layout cycle. These values are added to the edges and can thus for instance be used to grow or reduce the size or move the component an absolute number of pixels. May benulland elements may benull.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
sides- top, left, bottom right. Must benullor of length 4.
-
getSkip
public int getSkip()Returns how many cells in the grid that should be skipped before the component that this constraint belongs to.Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value. 0 if no skip.
-
setSkip
public void setSkip(int cells) Sets how many cells in the grid that should be skipped before the component that this constraint belongs to.Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
cells- How many cells in the grid that should be skipped before the component that this constraint belongs to
-
getSpanX
public int getSpanX()Returns the number of cells the cell that this constraint's component will span in the indicated dimension.1is default and means that it only spans the current cell.LayoutUtil.INFis used to indicate a span to the end of the column/row.Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setSpanX
public void setSpanX(int cells) Sets the number of cells the cell that this constraint's component will span in the indicated dimension.1is default and means that it only spans the current cell.LayoutUtil.INFis used to indicate a span to the end of the column/row.Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
cells- The number of cells to span (i.e. merge).
-
getSpanY
public int getSpanY()Returns the number of cells the cell that this constraint's component will span in the indicated dimension.1is default and means that it only spans the current cell.LayoutUtil.INFis used to indicate a span to the end of the column/row.Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setSpanY
public void setSpanY(int cells) Sets the number of cells the cell that this constraint's component will span in the indicated dimension.1is default and means that it only spans the current cell.LayoutUtil.INFis used to indicate a span to the end of the column/row.Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
cells- The number of cells to span (i.e. merge).
-
getPushX
"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing. If any other column has been set to grow this push value on the component does nothing as the column's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.If multiple components in a column has push weights set the largest one will be used for the column.
- Returns:
- The current push value. Default is
null.
-
setPushX
"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing. If any other column has been set to grow this push value on the component does nothing as the column's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.If multiple components in a column has push weights set the largest one will be used for the column.
- Parameters:
weight- The new push value. Default isnull.
-
getPushY
"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing. If any other row has been set to grow this push value on the component does nothing as the row's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.If multiple components in a row has push weights set the largest one will be used for the row.
- Returns:
- The current push value. Default is
null.
-
setPushY
"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing. If any other row has been set to grow this push value on the component does nothing as the row's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.If multiple components in a row has push weights set the largest one will be used for the row.
- Parameters:
weight- The new push value. Default isnull.
-
getSplit
public int getSplit()Returns in how many parts the current cell (that this constraint's component will be in) should be split in. If for instance it is split in two, the next componet will also share the same cell. Note that the cell can also span a number of cells, which means that you can for instance span three cells and split that big cell for two components. Split can be set to a very high value to make all components in the same row/column share the same cell (e.g.LayoutUtil.INF).Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setSplit
public void setSplit(int parts) Sets in how many parts the current cell (that this constraint's component will be in) should be split in. If for instance it is split in two, the next componet will also share the same cell. Note that the cell can also span a number of cells, which means that you can for instance span three cells and split that big cell for two components. Split can be set to a very high value to make all components in the same row/column share the same cell (e.g.LayoutUtil.INF).Note that only the first component will be checked for this property.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
parts- The number of parts (i.e. component slots) the cell should be divided into.
-
getTag
Tags the component with metadata. Currently only used to tag buttons with for instance "cancel" or "ok" to make them show up in the correct order depending on platform. SeePlatformDefaults.setButtonOrder(String)for information.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value. May be
null.
-
setTag
Optinal tag that gives more context to this constraint's component. It is for instance used to tag buttons in a button bar with the button type such as "ok", "help" or "cancel".For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
tag- The new tag. May benull.
-
isWrap
public boolean isWrap()Returns if the flow should wrap to the next line/column after the component that this constraint belongs to.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setWrap
public void setWrap(boolean b) Sets if the flow should wrap to the next line/column after the component that this constraint belongs to.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
b-truemeans wrap after.
-
getWrapGapSize
Returns the wrap size if it is a custom size. If wrap was set to true withsetWrap(boolean)then this method will returnnullsince that means that the gap size should be the default one as defined in the rows spec.- Returns:
- The custom gap size. NOTE! Will return
nullfor both no wrap and default wrap. - Since:
- 2.4.2
- See Also:
-
setWrapGapSize
Set the wrap size and turns wrap on if!= null.- Parameters:
s- The custom gap size. NOTE!nullwill not turn on or off wrap, it will only set the wrap gap size to "default". A non-null value will turn on wrap though.- Since:
- 2.4.2
- See Also:
-
isNewline
public boolean isNewline()Returns if the flow should wrap to the next line/column before the component that this constraint belongs to.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Returns:
- The current value.
-
setNewline
public void setNewline(boolean b) Sets if the flow should wrap to the next line/column before the component that this constraint belongs to.For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
- Parameters:
b-truemeans wrap before.
-
getNewlineGapSize
Returns the newline size if it is a custom size. If newline was set to true withsetNewline(boolean)then this method will returnnullsince that means that the gap size should be the default one as defined in the rows spec.- Returns:
- The custom gap size. NOTE! Will return
nullfor both no newline and default newline. - Since:
- 2.4.2
- See Also:
-
setNewlineGapSize
Set the newline size and turns newline on if!= null.- Parameters:
s- The custom gap size. NOTE!nullwill not turn on or off newline, it will only set the newline gap size to "default". A non-null value will turn on newline though.- Since:
- 2.4.2
- See Also:
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-