Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   package net.miginfocom.layout;
   
   import java.io.*;
   import java.util.ArrayList;
   /*
    * License (BSD):
    * ==============
    *
    * Copyright (c) 2004, Mikael Grev, MiG InfoCom AB. (miglayout (at) miginfocom (dot) com)
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without modification,
   * are permitted provided that the following conditions are met:
   * Redistributions of source code must retain the above copyright notice, this list
   * of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice, this
   * list of conditions and the following disclaimer in the documentation and/or other
   * materials provided with the distribution.
   * Neither the name of the MiG InfoCom AB nor the names of its contributors may be
   * used to endorse or promote products derived from this software without specific
   * prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
   * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
   * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
   * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
   * OF SUCH DAMAGE.
   *
   * @version 1.0
   * @author Mikael Grev, MiG InfoCom AB
   *         Date: 2006-sep-08
   */

A simple value holder for one component's constraint.
  
  public final class CC implements Externalizable
  {
  	private static final BoundSize DEF_GAP = .;    // Only used to denote default wrap/newline gap.
  
  	static final String[] DOCK_SIDES = {"north""west""south""east"};
  
  	// See the getters and setters for information about the properties below.
  
  	private int dock = -1;
  
  	private UnitValue[] pos = null// [x1, y1, x2, y2]
  
  	private UnitValue[] padding = null;   // top, left, bottom, right
  
  	private Boolean flowX = null;
  
  	private int skip = 0;
  
  	private int split = 1;
  
  	private int spanX = 1, spanY = 1;
  
  	private int cellX = -1, cellY = 0; // If cellX is -1 then cellY is also considered -1. cellY is never negative.
  
  	private String tag = null;
  
  	private String id = null;
  
  	private int hideMode = -1;
  
  	private DimConstraint hor = new DimConstraint();
  
  	private DimConstraint ver = new DimConstraint();
  
  	private BoundSize newline = null;
  
  	private BoundSize wrap = null;
  
  	private boolean boundsInGrid = true;
  
  	private boolean external = false;
  
  	private Float pushX = nullpushY = null;
  
  
  	// ***** Tmp cache field
  
  	private static final String[] EMPTY_ARR = new String[0];
  
  	private transient String[] linkTargets = null;

Empty constructor.
  
  	public CC()
  	{
  	}
  
  	{
 		if ( == null) {
 			final ArrayList<Stringtargets = new ArrayList<String>(2);
 
 			if ( != null) {
 				for (int i = 0; i < . ; i++)
 					addLinkTargetIDs(targets[i]);
 			}
 
 			 = targets.size() == 0 ?  : targets.toArray(new String[targets.size()]);
 		}
 		return ;
 	}
 
 	private void addLinkTargetIDs(ArrayList<StringtargetsUnitValue uv)
 	{
 		if (uv != null) {
 			String linkId = uv.getLinkTargetId();
 			if (linkId != null) {
 				targets.add(linkId);
 			} else {
 				for (int i = uv.getSubUnitCount() - 1; i >= 0; i--) {
 					UnitValue subUv = uv.getSubUnitValue(i);
 					if (subUv.isLinkedDeep())
 						addLinkTargetIDs(targetssubUv);
 				}
 			}
 		}
 	}
 
 	// **********************************************************
 	// Chaining constraint setters
 	// **********************************************************
 
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.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
s A name to associate on the group that should be the same for other rows/columns in the same group.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC endGroupX(String s)
 	{
 		return this;
 	}

Specifies that the component should be put in the size group 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.

Parameters:
s A name to associate on the group that should be the same for other rows/columns in the same group.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC sizeGroupX(String s)
 	{
 		return this;
 	}

The minimum size for the component. The value will override any value that is set on the component itself.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
size The size expressed as a UnitValue. E.g. "100px" or "200mm".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC minWidth(String size)
 	{
 		.setSize(LayoutUtil.derive(.getSize(), ConstraintParser.parseUnitValue(sizetrue), nullnull));
 		return this;
 	}

The size for the component as a min and/or preferred and/or maximum size. The value will override any value that is set on the component itself.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
size The size expressed as a BoundSize. E.g. "50:100px:200mm" or "100px".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC width(String size)
 	{
 		.setSize(ConstraintParser.parseBoundSize(sizefalsetrue));
 		return this;
 	}

The maximum size for the component. The value will override any value that is set on the component itself.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
size The size expressed as a UnitValue. E.g. "100px" or "200mm".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC maxWidth(String size)
 	{
 		.setSize(LayoutUtil.derive(.getSize(), nullnull, ConstraintParser.parseUnitValue(sizetrue)));
 		return this;
 	}


The horizontal gap before and/or after the component. The gap is towards cell bounds and/or other component bounds.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
before The size of the gap expressed as 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!".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC gapX(String beforeString after)
 	{
 		if (before != null)
 			.setGapBefore(ConstraintParser.parseBoundSize(beforetruetrue));
 
 		if (after != null)
 			.setGapAfter(ConstraintParser.parseBoundSize(aftertruetrue));
 
 		return this;
 	}

Same functionality as 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.

Parameters:
align 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 ComponentConstraint().noGrid().gap().fill().
 
 	public final CC alignX(String align)
 	{
 		.setAlign(ConstraintParser.parseUnitValueOrAlign(aligntruenull));
 		return this;
 	}

The grow priority compared to other components in the same cell.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
p The grow priority.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC growPrioX(int p)
 	{
 		return this;
 	}

Grow priority for the component horizontally and optionally vertically.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
widthHeight The new shrink weight and height. 1-2 arguments, never null.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
 
 	public final CC growPrio(int ... widthHeight)
 	{
 		switch (widthHeight.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + widthHeight.length);
 			case 2:
 				growPrioY(widthHeight[1]);
 			case 1:
 				growPrioX(widthHeight[0]);
 		}
 		return this;
 	}

Grow weight for the component horizontally. It default to weight 100.

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 ComponentConstraint().noGrid().gap().fill().
See also:
growX(float)
 
 	public final CC growX()
 	{
 		return this;
 	}

Grow weight for the component horizontally.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
w The new grow weight.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC growX(float w)
 	{
 		.setGrow(new Float(w));
 		return this;
 	}

grow weight for the component horizontally and optionally vertically.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
widthHeight The new shrink weight and height. 1-2 arguments, never null.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
 
 	public final CC grow(float ... widthHeight)
 	{
 		switch (widthHeight.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + widthHeight.length);
 			case 2:
 				growY(widthHeight[1]);
 			case 1:
 				growX(widthHeight[0]);
 		}
 		return this;
 	}

The shrink priority compared to other components in the same cell.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
p The shrink priority.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC shrinkPrioX(int p)
 	{
 		return this;
 	}

Shrink priority for the component horizontally and optionally vertically.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
widthHeight The new shrink weight and height. 1-2 arguments, never null.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
 
 	public final CC shrinkPrio(int ... widthHeight)
 	{
 		switch (widthHeight.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + widthHeight.length);
 			case 2:
 				shrinkPrioY(widthHeight[1]);
 			case 1:
 				shrinkPrioX(widthHeight[0]);
 		}
 		return this;
 	}

Shrink weight for the component horizontally.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
w The new shrink weight.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC shrinkX(float w)
 	{
 		.setShrink(new Float(w));
 		return this;
 	}

Shrink weight for the component horizontally and optionally vertically.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
widthHeight The new shrink weight and height. 1-2 arguments, never null.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
 
 	public final CC shrink(float ... widthHeight)
 	{
 		switch (widthHeight.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + widthHeight.length);
 			case 2:
 				shrinkY(widthHeight[1]);
 			case 1:
 				shrinkX(widthHeight[0]);
 		}
 		return this;
 	}

The end group that this component should be placed in.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
s The name of the group. If null that means no group (default)
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC endGroupY(String s)
 	{
 		return this;
 	}

The end group(s) that this component should be placed in.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
xy The end group for x and y respectively. 1-2 arguments, not null.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
 
 	public final CC endGroup(String ... xy)
 	{
 		switch (xy.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + xy.length);
 			case 2:
 				endGroupY(xy[1]);
 			case 1:
 				endGroupX(xy[0]);
 		}
 		return this;
 	}

The size group that this component should be placed in.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
s The name of the group. If null that means no group (default)
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC sizeGroupY(String s)
 	{
 		return this;
 	}

The size group(s) that this component should be placed in.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
xy The size group for x and y respectively. 1-2 arguments, not null.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
 
 	public final CC sizeGroup(String ... xy)
 	{
 		switch (xy.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + xy.length);
 			case 2:
 				sizeGroupY(xy[1]);
 			case 1:
 				sizeGroupX(xy[0]);
 		}
 		return this;
 	}

The minimum size for the component. The value will override any value that is set on the component itself.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
size The size expressed as a UnitValue. E.g. "100px" or "200mm".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC minHeight(String size)
 	{
 		.setSize(LayoutUtil.derive(.getSize(), ConstraintParser.parseUnitValue(sizefalse), nullnull));
 		return this;
 	}

The size for the component as a min and/or preferred and/or maximum size. The value will override any value that is set on the component itself.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
size The size expressed as a BoundSize. E.g. "50:100px:200mm" or "100px".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC height(String size)
 	{
 		.setSize(ConstraintParser.parseBoundSize(sizefalsefalse));
 		return this;
 	}

The maximum size for the component. The value will override any value that is set on the component itself.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
size The size expressed as a UnitValue. E.g. "100px" or "200mm".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC maxHeight(String size)
 	{
 		.setSize(LayoutUtil.derive(.getSize(), nullnull, ConstraintParser.parseUnitValue(sizefalse)));
 		return this;
 	}

The vertical gap before (normally above) and/or after (normally below) the component. The gap is towards cell bounds and/or other component bounds.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
before The size of the gap expressed as 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!".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC gapY(String beforeString after)
 	{
 		if (before != null)
 			.setGapBefore(ConstraintParser.parseBoundSize(beforetruefalse));
 
 		if (after != null)
 			.setGapAfter(ConstraintParser.parseBoundSize(aftertruefalse));
 
 		return this;
 	}

Same functionality as 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.

Parameters:
align The align keyword or for instance "100px". E.g "top" or "bottom".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC alignY(String align)
 	{
 		.setAlign(ConstraintParser.parseUnitValueOrAlign(alignfalsenull));
 		return this;
 	}

The grow priority compared to other components in the same cell.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
p The grow priority.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC growPrioY(int p)
 	{
 		return this;
 	}

Grow weight for the component vertically. Defaults to 100.

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 ComponentConstraint().noGrid().gap().fill().
See also:
growY(java.lang.Float)
 
 	public final CC growY()
 	{
 		return this;
 	}

Grow weight for the component vertically.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
w The new grow weight.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC growY(Float w)
 	{
 		return this;
 	}

The shrink priority compared to other components in the same cell.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
p The shrink priority.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC shrinkPrioY(int p)
 	{
 		return this;
 	}

Shrink weight for the component horizontally.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
w The new shrink weight.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC shrinkY(float w)
 	{
 		.setShrink(new Float(w));
 		return this;
 	}

How this component, if hidden (not visible), should be treated.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
mode The mode. Default to the mode in the LC. 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 ComponentConstraint().noGrid().gap().fill().
 
 	public final CC hideMode(int mode)
 	{
 		setHideMode(mode);
 		return this;
 	}

The id used to reference this component in some constraints.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
s The id or null. May consist of a groupID and an componentID which are separated by a dot: ".". E.g. "grp1.id1". The dot should never be first or last if present.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
 
 	public final CC id(String s)
 	{
 		setId(s);
 		return this;
 	}

Same functionality as setTag(java.lang.String) 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:
tag The new tag. May be null.
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setTag(java.lang.String)
 
 	public final CC tag(String tag)
 	{
 		setTag(tag);
 		return this;
 	}

Set the cell(s) that the component should occupy in the grid. Same functionality as setCellX(int) and setCellY(int) together with setSpanX(int) and setSpanY(int). 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:
colRowWidthHeight cellX, cellY, spanX, spanY repectively. 1-4 arguments, not null.
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
Since:
3.7.2. Replacing cell(int, int) and cell(int, int, int, int)
See also:
setCellX(int)
setCellY(int)
setSpanX(int)
setSpanY(int)
 
 	public final CC cell(int ... colRowWidthHeight)
 	{
 		switch (colRowWidthHeight.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + colRowWidthHeight.length);
 			case 4:
 				setSpanY(colRowWidthHeight[3]);
 			case 3:
 				setSpanX(colRowWidthHeight[2]);
 			case 2:
 				setCellY(colRowWidthHeight[1]);
 			case 1:
 				setCellX(colRowWidthHeight[0]);
 		}
 		return this;
 	}

Same functionality as 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.

Parameters:
cells spanX and spanY, when present, and in that order.
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
Since:
3.7.2 Replaces span(int, int).
See also:
setSpanY(int)
setSpanX(int)
spanY()
spanX()
 
 	public final CC span(int ... cells)
 	{
 		if (cells == null || cells.length == 0) {
 		} else if (cells.length == 1) {
 			setSpanX(cells[0]);
 		} else {
 			setSpanX(cells[0]);
 			setSpanY(cells[1]);
 		}
 		return this;
 	}

Corresponds exactly to the "gap left right top bottom" keyword.

Parameters:
args Same as for the "gap" keyword. Length 1-4, never null buf elements can be null.
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
Since:
3.7.2
 
 	public final CC gap(String ... args)
 	{
 		switch (args.length) {
 			default:
 				throw new IllegalArgumentException("Illegal argument count: " + args.length);
 			case 4:
 				gapBottom(args[3]);
 			case 3:
 				gapTop(args[2]);
 			case 2:
 				gapRight(args[1]);
 			case 1:
 				gapLeft(args[0]);
 		}
 		return this;
 	}

Sets the horizontal gap before the component.

Note! This is currently same as gapLeft(). This might change in 4.x.

Parameters:
boundsSize The size of the gap expressed as 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().
Since:
3.7.2
 
 	public final CC gapBefore(String boundsSize)
 	{
 		.setGapBefore(ConstraintParser.parseBoundSize(boundsSizetruetrue));
 		return this;
 	}

Sets the horizontal gap after the component.

Note! This is currently same as gapLeft(). This might change in 4.x.

Parameters:
boundsSize The size of the gap 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().
Since:
3.7.2
 
 	public final CC gapAfter(String boundsSize)
 	{
 		.setGapAfter(ConstraintParser.parseBoundSize(boundsSizetruetrue));
 		return this;
 	}

Sets the gap above the component.

Parameters:
boundsSize The size of the gap 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().
Since:
3.7.2
 
 	public final CC gapTop(String boundsSize)
 	{
 		.setGapBefore(ConstraintParser.parseBoundSize(boundsSizetruefalse));
 		return this;
 	}

Sets the gap to the left the component.

Parameters:
boundsSize The size of the gap 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().
Since:
3.7.2
 
 	public final CC gapLeft(String boundsSize)
 	{
 		.setGapBefore(ConstraintParser.parseBoundSize(boundsSizetruetrue));
 		return this;
 	}

Sets the gap below the component.

Parameters:
boundsSize The size of the gap 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().
Since:
3.7.2
 
 	public final CC gapBottom(String boundsSize)
 	{
 		.setGapAfter(ConstraintParser.parseBoundSize(boundsSizetruefalse));
 		return this;
 	}

Sets the gap to the right of the component.

Parameters:
boundsSize The size of the gap 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().
Since:
3.7.2
 
 	public final CC gapRight(String boundsSize)
 	{
 		.setGapAfter(ConstraintParser.parseBoundSize(boundsSizetruetrue));
 		return this;
 	}

Same functionality as setSpanY(int 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.

Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setSpanY(int)
spanY()
 
 	public final CC spanY()
 	{
 		return spanY(.);
 	}

Same functionality as 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.

Parameters:
cells The number of cells to span (i.e. merge).
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setSpanY(int)
 
 	public final CC spanY(int cells)
 	{
 		setSpanY(cells);
 		return this;
 	}

Same functionality as 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.

Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setSpanX(int)
spanX()
 
 	public final CC spanX()
 	{
 		return spanX(.);
 	}

Same functionality as 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.

Parameters:
cells The number of cells to span (i.e. merge).
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setSpanY(int)
 
 	public final CC spanX(int cells)
 	{
 		setSpanX(cells);
 		return this;
 	}

Same functionality as 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.

Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setPushX(java.lang.Float)
setPushX(java.lang.Float)
pushY()
pushX()
 
 	public final CC push()
 	{
 		return pushX().pushY();
 	}

Same functionality as 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.

Parameters:
weightX The weight used in the push.
weightY The weight used in the push.
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setPushY(java.lang.Float)
setPushX(java.lang.Float)
pushY()
pushX()
 
 	public final CC push(Float weightXFloat weightY)
 	{
 		return pushX(weightX).pushY(weightY);
 	}

Same functionality as 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.

Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setPushY(java.lang.Float)
 
 	public final CC pushY()
 	{
 	}

Same functionality as setPushY(java.lang.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:
weight The weight used in the push.
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setPushY(java.lang.Float)
 
 	public final CC pushY(Float weight)
 	{
 		setPushY(weight);
 		return this;
 	}

Same functionality as setPushX(java.lang.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.

Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setPushX(java.lang.Float)
 
 	public final CC pushX()
 	{
 	}

Same functionality as setPushX(java.lang.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:
weight The weight used in the push.
Returns:
this so it is possible to chain calls. E.g. new LayoutConstraint().noGrid().gap().fill().
See also:
setPushY(java.lang.Float)
 
 	public final CC pushX(Float weight)
 	{
 		setPushX(weight);
 		return this;
 	}

Same functionality as setSplit(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:
parts The number of parts (i.e. component slots) the cell should be divided into.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setSplit(int)
 
 	public final CC split(int parts)
 	{
 		setSplit(parts);
 		return this;
 	}

Same functionality as split(LayoutUtil.INF), which means split until one of the keywords that breaks the split is found for a component after this one (e.g. wrap, newline and skip).

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
See also:
setSplit(int)
 
 	public final CC split()
 	{
 		return this;
 	}

Same functionality as 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.

Parameters:
cells How many cells in the grid that should be skipped before the component that this constraint belongs to
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setSkip(int)
 
 	public final CC skip(int cells)
 	{
 		setSkip(cells);
 		return this;
 	}

Same functionality as skip(1).

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
Since:
3.7.2
See also:
setSkip(int)
 
 	public final CC skip()
 	{
 		setSkip(1);
 		return this;
 	}

Same functionality as setExternal(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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setExternal(boolean)
 
 	public final CC external()
 	{
 		setExternal(true);
 		return this;
 	}

Same functionality as #setFlowX(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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setFlowX(java.lang.Boolean)
 
 	public final CC flowX()
 	{
 		return this;
 	}

Same functionality as #setFlowX(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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setFlowX(java.lang.Boolean)
 
 	public final CC flowY()
 	{
 		return this;
 	}


Same functionality as growX() and growY().

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 ComponentConstraint().noGrid().gap().fill().
See also:
growX()
growY()
 
 	public final CC grow()
 	{
 		growX();
 		growY();
 		return this;
 	}

Same functionality as setNewline(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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setNewline(boolean)
 
 	public final CC newline()
 	{
 		setNewline(true);
 		return this;
	}

Same functionality as setNewlineGapSize(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:
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(net.miginfocom.layout.BoundSize).
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setNewlineGapSize(net.miginfocom.layout.BoundSize)
	public final CC newline(String gapSize)
		BoundSize bs = ConstraintParser.parseBoundSize(gapSizetrue, ( != null &&  == false));
		if (bs != null) {
else {
		return this;
	}

Same functionality as setWrap(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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setWrap(boolean)
	public final CC wrap()
		setWrap(true);
		return this;
	}

Same functionality as setWrapGapSize(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:
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(net.miginfocom.layout.BoundSize).
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setWrapGapSize(net.miginfocom.layout.BoundSize)
	public final CC wrap(String gapSize)
		BoundSize bs = ConstraintParser.parseBoundSize(gapSizetrue, ( != null &&  == false));
		if (bs != null) {
else {
			setWrap(true);
		return this;
	}

Same functionality as setDockSide(int 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 ComponentConstraint().noGrid().gap().fill().
See also:
setDockSide(int)
	public final CC dockNorth()
		return this;
	}

Same functionality as setDockSide(int 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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setDockSide(int)
	public final CC dockWest()
		return this;
	}

Same functionality as setDockSide(int 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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setDockSide(int)
	public final CC dockSouth()
		return this;
	}

Same functionality as setDockSide(int 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.

Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setDockSide(int)
	public final CC dockEast()
		return this;
	}

Sets the x-coordinate for the component. This is used to set the x coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the x position.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
x The x position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setPos(net.miginfocom.layout.UnitValue[])
setBoundsInGrid(boolean)
	public final CC x(String x)
		return corrPos(x, 0);
	}

Sets the y-coordinate for the component. This is used to set the y coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the y position.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
y The y position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setPos(net.miginfocom.layout.UnitValue[])
setBoundsInGrid(boolean)
	public final CC y(String y)
		return corrPos(y, 1);
	}

Sets the x2-coordinate for the component (right side). This is used to set the x2 coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the x position.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
x2 The x2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setPos(net.miginfocom.layout.UnitValue[])
setBoundsInGrid(boolean)
	public final CC x2(String x2)
		return corrPos(x2, 2);
	}

Sets the y2-coordinate for the component (bottom side). This is used to set the y2 coordinate position to a specific value. The component bounds is still precalculated to the grid cell and this method should be seen as a way to correct the y position.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
y2 The y2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setPos(net.miginfocom.layout.UnitValue[])
setBoundsInGrid(boolean)
	public final CC y2(String y2)
		return corrPos(y2, 3);
	private final CC corrPos(String uvint ix)
		UnitValue[] b = getPos();
		if (b == null)
			b = new UnitValue[4];
		b[ix] = ConstraintParser.parseUnitValue(uv, (ix % 2 == 0));
		return this;
	}

Same functionality as x(java.lang.String) and y(java.lang.String) toghether.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
x The x position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".
y The y position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setPos(net.miginfocom.layout.UnitValue[])
	public final CC pos(String xString y)
		UnitValue[] b = getPos();
		if (b == null)
			b = new UnitValue[4];
		b[0] = ConstraintParser.parseUnitValue(xtrue);
		b[1] = ConstraintParser.parseUnitValue(yfalse);
		return this;
	}

Same functionality as x(java.lang.String), y(java.lang.String), y2(java.lang.String) and y2(java.lang.String) toghether.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
x The x position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".
y The y position as a UnitValue. E.g. "10" or "40mm" or "container.x+10".
x2 The x2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".
y2 The y2 side's position as a UnitValue. E.g. "10" or "40mm" or "container.x2 - 10".
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setPos(net.miginfocom.layout.UnitValue[])
	public final CC pos(String xString yString x2String y2)
				ConstraintParser.parseUnitValue(xtrue),
				ConstraintParser.parseUnitValue(yfalse),
				ConstraintParser.parseUnitValue(x2true),
				ConstraintParser.parseUnitValue(y2false),
		});
		return this;
	}

Same functionality as setPadding(net.miginfocom.layout.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.

Parameters:
top The top padding that will be added to the y coordinate at the last stage in the layout.
left The top padding that will be added to the x coordinate at the last stage in the layout.
bottom The top padding that will be added to the y2 coordinate at the last stage in the layout.
right The top padding that will be added to the x2 coordinate at the last stage in the layout.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setTag(java.lang.String)
	public final CC pad(int topint leftint bottomint right)
				new UnitValue(top),	new UnitValue(left), new UnitValue(bottom), new UnitValue(right)
		});
		return this;
	}

Same functionality as 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.

Parameters:
pad The string to parse. E.g. "10 10 10 10" or "20". If less than 4 groups the last will be used for the missing.
Returns:
this so it is possible to chain calls. E.g. new ComponentConstraint().noGrid().gap().fill().
See also:
setTag(java.lang.String)
	public final CC pad(String pad)
		setPadding(pad != null ? ConstraintParser.parseInsets(padfalse) : null);
		return this;
	// **********************************************************
	// Bean properties
	// **********************************************************
Returns the horizontal dimension constraint for this component constraint. It has constraints for the horizontal size and grow/shink priorities and weights.

Note! If any changes is to be made it must be made direct when the object is returned. It is not allowed to save the constraint for later use.

Returns:
The current dimension constraint. Never null.
		return ;
	}

Sets the horizontal dimension constraint for this component constraint. It has constraints for the horizontal size and grow/shrink priorities and weights.

Parameters:
h The new dimension constraint. If null it will be reset to new DimConstraint();
	public void setHorizontal(DimConstraint h)
		 = h != null ? h : new DimConstraint();
	}

Returns the vertical dimension constraint for this component constraint. It has constraints for the vertical size and grow/shrink priorities and weights.

Note! If any changes is to be made it must be made direct when the object is returned. It is not allowed to save the constraint for later use.

Returns:
The current dimension constraint. Never null.
		return ;
	}

Sets the vertical dimension constraint for this component constraint. It has constraints for the vertical size and grow/shrink priorities and weights.

Parameters:
v The new dimension constraint. If null it will be reset to new DimConstraint();
	public void setVertical(DimConstraint v)
		 = v != null ? v : new DimConstraint();
	}

Returns the vertical or horizontal dim constraint.

Note! If any changes is to be made it must be made direct when the object is returned. It is not allowed to save the constraint for later use.

Parameters:
isHor If the horizontal constraint should be returned.
Returns:
The dim constraint. Never null.
	public DimConstraint getDimConstraint(boolean isHor)
		return isHor ?  : ;
	}

Returns the absolute positioning of one or more of the edges. This will be applied last in the layout cycle and will not affect the flow or grid positions. The positioning is relative to the parent and can not (as padding) be used to adjust the edges relative to the old value. May be 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.

Returns:
The current value as a new array, free to modify.
	public UnitValue[] getPos()
		return  != null ? new UnitValue[] {[0], [1], [2], [3]} : null;
	}

Sets absolute positioning of one or more of the edges. This will be applied last in the layout cycle and will not affect the flow or grid positions. The positioning is relative to the parent and can not (as padding) be used to adjust the edges relative to the old value. May be 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.

Parameters:
pos UnitValue[] {x, y, x2, y2}. Must be null or of length 4. Elements can be null.
	public void setPos(UnitValue[] pos)
		this. = pos != null ? new UnitValue[] {pos[0], pos[1], pos[2], pos[3]} : null;
		 = null;
	}

Returns if the absolute 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.

Returns:
The current value.
See also:
getPos()
	public boolean isBoundsInGrid()
	}

Sets if the absolute 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.

Parameters:
b true for bounds taken from the grid position. false is default.
See also:
setPos(net.miginfocom.layout.UnitValue[])
	void setBoundsInGrid(boolean b)
		this. = b;
	}

Returns the absolute cell position in the grid or -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.

Returns:
The current value.
	public int getCellX()
		return ;
	}

Set an absolute cell x-position in the grid. If >= 0 this point points to the absolute cell that this constaint's component should occupy. If there's already a component in that cell they will split the cell. The flow will then continue after this cell.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
x The x-position or -1 to disable cell positioning.
	public void setCellX(int x)
		 = x;
	}

Returns the absolute cell position in the grid or -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.

Returns:
The current value.
	public int getCellY()
		return  < 0 ? -1 : ;
	}

Set an absolute cell x-position in the grid. If >= 0 this point points to the absolute cell that this constaint's component should occupy. If there's already a component in that cell they will split the cell. The flow will then continue after this cell.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
y The y-position or -1 to disable cell positioning.
	public void setCellY(int y)
		if (y < 0)
			 = -1;
		 = y < 0 ? 0 : y;
	}

Sets the docking side. -1 means no docking.
Valid sides are: north = 0, west = 1, south = 2, east = 3.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current side.
	public int getDockSide()
		return ;
	}

Sets the docking side. -1 means no docking.
Valid sides are: north = 0, west = 1, south = 2, east = 3.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
side -1 or 0-3.
	public void setDockSide(int side)
		if (side < -1 || side > 3)
			throw new IllegalArgumentException("Illegal dock side: " + side);
		 = side;
	}

Returns if this component should have its bounds handled by an external source and not this layout manager.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current value.
	public boolean isExternal()
		return ;
	}

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).

The bounds will not affect the minimum and preferred size of the container.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
b true means that the bounds are not changed.
	public void setExternal(boolean b)
		this. = b;
	}

Returns if the flow in the cell is in the horizontal dimension. Vertical if false. Only the first component is a cell can set the flow.

If null the flow direction is inherited by from the LC.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current value.
	public Boolean getFlowX()
		return ;
	}

Sets if the flow in the cell is in the horizontal dimension. Vertical if false. Only the first component is a cell can set the flow.

If null the flow direction is inherited by from the LC.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
b Boolean.TRUE means horizontal flow in the cell.
	public void setFlowX(Boolean b)
		this. = b;
	}

Sets how a component that is hidden (not visible) should be treated by default. For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The mode:
0 == Normal. Bounds will be calculated as if the component was visible.
1 == If hidden the size will be 0, 0 but the gaps remain.
2 == If hidden the size will be 0, 0 and gaps set to zero.
3 == If hidden the component will be disregarded completely and not take up a cell in the grid..
	public int getHideMode()
		return ;
	}

Sets how a component that is hidden (not visible) should be treated by default.

Parameters:
mode The mode:
0 == Normal. Bounds will be calculated as if the component was visible.
1 == If hidden the size will be 0, 0 but the gaps remain.
2 == If hidden the size will be 0, 0 and gaps set to zero.
3 == If hidden the component will be disregarded completely and not take up a cell in the grid..
	public void setHideMode(int mode)
		if (mode < -1 || mode > 3)
			throw new IllegalArgumentException("Wrong hideMode: " + mode);
		 = mode;
	}

Returns the id used to reference this component in some constraints.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The id or null. May consist of a groupID and an componentID which are separated by a dot: ".". E.g. "grp1.id1". The dot should never be first or last if present.
	public String getId()
		return ;
	}

Sets the id used to reference this component in some constraints.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
id The id or null. May consist of a groupID and an componentID which are separated by a dot: ".". E.g. "grp1.id1". The dot should never be first or last if present.
	public void setId(String id)
		this. = id;
	}

Returns the absolute resizing in the last stage of the layout cycle. May be 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.

Returns:
The current value. null or of length 4.
		return  != null ? new UnitValue[] {[0], [1], [2], [3]} : null;
	}

Sets the absolute resizing in the last stage of the layout cycle. These values are added to the edges and can thus for instance be used to grow or reduce the size or move the component an absolute number of pixels. May be 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.

Parameters:
sides top, left, bottom right. Must be null or of length 4.
	public void setPadding(UnitValue[] sides)
		this. = sides != null ? new UnitValue[] {sides[0], sides[1], sides[2], sides[3]} : null;
	}

Returns how many cells in the grid that should be skipped before the component that this constraint belongs to.

Note that only the first component will be checked for this property.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current value. 0 if no skip.
	public int getSkip()
		return ;
	}

Sets how many cells in the grid that should be skipped before the component that this constraint belongs to.

Note that only the first component will be checked for this property.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
cells How many cells in the grid that should be skipped before the component that this constraint belongs to
	public void setSkip(int cells)
		this. = cells;
	}

Returns the number of cells the cell that this constraint's component will span in the indicated dimension. 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.

Returns:
The current value.
	public int getSpanX()
		return ;
	}

Sets the number of cells the cell that this constraint's component will span in the indicated dimension. 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.

Parameters:
cells The number of cells to span (i.e. merge).
	public void setSpanX(int cells)
		this. = cells;
	}

Returns the number of cells the cell that this constraint's component will span in the indicated dimension. 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.

Returns:
The current value.
	public int getSpanY()
		return ;
	}

Sets the number of cells the cell that this constraint's component will span in the indicated dimension. 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.

Parameters:
cells The number of cells to span (i.e. merge).
	public void setSpanY(int cells)
		this. = cells;
	}

"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing. If any other column has been set to grow this push value on the component does nothing as the column's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.

If multiple components in a column has push weights set the largest one will be used for the column.

Returns:
The current push value. Default is null.
	public Float getPushX()
		return ;
	}

"pushx" indicates that the column that this component is in (this first if the component spans) should default to growing. If any other column has been set to grow this push value on the component does nothing as the column's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.

If multiple components in a column has push weights set the largest one will be used for the column.

Parameters:
weight The new push value. Default is null.
	public void setPushX(Float weight)
		this. = weight;
	}

"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing. If any other row has been set to grow this push value on the component does nothing as the row's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.

If multiple components in a row has push weights set the largest one will be used for the row.

Returns:
The current push value. Default is null.
	public Float getPushY()
		return ;
	}

"pushx" indicates that the row that this component is in (this first if the component spans) should default to growing. If any other row has been set to grow this push value on the component does nothing as the row's explicit grow weight will take precedence. Push is normally used when the grid has not been defined in the layout.

If multiple components in a row has push weights set the largest one will be used for the row.

Parameters:
weight The new push value. Default is null.
	public void setPushY(Float weight)
		this. = weight;
	}

Returns in how many parts the current cell (that this constraint's component will be in) should be split in. If for instance it is split in two, the next component will also share the same cell. Note that the cell can also span a number of cells, which means that you can for instance span three cells and split that big cell for two components. Split can be set to a very high value to make all components in the same row/column share the same cell (e.g. LayoutUtil.INF).

Note that only the first component will be checked for this property.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current value.
	public int getSplit()
		return ;
	}

Sets in how many parts the current cell (that this constraint's component will be in) should be split in. If for instance it is split in two, the next component will also share the same cell. Note that the cell can also span a number of cells, which means that you can for instance span three cells and split that big cell for two components. Split can be set to a very high value to make all components in the same row/column share the same cell (e.g. LayoutUtil.INF).

Note that only the first component will be checked for this property.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
parts The number of parts (i.e. component slots) the cell should be divided into.
	public void setSplit(int parts)
		this. = parts;
	}

Tags the component with metadata. Currently only used to tag buttons with for instance "cancel" or "ok" to make them show up in the correct order depending on platform. See PlatformDefaults.setButtonOrder(java.lang.String) for information.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current value. May be null.
	public String getTag()
		return ;
	}

Optinal tag that gives more context to this constraint's component. It is for instance used to tag buttons in a button bar with the button type such as "ok", "help" or "cancel".

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
tag The new tag. May be null.
	public void setTag(String tag)
		this. = tag;
	}

Returns if the flow should wrap to the next line/column after the component that this constraint belongs to.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current value.
	public boolean isWrap()
		return  != null;
	}

Sets if the flow should wrap to the next line/column after the component that this constraint belongs to.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
b true means wrap after.
	public void setWrap(boolean b)
		 = b ? ( == null ?  : ) : null;
	}

Returns the wrap size if it is a custom size. If wrap was set to true with 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.

Returns:
The custom gap size. NOTE! Will return null for both no wrap and default wrap.
Since:
2.4.2
See also:
isWrap()
setWrap(boolean)
		return  ==  ? null : ;
	}

Set the wrap size and turns wrap on if != null.

Parameters:
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.
Since:
2.4.2
See also:
isWrap()
setWrap(boolean)
	public void setWrapGapSize(BoundSize s)
		 = s == null ? ( != null ?  : null) : s;
	}

Returns if the flow should wrap to the next line/column before the component that this constraint belongs to.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Returns:
The current value.
	public boolean isNewline()
		return  != null;
	}

Sets if the flow should wrap to the next line/column before the component that this constraint belongs to.

For a more thorough explanation of what this constraint does see the white paper or cheat Sheet at www.migcomponents.com.

Parameters:
b true means wrap before.
	public void setNewline(boolean b)
		 = b ? ( == null ?  : ) : null;
	}

Returns the newline size if it is a custom size. If newline was set to true with 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.

Returns:
The custom gap size. NOTE! Will return null for both no newline and default newline.
Since:
2.4.2
See also:
isNewline()
setNewline(boolean)
		return  ==  ? null : ;
	}

Set the newline size and turns newline on if != null.

Parameters:
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.
Since:
2.4.2
See also:
isNewline()
setNewline(boolean)
	public void setNewlineGapSize(BoundSize s)
		 = s == null ? ( != null ?  : null) : s;
	// ************************************************
	// Persistence Delegate and Serializable combined.
	// ************************************************
		return LayoutUtil.getSerializedObject(this);
		LayoutUtil.setSerializedObject(this, LayoutUtil.readAsXML(in));
	public void writeExternal(ObjectOutput outthrows IOException
		if (getClass() == CC.class)
			LayoutUtil.writeAsXML(outthis);