public abstract class FormSpec extends Object implements Serializable
ColumnSpec and RowSpec.
ColumnSpec,
RowSpec,
FormLayout,
CellConstraints,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
FormSpec.DefaultAlignment
An ordinal-based serializable typesafe enumeration for th
column and row default alignment types.
|
| Modifier and Type | Field and Description |
|---|---|
static double |
DEFAULT_GROW
The default resize weight.
|
static double |
NO_GROW
Gives a column or row a fixed size.
|
| Modifier | Constructor and Description |
|---|---|
protected |
FormSpec(FormSpec.DefaultAlignment defaultAlignment,
Size size,
double resizeWeight)
Constructs a
FormSpec for the given default alignment
size, and resize weight. |
protected |
FormSpec(FormSpec.DefaultAlignment defaultAlignment,
String encodedDescription)
Constructs a FormSpec from the specified encoded description.
|
| Modifier and Type | Method and Description |
|---|---|
String |
encode()
Returns a short and parseable string representation of thi
form specification.
|
FormSpec.DefaultAlignment |
getDefaultAlignment()
Returns the default alignment.
|
boolean |
getDefaultAlignmentExplictlySet()
Returns whether the default alignment has been explicitly set or not.
|
double |
getResizeWeight()
Returns the current resize weight.
|
Size |
getSize()
Returns the size.
|
String |
toShortString()
Returns a string representation of this form specification.
|
String |
toString()
Returns a string representation of this form specification.
|
public static final double NO_GROW
public static final double DEFAULT_GROW
protected FormSpec(FormSpec.DefaultAlignment defaultAlignment, Size size, double resizeWeight)
FormSpec for the given default alignment
size, and resize weight. The resize weight must be a non-negativ
double; you can use NONE as a convenience value for n
resize.defaultAlignment - the spec's default alignmentsize - a constant, component or bounded sizeresizeWeight - the spec resize weightNullPointerException - if the size is nullIllegalArgumentException - if the resizeWeight is negativeprotected FormSpec(FormSpec.DefaultAlignment defaultAlignment, String encodedDescription)
defaultAlignment - the default alignmentencodedDescription - the encoded descriptionpublic final FormSpec.DefaultAlignment getDefaultAlignment()
public final boolean getDefaultAlignmentExplictlySet()
true if the default alignment has been provide
during the parse process, false if the default alignmen
has been set by the constructor at the instance creation timepublic final Size getSize()
public final double getResizeWeight()
public final String toString()
not return an encoded versio of this object; the contrary is the case. Many instance will return a string that cannot be parsed.
Note: The string representation may change at any time
For parsing use encode() instead.
public final String toShortString()
not return an encoded versio of this object; the contrary is the case. Many instance will return a string that cannot be parsed.
Note: The string representation may change at any time
For parsing use encode() instead.
public final String encode()
for a more verbose string representationCopyright © 2002-2014 JGoodies Software GmbH. All Rights Reserved.