public final class CC extends Object
Constructor and Description |
---|
CC()
Empty constructor.
|
Modifier and Type | Method and Description |
---|---|
CC |
alignX(String align)
Same functionality as
getHorizontal().setAlign(ConstraintParser.parseUnitValue(unitValue, true)) only this method
returns this for chaining multiple calls. |
CC |
alignY(String align)
Same functionality as
getVertical().setAlign(ConstraintParser.parseUnitValue(unitValue, true)) only this method
returns this for chaining multiple calls. |
CC |
cell(int... colRowWidthHeight)
Set the cell(s) that the component should occupy in the grid.
|
CC |
dockEast()
Same functionality as calling
setDockSide(int) with 3 only this method returns this for chaining multiple calls. |
CC |
dockNorth()
Same functionality as calling
setDockSide(int) with 0 only this method returns this for chaining multiple calls. |
CC |
dockSouth()
Same functionality as calling
setDockSide(int) with 2 only this method returns this for chaining multiple calls. |
CC |
dockWest()
Same functionality as calling
setDockSide(int) with 1 only this method returns this for chaining multiple calls. |
CC |
endGroup(String... xy)
The end group(s) that this component should be placed in.
|
CC |
endGroupX(String s)
Specifies that the component should be put in the end group
s and will thus share the same ending
coordinate as them within the group. |
CC |
endGroupY(String s)
The end group that this component should be placed in.
|
CC |
external()
Same functionality as calling
setExternal(boolean) with true only this method returns this for chaining multiple calls. |
CC |
flowX()
Same functionality as calling
setFlowX(Boolean) with Boolean.TRUE only this method returns this for chaining multiple calls. |
CC |
flowY()
Same functionality as calling
setFlowX(Boolean) with Boolean.FALSE only this method returns this for chaining multiple calls. |
CC |
gap(String... args)
Corresponds exactly to the "gap left right top bottom" keyword.
|
CC |
gapAfter(String boundsSize)
Sets the horizontal gap after the component.
|
CC |
gapBefore(String boundsSize)
Sets the horizontal gap before the component.
|
CC |
gapBottom(String boundsSize)
Sets the gap below the component.
|
CC |
gapLeft(String boundsSize)
Sets the gap to the left the component.
|
CC |
gapRight(String boundsSize)
Sets the gap to the right of the component.
|
CC |
gapTop(String boundsSize)
Sets the gap above the component.
|
CC |
gapX(String before,
String after)
The horizontal gap before and/or after the component.
|
CC |
gapY(String before,
String after)
The vertical gap before (normally above) and/or after (normally below) the component.
|
int |
getCellX()
Returns the absolute cell position in the grid or
-1 if cell positioning is not used. |
int |
getCellY()
Returns the absolute cell position in the grid or
-1 if cell positioning is not used. |
DimConstraint |
getDimConstraint(boolean isHor)
Returns the vertical or horizontal dim constraint.
|
int |
getDockSide()
Sets the docking side.
|
Boolean |
getFlowX()
Returns if the flow in the cell is in the horizontal dimension.
|
int |
getHideMode()
Sets how a component that is hidden (not visible) should be treated by default.
|
DimConstraint |
getHorizontal()
Returns the horizontal dimension constraint for this component constraint.
|
String |
getId()
Returns the id used to reference this component in some constraints.
|
BoundSize |
getNewlineGapSize()
Returns the newline size if it is a custom size.
|
UnitValue[] |
getPadding()
Returns the absolute resizing in the last stage of the layout cycle.
|
UnitValue[] |
getPos()
Returns the absolute positioning of one or more of the edges.
|
Float |
getPushX()
"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing.
|
Float |
getPushY()
"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing.
|
int |
getSkip()
Returns how many cells in the grid that should be skipped before the component that this constraint belongs to.
|
int |
getSpanX()
Returns the number of cells the cell that this constraint's component will span in the indicated dimension.
|
int |
getSpanY()
Returns the number of cells the cell that this constraint's component will span in the indicated dimension.
|
int |
getSplit()
Returns in how many parts the current cell (that this constraint's component will be in) should be split in.
|
String |
getTag()
Tags the component with metadata.
|
DimConstraint |
getVertical()
Returns the vertical dimension constraint for this component constraint.
|
UnitValue[] |
getVisualPadding()
Returns the visual padding used when laying out this Component.
|
BoundSize |
getWrapGapSize()
Returns the wrap size if it is a custom size.
|
CC |
grow()
|
CC |
grow(float... widthHeight)
grow weight for the component horizontally and optionally vertically.
|
CC |
growPrio(int... widthHeight)
Grow priority for the component horizontally and optionally vertically.
|
CC |
growPrioX(int p)
The grow priority compared to other components in the same cell.
|
CC |
growPrioY(int p)
The grow priority compared to other components in the same cell.
|
CC |
growX()
Grow weight for the component horizontally.
|
CC |
growX(float w)
Grow weight for the component horizontally.
|
CC |
growY()
Grow weight for the component vertically.
|
CC |
growY(Float w)
Grow weight for the component vertically.
|
CC |
height(String size)
The size for the component as a min and/or preferred and/or maximum size.
|
CC |
hideMode(int mode)
How this component, if hidden (not visible), should be treated.
|
CC |
id(String s)
The id used to reference this component in some constraints.
|
boolean |
isBoundsInGrid()
Returns if the absolute
pos value should be corrections to the component that is in a normal cell. |
boolean |
isExternal()
Returns if this component should have its bounds handled by an external source and not this layout manager.
|
boolean |
isNewline()
Returns if the flow should wrap to the next line/column before the component that this constraint belongs to.
|
boolean |
isWrap()
Returns if the flow should wrap to the next line/column after the component that this constraint belongs to.
|
CC |
maxHeight(String size)
The maximum size for the component.
|
CC |
maxWidth(String size)
The maximum size for the component.
|
CC |
minHeight(String size)
The minimum size for the component.
|
CC |
minWidth(String size)
The minimum size for the component.
|
CC |
newline()
Same functionality as calling
setNewline(boolean) with true only this method returns this for chaining multiple calls. |
CC |
newline(String gapSize)
Same functionality as
setNewlineGapSize(BoundSize) only this method returns this for chaining multiple calls. |
CC |
pad(int top,
int left,
int bottom,
int right)
Same functionality as
setPadding(UnitValue[]) but the unit values as absolute pixels. |
CC |
pad(String pad)
Same functionality as
setPadding(ConstraintParser.parseInsets(pad, false))} only this method returns this for chaining multiple calls. |
CC |
pos(String x,
String y)
Same functionality as
x(String x) and y(String y) toghether. |
CC |
pos(String x,
String y,
String x2,
String y2)
|
CC |
push()
Same functionality as
pushX().pushY() which means this cell will push in both x and y dimensions. |
CC |
push(Float weightX,
Float weightY)
Same functionality as
pushX(weightX).pushY(weightY) which means this cell will push in both x and y dimensions. |
CC |
pushX()
Same functionality as
setPushX(Float) which means this cell will push the rest of the row. |
CC |
pushX(Float weight)
Same functionality as
setPushX(Float weight) only this method returns this for chaining multiple calls. |
CC |
pushY()
Same functionality as
setPushY(Float) which means this cell will push the rest of the column. |
CC |
pushY(Float weight)
Same functionality as
setPushY(Float weight) only this method returns this for chaining multiple calls. |
void |
setCellX(int x)
Set an absolute cell x-position in the grid.
|
void |
setCellY(int y)
Set an absolute cell x-position in the grid.
|
void |
setDockSide(int side)
Sets the docking side.
|
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 some
component.setBounds(x, y, width, height) directly (for Swing). |
void |
setFlowX(Boolean b)
Sets if the flow in the cell is in the horizontal dimension.
|
void |
setHideMode(int mode)
Sets how a component that is hidden (not visible) should be treated by default.
|
void |
setHorizontal(DimConstraint h)
Sets the horizontal dimension constraint for this component constraint.
|
void |
setId(String id)
Sets the id used to reference this component in some constraints.
|
void |
setNewline(boolean b)
Sets if the flow should wrap to the next line/column before the component that this constraint belongs to.
|
void |
setNewlineGapSize(BoundSize s)
Set the newline size and turns newline on if
!= null . |
void |
setPadding(UnitValue[] sides)
Sets the absolute resizing in the last stage of the layout cycle.
|
void |
setPos(UnitValue[] pos)
Sets absolute positioning of one or more of the edges.
|
void |
setPushX(Float weight)
"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing.
|
void |
setPushY(Float weight)
"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing.
|
void |
setSkip(int cells)
Sets how many cells in the grid that should be skipped before the component that this constraint belongs to.
|
void |
setSpanX(int cells)
Sets the number of cells the cell that this constraint's component will span in the indicated dimension.
|
void |
setSpanY(int cells)
Sets the number of cells the cell that this constraint's component will span in the indicated dimension.
|
void |
setSplit(int parts)
Sets in how many parts the current cell (that this constraint's component will be in) should be split in.
|
void |
setTag(String tag)
Optinal tag that gives more context to this constraint's component.
|
void |
setVertical(DimConstraint v)
Sets the vertical dimension constraint for this component constraint.
|
void |
setVisualPadding(UnitValue[] sides)
Sets the visual padding used when laying out this Component.
|
void |
setWrap(boolean b)
Sets if the flow should wrap to the next line/column after the component that this constraint belongs to.
|
void |
setWrapGapSize(BoundSize s)
Set the wrap size and turns wrap on if
!= null . |
CC |
shrink(float... widthHeight)
Shrink weight for the component horizontally and optionally vertically.
|
CC |
shrinkPrio(int... widthHeight)
Shrink priority for the component horizontally and optionally vertically.
|
CC |
shrinkPrioX(int p)
The shrink priority compared to other components in the same cell.
|
CC |
shrinkPrioY(int p)
The shrink priority compared to other components in the same cell.
|
CC |
shrinkX(float w)
Shrink weight for the component horizontally.
|
CC |
shrinkY(float w)
Shrink weight for the component horizontally.
|
CC |
sizeGroup(String... xy)
The size group(s) that this component should be placed in.
|
CC |
sizeGroupX(String s)
Specifies that the component should be put in the size group
s and will thus share the same size
as them within the group. |
CC |
sizeGroupY(String s)
The size group that this component should be placed in.
|
CC |
skip()
Same functionality as skip(1).
|
CC |
skip(int cells)
Same functionality as
setSkip(int) only this method returns this for chaining multiple calls. |
CC |
span(int... cells)
Same functionality as
spanX(cellsX).spanY(cellsY) which means this cell will span cells in both x and y. |
CC |
spanX()
Same functionality as
setSpanX(int) which means this cell will span the rest of the row. |
CC |
spanX(int cells)
Same functionality as
setSpanX(int) only this method returns this for chaining multiple calls. |
CC |
spanY()
Same functionality as calling
setSpanY(int) with LayoutUtil.INF which means this cell will span the rest of the column. |
CC |
spanY(int cells)
Same functionality as
setSpanY(int) only this method returns this for chaining multiple calls. |
CC |
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.
|
CC |
split(int parts)
Same functionality as
setSplit(int parts) only this method returns this for chaining multiple calls. |
CC |
tag(String tag)
Same functionality as
setTag(String tag) only this method returns this for chaining multiple calls. |
CC |
width(String size)
The size for the component as a min and/or preferred and/or maximum size.
|
CC |
wrap()
Same functionality as calling
setWrap(boolean) with true only this method returns this for chaining multiple calls. |
CC |
wrap(String gapSize)
Same functionality as
setWrapGapSize(BoundSize) only this method returns this for chaining multiple calls. |
CC |
x(String x)
Sets the x-coordinate for the component.
|
CC |
x2(String x2)
Sets the x2-coordinate for the component (right side).
|
CC |
y(String y)
Sets the y-coordinate for the component.
|
CC |
y2(String y2)
Sets the y2-coordinate for the component (bottom side).
|
public final CC endGroupX(String s)
s
and 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.
s
- A name to associate on the group that should be the same for other rows/columns in the same group.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC sizeGroupX(String s)
s
and 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.
s
- A name to associate on the group that should be the same for other rows/columns in the same group.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC minWidth(String size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The size expressed as a UnitValue
. E.g. "100px" or "200mm".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC width(String size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The size expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC maxWidth(String size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The size expressed as a UnitValue
. E.g. "100px" or "200mm".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC gapX(String before, String after)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
before
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".after
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC alignX(String align)
getHorizontal().setAlign(ConstraintParser.parseUnitValue(unitValue, true))
only this method
returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
align
- The align keyword or for instance "100px". E.g "left", "right", "leading" or "trailing".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC growPrioX(int p)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
p
- The grow priority.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC growPrio(int... widthHeight)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
widthHeight
- The new shrink weight and height. 1-2 arguments, never null.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC growX()
100
.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.growX(float)
public final CC growX(float w)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
w
- The new grow weight.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC grow(float... widthHeight)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
widthHeight
- The new shrink weight and height. 1-2 arguments, never null.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC shrinkPrioX(int p)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
p
- The shrink priority.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC shrinkPrio(int... widthHeight)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
widthHeight
- The new shrink weight and height. 1-2 arguments, never null.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC shrinkX(float w)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
w
- The new shrink weight.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC shrink(float... widthHeight)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
widthHeight
- The new shrink weight and height. 1-2 arguments, never null.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC endGroupY(String s)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
s
- The name of the group. If null
that means no group (default)this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC endGroup(String... xy)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
xy
- The end group for x and y respectively. 1-2 arguments, not null.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC sizeGroupY(String s)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
s
- The name of the group. If null
that means no group (default)this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC sizeGroup(String... xy)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
xy
- The size group for x and y respectively. 1-2 arguments, not null.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC minHeight(String size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The size expressed as a UnitValue
. E.g. "100px" or "200mm".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC height(String size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The size expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC maxHeight(String size)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
size
- The size expressed as a UnitValue
. E.g. "100px" or "200mm".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC gapY(String before, String after)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
before
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".after
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC alignY(String align)
getVertical().setAlign(ConstraintParser.parseUnitValue(unitValue, true))
only this method
returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
align
- The align keyword or for instance "100px". E.g "top" or "bottom".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC growPrioY(int p)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
p
- The grow priority.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC growY()
100
.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.growY(Float)
public final CC growY(Float w)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
w
- The new grow weight.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC shrinkPrioY(int p)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
p
- The shrink priority.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC shrinkY(float w)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
w
- The new shrink weight.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC hideMode(int mode)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
mode
- The mode. Default to the mode in the net.miginfocom.layout.LC
.
0 == Normal. Bounds will be calculated as if the component was visible.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC id(String s)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
s
- The id or null
. May consist of a groupID and a componentID which are separated by a dot: ".". E.g. "grp1.id1".
The dot should never be first or last if present.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.public final CC tag(String tag)
setTag(String tag)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
tag
- The new tag. May be null
.this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setTag(String)
public final CC cell(int... colRowWidthHeight)
setCellX(int col)
and
setCellY(int row)
together with setSpanX(int width)
and setSpanY(int height)
. This method
returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
colRowWidthHeight
- cellX, cellY, spanX, spanY repectively. 1-4 arguments, not null.this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setCellX(int)
,
setCellY(int)
,
setSpanX(int)
,
setSpanY(int)
public final CC span(int... cells)
spanX(cellsX).spanY(cellsY)
which means this cell will span cells in both x and y.
This method returns this
for 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.
cells
- spanX and spanY, when present, and in that order.this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setSpanY(int)
,
setSpanX(int)
,
spanY()
,
spanX()
public final CC gap(String... args)
args
- Same as for the "gap" keyword. Length 1-4, never null buf elements can be null.this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.public final CC gapBefore(String boundsSize)
Note! This is currently same as gapLeft(). This might change in 4.x.
boundsSize
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.public final CC gapAfter(String boundsSize)
Note! This is currently same as gapLeft(). This might change in 4.x.
boundsSize
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.public final CC gapTop(String boundsSize)
boundsSize
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.public final CC gapLeft(String boundsSize)
boundsSize
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.public final CC gapBottom(String boundsSize)
boundsSize
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.public final CC gapRight(String boundsSize)
boundsSize
- The size of the gap expressed as a BoundSize
. E.g. "50:100px:200mm" or "100px!".this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.public final CC spanY()
setSpanY(int)
with LayoutUtil.INF
which means this cell will span the rest of the column.
This method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setSpanY(int)
,
spanY()
public final CC spanY(int cells)
setSpanY(int)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
cells
- The number of cells to span (i.e. merge).this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setSpanY(int)
public final CC spanX()
setSpanX(int)
which means this cell will span the rest of the row.
This method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setSpanX(int)
,
spanX()
public final CC spanX(int cells)
setSpanX(int)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
cells
- The number of cells to span (i.e. merge).this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setSpanY(int)
public final CC push()
pushX().pushY()
which means this cell will push in both x and y dimensions.
This method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setPushX(Float)
,
setPushX(Float)
,
pushY()
,
pushX()
public final CC push(Float weightX, Float weightY)
pushX(weightX).pushY(weightY)
which means this cell will push in both x and y dimensions.
This method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
weightX
- The weight used in the push.weightY
- The weight used in the push.this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setPushY(Float)
,
setPushX(Float)
,
pushY()
,
pushX()
public final CC pushY()
setPushY(Float)
which means this cell will push the rest of the column.
This method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setPushY(Float)
public final CC pushY(Float weight)
setPushY(Float weight)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
weight
- The weight used in the push.this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setPushY(Float)
public final CC pushX()
setPushX(Float)
which means this cell will push the rest of the row.
This method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setPushX(Float)
public final CC pushX(Float weight)
setPushX(Float weight)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
weight
- The weight used in the push.this
so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill()
.setPushY(Float)
public final CC split(int parts)
setSplit(int parts)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
parts
- The number of parts (i.e. component slots) the cell should be divided into.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setSplit(int)
public final CC split()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setSplit(int)
public final CC skip(int cells)
setSkip(int)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
cells
- How many cells in the grid that should be skipped before the component that this constraint belongs tothis
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setSkip(int)
public final CC skip()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setSkip(int)
public final CC external()
setExternal(boolean)
with true
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setExternal(boolean)
public final CC flowX()
setFlowX(Boolean)
with Boolean.TRUE
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setFlowX(Boolean)
public final CC flowY()
setFlowX(Boolean)
with Boolean.FALSE
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setFlowX(Boolean)
public final CC grow()
public final CC newline()
setNewline(boolean)
with true
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setNewline(boolean)
public final CC newline(String gapSize)
setNewlineGapSize(BoundSize)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
gapSize
- The gap size that will override the gap size in the row/colum constraints if != null
. E.g. "5px" or "unrel".
If null
or ""
the newline size will be set to the default size and turned on. This is different compared to
setNewlineGapSize(BoundSize)
.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setNewlineGapSize(BoundSize)
public final CC wrap()
setWrap(boolean)
with true
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setWrap(boolean)
public final CC wrap(String gapSize)
setWrapGapSize(BoundSize)
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
gapSize
- The gap size that will override the gap size in the row/colum constraints if != null
. E.g. "5px" or "unrel".
If null
or ""
the wrap size will be set to the default size and turned on. This is different compared to
setWrapGapSize(BoundSize)
.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setWrapGapSize(BoundSize)
public final CC dockNorth()
setDockSide(int)
with 0
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setDockSide(int)
public final CC dockWest()
setDockSide(int)
with 1
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setDockSide(int)
public final CC dockSouth()
setDockSide(int)
with 2
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setDockSide(int)
public final CC dockEast()
setDockSide(int)
with 3
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setDockSide(int)
public final CC x(String x)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
x
- The x position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setPos(UnitValue[])
,
setBoundsInGrid(boolean)
public final CC y(String y)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
y
- The y position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setPos(UnitValue[])
,
setBoundsInGrid(boolean)
public final CC x2(String x2)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
x2
- The x2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setPos(UnitValue[])
,
setBoundsInGrid(boolean)
public final CC y2(String y2)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
y2
- The y2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setPos(UnitValue[])
,
setBoundsInGrid(boolean)
public final CC pos(String x, String y)
x(String x)
and y(String y)
toghether.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
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".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setPos(UnitValue[])
public final CC pos(String x, String y, String x2, String y2)
x(String x)
, y(String y)
, y2(String y)
and y2(String y)
toghether.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
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".this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setPos(UnitValue[])
public final CC pad(int top, int left, int bottom, int right)
setPadding(UnitValue[])
but the unit values as absolute pixels. This method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
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.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setTag(String)
public final CC pad(String pad)
setPadding(ConstraintParser.parseInsets(pad, false))}
only this method returns this
for chaining multiple calls.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
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.this
so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill()
.setTag(String)
public DimConstraint getHorizontal()
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.
null
.public void setHorizontal(DimConstraint h)
h
- The new dimension constraint. If null
it will be reset to new DimConstraint();
public DimConstraint getVertical()
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.
null
.public void setVertical(DimConstraint v)
v
- The new dimension constraint. If null
it will be reset to new DimConstraint();
public DimConstraint getDimConstraint(boolean isHor)
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.
isHor
- If the horizontal constraint should be returned.null
.public UnitValue[] getPos()
null
and elements may be null
.
null
value(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.
public void setPos(UnitValue[] pos)
null
and elements may be null
.
null
value(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.
pos
- UnitValue[] {x, y, x2, y2}
. Must be null
or of length 4. Elements can be null
.public boolean isBoundsInGrid()
pos
value should be corrections to the component that is in a normal cell. If false
the value of pos
is 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.
getPos()
public int getCellX()
-1
if 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.
public void setCellX(int x)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
x
- The x-position or -1
to disable cell positioning.public int getCellY()
-1
if 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.
public void setCellY(int y)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
y
- The y-position or -1
to disable cell positioning.public int getDockSide()
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.
public void setDockSide(int side)
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.
side
- -1 or 0-3.public boolean isExternal()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setExternal(boolean b)
component.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.
b
- true
means that the bounds are not changed.public Boolean getFlowX()
false
. Only the first
component is a cell can set the flow.
If null
the flow direction is inherited by from the net.miginfocom.layout.LC
.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setFlowX(Boolean b)
false
. Only the first
component is a cell can set the flow.
If null
the flow direction is inherited by from the net.miginfocom.layout.LC
.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
b
- Boolean.TRUE
means horizontal flow in the cell.public int getHideMode()
public void setHideMode(int mode)
mode
- The mode:public String getId()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
null
. May consist of a groupID and a componentID which are separated by a dot: ".". E.g. "grp1.id1".
The dot should never be first or last if present.public void setId(String id)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
id
- The id or null
. May consist of a groupID and a componentID which are separated by a dot: ".". E.g. "grp1.id1".
The dot should never be first or last if present.public UnitValue[] getPadding()
null
and elements may be null
.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
null
or of length 4.public void setPadding(UnitValue[] sides)
null
and elements may be null
.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
sides
- top, left, bottom right. Must be null
or of length 4.public UnitValue[] getVisualPadding()
null
and elements may be null
.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
null
or of length 4.public void setVisualPadding(UnitValue[] sides)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
sides
- top, left, bottom right. Must be null
or of length 4.public int getSkip()
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.
public void setSkip(int cells)
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.
cells
- How many cells in the grid that should be skipped before the component that this constraint belongs topublic int getSpanX()
1
is default and
means that it only spans the current cell. LayoutUtil.INF
is 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.
public void setSpanX(int cells)
1
is default and
means that it only spans the current cell. LayoutUtil.INF
is 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.
cells
- The number of cells to span (i.e. merge).public int getSpanY()
1
is default and
means that it only spans the current cell. LayoutUtil.INF
is 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.
public void setSpanY(int cells)
1
is default and
means that it only spans the current cell. LayoutUtil.INF
is 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.
cells
- The number of cells to span (i.e. merge).public Float getPushX()
If multiple components in a column has push weights set the largest one will be used for the column.
null
.public void setPushX(Float weight)
If multiple components in a column has push weights set the largest one will be used for the column.
weight
- The new push value. Default is null
.public Float getPushY()
If multiple components in a row has push weights set the largest one will be used for the row.
null
.public void setPushY(Float weight)
If multiple components in a row has push weights set the largest one will be used for the row.
weight
- The new push value. Default is null
.public int getSplit()
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.
public void setSplit(int parts)
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.
parts
- The number of parts (i.e. component slots) the cell should be divided into.public String getTag()
PlatformDefaults.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.
null
.public void setTag(String tag)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
tag
- The new tag. May be null
.public boolean isWrap()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setWrap(boolean b)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
b
- true
means wrap after.public BoundSize getWrapGapSize()
setWrap(boolean)
then this method will
return null
since that means that the gap size should be the default one as defined in the rows spec.null
for both no wrap and default wrap.isWrap()
,
setWrap(boolean)
public void setWrapGapSize(BoundSize s)
!= null
.s
- The custom gap size. NOTE! null
will 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.isWrap()
,
setWrap(boolean)
public boolean isNewline()
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
public void setNewline(boolean b)
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
b
- true
means wrap before.public BoundSize getNewlineGapSize()
setNewline(boolean)
then this method will
return null
since that means that the gap size should be the default one as defined in the rows spec.null
for both no newline and default newline.isNewline()
,
setNewline(boolean)
public void setNewlineGapSize(BoundSize s)
!= null
.s
- The custom gap size. NOTE! null
will 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.isNewline()
,
setNewline(boolean)