public final class LC
- Object
- LC
LC layout manager.Constructors
public LC() |
Methods
public boolean isNoCache() | If components have sizes or positions linked to the bounds of the parent in some way (as for instance the "%" unit has) the cache must be turned off for the panel. |
public void setNoCache(boolean b) | If components have sizes or positions linked to the bounds of the parent in some way (as for instance the "%" unit has) the cache must be turned off for the panel. |
public UnitValue getAlignX() | If the laid out components’ bounds in total is less than the final size of the container these align values will be used to align the components in the parent. |
public void setAlignX(UnitValue uv) | If the laid out components’ bounds in total is less than the final size of the container these align values will be used to align the components in the parent. |
public UnitValue getAlignY() | If the laid out components’ bounds in total is less than the final size of the container these align values will be used to align the components in the parent. |
public void setAlignY(UnitValue uv) | If the laid out components’ bounds in total is less than the final size of the container these align values will be used to align the components in the parent. |
public int getDebugMillis() | If > 0 the debug decorations will be repainted every millis. |
public void setDebugMillis(int millis) | If > 0 the debug decorations will be repainted every millis. |
public boolean isFillX() | If the layout should always claim the whole bounds of the laid out container even if the preferred size is smaller. |
public void setFillX(boolean b) | If the layout should always claim the whole bounds of the laid out container even if the preferred size is smaller. |
public boolean isFillY() | If the layout should always claim the whole bounds of the laid out container even if the preferred size is smaller. |
public void setFillY(boolean b) | If the layout should always claim the whole bounds of the laid out container even if the preferred size is smaller. |
public boolean isFlowX() | The default flow direction. |
public void setFlowX(boolean b) | The default flow direction. |
public BoundSize getGridGapX() | If non-null (null is default) these value will be used as the default gaps between the columns in the grid. |
public void setGridGapX(BoundSize x) | If non-null (null is default) these value will be used as the default gaps between the columns in the grid. |
public BoundSize getGridGapY() | If non-null (null is default) these value will be used as the default gaps between the rows in the grid. |
public void setGridGapY(BoundSize y) | If non-null (null is default) these value will be used as the default gaps between the rows in the grid. |
public int getHideMode() | How a component that is hidden (not visible) should be treated by default. |
public void setHideMode(int mode) | How a component that is hidden (not visible) should be treated. |
public UnitValue[] getInsets() | The insets for the layed out panel. |
public void setInsets(UnitValue[] ins) | The insets for the layed out panel. |
public Boolean getLeftToRight() | If the layout should be forced to be left-to-right or right-to-left. |
public void setLeftToRight(Boolean b) | If the layout should be forced to be left-to-right or right-to-left. |
public boolean isNoGrid() | If the whole layout should be non grid based. |
public void setNoGrid(boolean b) | If the whole layout should be non grid based. |
public boolean isTopToBottom() | If the layout should go from the default top-to-bottom in the grid instead of the optinal bottom-to-top. |
public void setTopToBottom(boolean b) | If the layout should go from the default top-to-bottom in the grid instead of the optinal bottom-to-top. |
public boolean isVisualPadding() | If visual padding should be automatically used and compensated for by this layout instance. |
public void setVisualPadding(boolean b) | If visual padding should be automatically used and compensated for by this layout instance. |
public int getWrapAfter() | Returns after what cell the grid should always auto wrap. |
public void setWrapAfter(int count) | Sets after what cell the grid should always auto wrap. |
public BoundSize getPackWidth() | Returns the “pack width” for the window that this container is located in. |
public void setPackWidth(BoundSize size) | Sets the “pack width” for the window that this container is located in. |
public BoundSize getPackHeight() | Returns the “pack height” for the window that this container is located in. |
public void setPackHeight(BoundSize size) | Sets the “pack height” for the window that this container is located in. |
public float getPackHeightAlign() | If there is a resize of the window due to packing (see #setPackHeight(BoundSize) this value, which is between 0f and 1f, decides where the extra/superfluous size is placed. 0f means that the window will resize so that the upper part moves up and the lower side stays in the same place. 0.5f will expand/reduce the window equally upwards and downwards. 1f will do the opposite of 0f of course. |
public void setPackHeightAlign(float align) | If there is a resize of the window due to packing (see #setPackHeight(BoundSize) this value, which is between 0f and 1f, decides where the extra/superfluous size is placed. 0f means that the window will resize so that the upper part moves up and the lower side stays in the same place. 0.5f will expand/reduce the window equally upwards and downwards. 1f will do the opposite of 0f of course. |
public float getPackWidthAlign() | If there is a resize of the window due to packing (see #setPackHeight(BoundSize) this value, which is between 0f and 1f, decides where the extra/superfluous size is placed. 0f means that the window will resize so that the left part moves left and the right side stays in the same place. 0.5f will expand/reduce the window equally to the right and lefts. 1f will do the opposite of 0f of course. |
public void setPackWidthAlign(float align) | If there is a resize of the window due to packing (see #setPackHeight(BoundSize) this value, which is between 0f and 1f, decides where the extra/superfluous size is placed. 0f means that the window will resize so that the left part moves left and the right side stays in the same place. 0.5f will expand/reduce the window equally to the right and lefts. 1f will do the opposite of 0f of course. |
public BoundSize getWidth() | Returns the minimum/preferred/maximum size for the container that this layout constraint is set for. |
public void setWidth(BoundSize size) | Sets the minimum/preferred/maximum size for the container that this layout constraint is set for. |
public BoundSize getHeight() | Returns the minimum/preferred/maximum size for the container that this layout constraint is set for. |
public void setHeight(BoundSize size) | Sets the minimum/preferred/maximum size for the container that this layout constraint is set for. |
public LC pack() | Short for, and thus same as, .pack("pref", "pref"). |
public LC pack(String width, String height) | Sets the pack width and height. |
public LC packAlign(float alignX, float alignY) | Sets the pack width and height alignment. |
public LC wrap() | Sets a wrap after the number of columns/rows that is defined in the net.miginfocom.layout.AC. |
public LC wrapAfter(int count) | Same functionality as #setWrapAfter(int) only this method returns this for chaining multiple calls. |
public LC noCache() | Same functionality as calling #setNoCache(boolean) with true only this method returns this for chaining multiple calls. |
public LC flowY() | Same functionality as calling #setFlowX(boolean) with false only this method returns this for chaining multiple calls. |
public LC flowX() | Same functionality as calling #setFlowX(boolean) with true only this method returns this for chaining multiple calls. |
public LC fill() | Same functionality as calling #setFillX(boolean) with true and #setFillY(boolean) with true conmbined.T his method returns this for chaining multiple calls. |
public LC fillX() | Same functionality as calling #setFillX(boolean) with true only this method returns this for chaining multiple calls. |
public LC fillY() | Same functionality as calling #setFillY(boolean) with true only this method returns this for chaining multiple calls. |
public LC leftToRight(boolean b) | Same functionality as #setLeftToRight(Boolean) only this method returns this for chaining multiple calls. |
public LC rightToLeft() | Same functionality as setLeftToRight(false) only this method returns this for chaining multiple calls. |
public LC bottomToTop() | Same functionality as calling #setTopToBottom(boolean) with false only this method returns this for chaining multiple calls. |
public LC topToBottom() | Same functionality as calling #setTopToBottom(boolean) with true only this method returns this for chaining multiple calls. |
public LC noGrid() | Same functionality as calling #setNoGrid(boolean) with true only this method returns this for chaining multiple calls. |
public LC noVisualPadding() | Same functionality as calling #setVisualPadding(boolean) with false only this method returns this for chaining multiple calls. |
public LC insetsAll(String allSides) | Sets the same inset (expressed as a UnitValue, e.g. “10px” or “20mm”) all around. |
public LC insets(String s) | Same functionality as setInsets(ConstraintParser.parseInsets(s, true)). |
public LC insets(String top, String left, String bottom, String right) | Sets the different insets (expressed as a UnitValues, e.g. “10px” or “20mm”) for the corresponding sides. |
public LC alignX(String align) | Same functionality as setAlignX(ConstraintParser.parseUnitValueOrAlign(unitValue, true)) only this method returns this for chaining multiple calls. |
public LC alignY(String align) | Same functionality as setAlignY(ConstraintParser.parseUnitValueOrAlign(align, false)) only this method returns this for chaining multiple calls. |
public LC align(String ax, String ay) | Sets both the alignX and alignY as the same time. |
public LC gridGapX(String boundsSize) | Same functionality as setGridGapX(ConstraintParser.parseBoundSize(boundsSize, true, true)) only this method returns this for chaining multiple calls. |
public LC gridGapY(String boundsSize) | Same functionality as setGridGapY(ConstraintParser.parseBoundSize(boundsSize, true, false)) only this method returns this for chaining multiple calls. |
public LC gridGap(String gapx, String gapy) | Sets both grid gaps at the same time. |
public LC debug() | Calls #debug(int) with 300 as an argument. |
public LC debug(int repaintMillis) | Same functionality as repaintMillis) only this method returns this for chaining multiple calls. |
public LC hideMode(int mode) | Same functionality as mode) only this method returns this for chaining multiple calls. |
public LC minWidth(String width) | The minimum width for the container. |
public LC width(String width) | The width for the container as a min and/or preferred and/or maximum width. |
public LC maxWidth(String width) | The maximum width for the container. |
public LC minHeight(String height) | The minimum height for the container. |
public LC height(String height) | The height for the container as a min and/or preferred and/or maximum height. |
public LC maxHeight(String height) | The maximum height for the container. |
Inherited methods
Constructor details
LC
public LC()Method details
isNoCache
public boolean isNoCache()"%" unit has) the cache
must be turned off for the panel. If components does not get the correct or expected size or position try to set this property to true.Returns
true means no cache and slightly slower layout.setNoCache
public void setNoCache(boolean b)"%" unit has) the cache
must be turned off for the panel. If components does not get the correct or expected size or position try to set this property to true.Parameters
bbooleantruemeans no cache and slightly slower layout.
getAlignX
public UnitValue getAlignX()null is default and that means top/left alignment. The relative distances between the components will not be affected
by this property.Returns
setAlignX
public void setAlignX(UnitValue uv)null is default and that means top/left alignment. The relative distances between the components will not be affected
by this property.Parameters
uvUnitValue- The new alignment. Use
boolean)to create theUnitValue. May benull.
getAlignY
public UnitValue getAlignY()null is default and that means top/left alignment. The relative distances between the components will not be affected
by this property.Returns
setAlignY
public void setAlignY(UnitValue uv)null is default and that means top/left alignment. The relative distances between the components will not be affected
by this property.Parameters
uvUnitValue- The new alignment. Use
boolean)to create theUnitValue. May benull.
getDebugMillis
public int getDebugMillis()> 0 the debug decorations will be repainted every millis. No debug information if <= 0 (default).Returns
setDebugMillis
public void setDebugMillis(int millis)> 0 the debug decorations will be repainted every millis. No debug information if <= 0 (default).Parameters
millisint- The new debug repaint interval.
isFillX
public boolean isFillX()Returns
true means fill. false is default.setFillX
public void setFillX(boolean b)Parameters
bbooleantruemeans fill.falseis default.
isFillY
public boolean isFillY()Returns
true means fill. false is default.setFillY
public void setFillY(boolean b)Parameters
bbooleantruemeans fill.falseis default.
isFlowX
public boolean isFlowX()true) this is horizontal and that means that the “next” component
will be put in the cell to the right (or to the left if left-to-right is false).Returns
true is the default flow horizontally.See also
setFlowX
public void setFlowX(boolean b)true) this is horizontal and that means that the “next” component
will be put in the cell to the right (or to the left if left-to-right is false).Parameters
bbooleantrueis the default flow horizontally.
See also
getGridGapX
public BoundSize getGridGapX()null (null is default) these value will be used as the default gaps between the columns in the grid.Returns
null if the platform default is used.setGridGapX
public void setGridGapX(BoundSize x)null (null is default) these value will be used as the default gaps between the columns in the grid.Parameters
xBoundSize- The default grid gap between columns in the grid. If
nullthe platform default is used.
getGridGapY
public BoundSize getGridGapY()null (null is default) these value will be used as the default gaps between the rows in the grid.Returns
null if the platform default is used.setGridGapY
public void setGridGapY(BoundSize y)null (null is default) these value will be used as the default gaps between the rows in the grid.Parameters
yBoundSize- The default grid gap between rows in the grid. If
nullthe platform default is used.
getHideMode
public int getHideMode()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)Parameters
modeintThe 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..
getInsets
public UnitValue[] getInsets()null values
means that the default panel insets for the platform is used. See net.miginfocom.layout.UnitValue, net.miginfocom.layout.UnitValue, net.miginfocom.layout.UnitValue).Returns
null. The elements (1 to 4) may be null. The array is a copy and can be used freely.See also
net.miginfocom.layout.ConstraintParser#parseInsets(String, boolean)
setInsets
public void setInsets(UnitValue[] ins)null values
means that the default panel insets for the platform is used. See net.miginfocom.layout.UnitValue, net.miginfocom.layout.UnitValue, net.miginfocom.layout.UnitValue).Parameters
insUnitValue[]- The new insets. Must be of length 4 (top, left, bottom, right) or
null. The elements (1 to 4) may benullto use the platform default for that side. The array is copied for storage.
See also
net.miginfocom.layout.ConstraintParser#parseInsets(String, boolean)
getLeftToRight
public Boolean getLeftToRight()null is default and
means that this will be picked up from the java.util.Locale that the container being layed out is reporting.Returns
Boolean.TRUE if force left-to-right. Boolean.FALSE if force tight-to-left. null
for the default “let the current Locale decide”.setLeftToRight
public void setLeftToRight(Boolean b)null is default and
means that this will be picked up from the java.util.Locale that the container being layed out is reporting.Parameters
bBooleanBoolean.TRUEto force left-to-right.Boolean.FALSEto force tight-to-left.nullfor the default “let the current Locale decide”.
isNoGrid
public boolean isNoGrid()Returns
true means not grid based. false is default.setNoGrid
public void setNoGrid(boolean b)Parameters
bbooleantruemeans no grid.falseis default.
isTopToBottom
public boolean isTopToBottom()Returns
true for the default top-to-bottom.setTopToBottom
public void setTopToBottom(boolean b)Parameters
bbooleantruefor the default top-to-bottom.
isVisualPadding
public boolean isVisualPadding()Returns
true if visual padding.setVisualPadding
public void setVisualPadding(boolean b)Parameters
bbooleantrueturns on visual padding.
getWrapAfter
public int getWrapAfter()Returns
0 the number of columns/rows in the
net.miginfocom.layout.AC is used. LayoutUtil.INF is used for no auto wrap.setWrapAfter
public void setWrapAfter(int count)Parameters
countint- After what cell the grid should always auto wrap. If
0the number of columns/rows in thenet.miginfocom.layout.ACis used.LayoutUtil.INFis used for no auto wrap.
getPackWidth
public BoundSize getPackWidth()Returns the “pack width” for the window that this container is located in. When the size of this container changes the size of the window will be corrected to be within this BoundsSize. It can be used to set the minimum and/or maximum size of the window as well as the size window should optimally get. This optimal size is normally its “preferred” size which is why “preferred” is the normal value to set here.
“:push” can be appended to the bound size to only push the size bigger and never shrink it if the preferred size gets smaller.
E.g. “pref”, “100:pref”, “pref:700”, “300::700”, “pref:push”
Returns
null. Check if not set with .isUnset().setPackWidth
public void setPackWidth(BoundSize size)Sets the “pack width” for the window that this container is located in. When the size of this container changes the size of the window will be corrected to be within this BoundsSize. It can be used to set the minimum and/or maximum size of the window as well as the size window should optimally get. This optimal size is normally its “preferred” size which is why “preferred” is the normal value to set here.
“:push” can be appended to the bound size to only push the size bigger and never shrink it if the preferred size gets smaller.
E.g. “pref”, “100:pref”, “pref:700”, “300::700”, “pref:push”
Parameters
sizeBoundSize- The new pack size. If
nullit will be corrected to an “unset” BoundSize.
getPackHeight
public BoundSize getPackHeight()Returns the “pack height” for the window that this container is located in. When the size of this container changes the size of the window will be corrected to be within this BoundsSize. It can be used to set the minimum and/or maximum size of the window as well as the size window should optimally get. This optimal size is normally its “preferred” size which is why “preferred” is the normal value to set here.
“:push” can be appended to the bound size to only push the size bigger and never shrink it if the preferred size gets smaller.
E.g. “pref”, “100:pref”, “pref:700”, “300::700”, “pref:push”
Returns
null. Check if not set with .isUnset().setPackHeight
public void setPackHeight(BoundSize size)Sets the “pack height” for the window that this container is located in. When the size of this container changes the size of the window will be corrected to be within this BoundsSize. It can be used to set the minimum and/or maximum size of the window as well as the size window should optimally get. This optimal size is normally its “preferred” size which is why “preferred” is the normal value to set here.
“:push” can be appended to the bound size to only push the size bigger and never shrink it if the preferred size gets smaller.
E.g. “pref”, “100:pref”, “pref:700”, “300::700”, “pref:push”
Parameters
sizeBoundSize- The new pack size. If
nullit will be corrected to an “unset” BoundSize.
getPackHeightAlign
public float getPackHeightAlign()#setPackHeight(BoundSize) this value, which is between 0f and 1f,
decides where the extra/superfluous size is placed. 0f means that the window will resize so that the upper part moves up and the
lower side stays in the same place. 0.5f will expand/reduce the window equally upwards and downwards. 1f will do the opposite of 0f
of course.Returns
setPackHeightAlign
public void setPackHeightAlign(float align)#setPackHeight(BoundSize) this value, which is between 0f and 1f,
decides where the extra/superfluous size is placed. 0f means that the window will resize so that the upper part moves up and the
lower side stays in the same place. 0.5f will expand/reduce the window equally upwards and downwards. 1f will do the opposite of 0f
of course.Parameters
alignfloat- The pack alignment. Always between 0f and 1f, inclusive. Values outside this will be truncated.
getPackWidthAlign
public float getPackWidthAlign()#setPackHeight(BoundSize) this value, which is between 0f and 1f,
decides where the extra/superfluous size is placed. 0f means that the window will resize so that the left part moves left and the
right side stays in the same place. 0.5f will expand/reduce the window equally to the right and lefts. 1f will do the opposite of 0f
of course.Returns
setPackWidthAlign
public void setPackWidthAlign(float align)#setPackHeight(BoundSize) this value, which is between 0f and 1f,
decides where the extra/superfluous size is placed. 0f means that the window will resize so that the left part moves left and the
right side stays in the same place. 0.5f will expand/reduce the window equally to the right and lefts. 1f will do the opposite of 0f
of course.Parameters
alignfloat- The pack alignment. Always between 0f and 1f, inclusive. Values outside this will be truncated.
getWidth
public BoundSize getWidth()null will be returned directly instead of determining the corresponding size through
asking the components in this container.Returns
null but
all sizes can be null.setWidth
public void setWidth(BoundSize size)null will be returned directly instead of determining the corresponding size through
asking the components in this container.Parameters
sizeBoundSize- The width for the container that this layout constraint is set for.
nullis translated to a bound size containing only null sizes.
getHeight
public BoundSize getHeight()null will be returned directly instead of determining the corresponding size through
asking the components in this container.Returns
null but
all sizes can be null.setHeight
public void setHeight(BoundSize size)null will be returned directly instead of determining the corresponding size through
asking the components in this container.Parameters
sizeBoundSize- The height for the container that this layout constraint is set for.
nullis translated to a bound size containing only null sizes.
pack
public LC pack()Short for, and thus same as, .pack("pref", "pref").
Same functionality as #setPackHeight(BoundSize) and #setPackWidth(net.miginfocom.layout.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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().pack
public LC pack(String width, String height)Sets the pack width and height.
Same functionality as #setPackHeight(BoundSize) and #setPackWidth(net.miginfocom.layout.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.
Parameters
widthString- The pack width. May be
null. heightString- The pack height. May be
null.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().packAlign
public LC packAlign(float alignX, float alignY)Sets the pack width and height alignment.
Same functionality as #setPackHeightAlign(float) and #setPackWidthAlign(float)
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.
Parameters
alignXfloat- The pack width alignment. 0.5f is default.
alignYfloat- The pack height alignment. 0.5f is default.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().wrap
public LC wrap()Sets a wrap after the number of columns/rows that is defined in the net.miginfocom.layout.AC.
Same functionality as calling #setWrapAfter(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().wrapAfter
public LC wrapAfter(int count)Same functionality as #setWrapAfter(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.
Parameters
countint- After what cell the grid should always auto wrap. If
0the number of columns/rows in the
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().noCache
public LC noCache()Same functionality as calling #setNoCache(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().flowY
public LC flowY()Same functionality as calling #setFlowX(boolean) with 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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().flowX
public LC flowX()Same functionality as calling #setFlowX(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().fill
public LC fill()Same functionality as calling #setFillX(boolean) with true and #setFillY(boolean) with true conmbined.T his 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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().fillX
public LC fillX()Same functionality as calling #setFillX(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().fillY
public LC fillY()Same functionality as calling #setFillY(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().leftToRight
public LC leftToRight(boolean b)Same functionality as #setLeftToRight(Boolean) 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.
Parameters
bbooleantruefor forcing left-to-right.falsefor forcing right-to-left.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().rightToLeft
public LC rightToLeft()Same functionality as setLeftToRight(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().bottomToTop
public LC bottomToTop()Same functionality as calling #setTopToBottom(boolean) with 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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().topToBottom
public LC topToBottom()Same functionality as calling #setTopToBottom(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().noGrid
public LC noGrid()Same functionality as calling #setNoGrid(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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().noVisualPadding
public LC noVisualPadding()Same functionality as calling #setVisualPadding(boolean) with 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.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().insetsAll
public LC insetsAll(String allSides)Sets the same inset (expressed as a UnitValue, e.g. “10px” or “20mm”) all around.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
Parameters
allSidesString- The unit value to set for all sides. May be
nullwhich means that the default panel insets for the platform is used.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
insets
public LC insets(String s)Same functionality as setInsets(ConstraintParser.parseInsets(s, true)). 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.
Parameters
sString- 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
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
insets
public LC insets(String top, String left, String bottom, String right)Sets the different insets (expressed as a UnitValues, e.g. “10px” or “20mm”) for the corresponding sides.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
Parameters
topString- The top inset. E.g. “10px” or “10mm” or “related”. May be
nullin which case the default inset for this side for the platform will be used. leftString- The left inset. E.g. “10px” or “10mm” or “related”. May be
nullin which case the default inset for this side for the platform will be used. bottomString- The bottom inset. E.g. “10px” or “10mm” or “related”. May be
nullin which case the default inset for this side for the platform will be used. rightString- The right inset. E.g. “10px” or “10mm” or “related”. May be
nullin which case the default inset for this side for the platform will be used.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
alignX
public LC alignX(String align)Same functionality as setAlignX(ConstraintParser.parseUnitValueOrAlign(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.
Parameters
alignString- The align keyword or for instance “100px”. E.g “left”, “right”, “leading” or “trailing”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
alignY
public LC alignY(String align)Same functionality as setAlignY(ConstraintParser.parseUnitValueOrAlign(align, 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.
Parameters
alignString- The align keyword or for instance “100px”. E.g “top” or “bottom”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
align
public LC align(String ax, String ay)Sets both the alignX and alignY as the same time.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
Parameters
axString- The align keyword or for instance “100px”. E.g “left”, “right”, “leading” or “trailing”.
ayString- The align keyword or for instance “100px”. E.g “top” or “bottom”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
gridGapX
public LC gridGapX(String boundsSize)Same functionality as setGridGapX(ConstraintParser.parseBoundSize(boundsSize, true, 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.
Parameters
boundsSizeString- The
BoundSizeof the gap. This is a minimum and/or preferred and/or maximum size. E.g."50:100:200"or"100px".
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
gridGapY
public LC gridGapY(String boundsSize)Same functionality as setGridGapY(ConstraintParser.parseBoundSize(boundsSize, true, 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.
Parameters
boundsSizeString- The
BoundSizeof the gap. This is a minimum and/or preferred and/or maximum size. E.g."50:100:200"or"100px".
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
gridGap
public LC gridGap(String gapx, String gapy)Sets both grid gaps at the same time. see #gridGapX(String) and #gridGapY(String).
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.
Parameters
gapxString- The
BoundSizeof the gap. This is a minimum and/or preferred and/or maximum size. E.g."50:100:200"or"100px". gapyString- The
BoundSizeof the gap. This is a minimum and/or preferred and/or maximum size. E.g."50:100:200"or"100px".
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().debug
public LC debug()#debug(int) with 300 as an argument.Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
debug
public LC debug(int repaintMillis)Same functionality as repaintMillis) 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.
Parameters
repaintMillisint- The new debug repaint interval.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
hideMode
public LC hideMode(int mode)Same functionality as mode) 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.
Parameters
modeintThe 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..
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().See also
minWidth
public LC minWidth(String width)The minimum width for the container. The value will override any value that is set on the container itself.
For a more thorough explanation of what this constraint does see the white paper or Cheat Sheet at www.migcontainers.com.
Parameters
widthString- The width expressed as a
UnitValue. E.g. “100px” or “200mm”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().width
public LC width(String width)The width for the container as a min and/or preferred and/or maximum width. The value will override any value that is set on the container itself.
For a more thorough explanation of what this constraint does see the white paper or Cheat Sheet at www.migcontainers.com.
Parameters
widthString- The width expressed as a
BoundSize. E.g. “50:100px:200mm” or “100px”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().maxWidth
public LC maxWidth(String width)The maximum width for the container. The value will override any value that is set on the container itself.
For a more thorough explanation of what this constraint does see the white paper or Cheat Sheet at www.migcontainers.com.
Parameters
widthString- The width expressed as a
UnitValue. E.g. “100px” or “200mm”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().minHeight
public LC minHeight(String height)The minimum height for the container. The value will override any value that is set on the container itself.
For a more thorough explanation of what this constraint does see the white paper or Cheat Sheet at www.migcontainers.com.
Parameters
heightString- The height expressed as a
UnitValue. E.g. “100px” or “200mm”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().height
public LC height(String height)The height for the container as a min and/or preferred and/or maximum height. The value will override any value that is set on the container itself.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcontainers.com.
Parameters
heightString- The height expressed as a
BoundSize. E.g. “50:100px:200mm” or “100px”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().maxHeight
public LC maxHeight(String height)The maximum height for the container. The value will override any value that is set on the container itself.
For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcontainers.com.
Parameters
heightString- The height expressed as a
UnitValue. E.g. “100px” or “200mm”.
Returns
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().