| java.lang.Object com.jgoodies.forms.layout.FormSpec com.jgoodies.forms.layout.ColumnSpec
ColumnSpec | final public class ColumnSpec extends FormSpec (Code) | | Specifies columns in FormLayout by their default orientation,
start size and resizing behavior.
Examples:
The following examples specify a column with FILL alignment, a size of
10 dlu that won't grow.
new ColumnSpec(Sizes.dluX(10));
new ColumnSpec(ColumnSpec.FILL, Sizes.dluX(10), 0.0);
new ColumnSpec(ColumnSpec.FILL, Sizes.dluX(10), ColumnSpec.NO_GROW);
new ColumnSpec("10dlu");
new ColumnSpec("10dlu:0");
new ColumnSpec("fill:10dlu:0");
The
com.jgoodies.forms.factories.FormFactory provides
predefined frequently used ColumnSpec instances.
author: Karsten Lentzsch version: $Revision: 1.2 $ See Also: com.jgoodies.forms.factories.FormFactory |
Field Summary | |
final public static DefaultAlignment | CENTER By default put the components in the center. | final public static DefaultAlignment | DEFAULT Unless overridden the default alignment for a column is FILL. | final public static DefaultAlignment | FILL By default fill the component into the column. | final public static DefaultAlignment | LEFT By default put components in the left. | final public static DefaultAlignment | MIDDLE By default put components in the middle. | final public static DefaultAlignment | RIGHT By default put components in the right. |
Constructor Summary | |
public | ColumnSpec(DefaultAlignment defaultAlignment, Size size, double resizeWeight) Constructs a ColumnSpec for the given default alignment,
size and resize weight.
The resize weight must be a non-negative double; you can use
NO_GROW as a convenience value for no resize. | public | ColumnSpec(Size size) Constructs a ColumnSpec for the given size using the
default alignment, and no resizing. | public | ColumnSpec(String encodedDescription) Constructs a ColumnSpec from the specified encoded description. |
Method Summary | |
public static ColumnSpec[] | decodeSpecs(String encodedColumnSpecs) Parses and splits encoded column specifications and returns
an array of ColumnSpec objects. | final protected boolean | isHorizontal() Returns if this is a horizontal specification (vs. |
CENTER | final public static DefaultAlignment CENTER(Code) | | By default put the components in the center.
|
DEFAULT | final public static DefaultAlignment DEFAULT(Code) | | Unless overridden the default alignment for a column is FILL.
|
FILL | final public static DefaultAlignment FILL(Code) | | By default fill the component into the column.
|
LEFT | final public static DefaultAlignment LEFT(Code) | | By default put components in the left.
|
MIDDLE | final public static DefaultAlignment MIDDLE(Code) | | By default put components in the middle.
|
RIGHT | final public static DefaultAlignment RIGHT(Code) | | By default put components in the right.
|
ColumnSpec | public ColumnSpec(DefaultAlignment defaultAlignment, Size size, double resizeWeight)(Code) | | Constructs a ColumnSpec for the given default alignment,
size and resize weight.
The resize weight must be a non-negative double; you can use
NO_GROW as a convenience value for no resize.
Parameters: defaultAlignment - the column's default alignment Parameters: size - constant, component size or bounded size Parameters: resizeWeight - the column's non-negative resize weight throws: IllegalArgumentException - if the size is invalid or the resize weight is negative |
ColumnSpec | public ColumnSpec(Size size)(Code) | | Constructs a ColumnSpec for the given size using the
default alignment, and no resizing.
Parameters: size - constant size, component size, or bounded size throws: IllegalArgumentException - if the size is invalid |
ColumnSpec | public ColumnSpec(String encodedDescription)(Code) | | Constructs a ColumnSpec from the specified encoded description.
The description will be parsed to set initial values.
Parameters: encodedDescription - the encoded description |
decodeSpecs | public static ColumnSpec[] decodeSpecs(String encodedColumnSpecs)(Code) | | Parses and splits encoded column specifications and returns
an array of ColumnSpec objects.
Parameters: encodedColumnSpecs - comma separated encoded column specifications an array of decoded column specifications throws: NullPointerException - if the encoded column specifications stringis null See Also: ColumnSpec.ColumnSpec(String) |
isHorizontal | final protected boolean isHorizontal()(Code) | | Returns if this is a horizontal specification (vs. vertical).
Used to distinct between horizontal and vertical dialog units,
which have different conversion factors.
always true (for horizontal) |
|
|