|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.forms.layout.FormSpec
public abstract class FormSpec
An abstract class that specifies columns and rows in FormLayout
by their default alignment, start size and resizing behavior.
API users will use the subclasses ColumnSpec
and RowSpec
.
Also implements the parser for encoded column and row specifications and provides parser convenience behavior for its subclasses ColumnSpec and RowSpec.
TODO: Consider extracting the parser role to a separate class.
ColumnSpec
,
RowSpec
,
FormLayout
,
CellConstraints
,
Serialized FormNested Class Summary | |
---|---|
static class |
FormSpec.DefaultAlignment
An ordinal-based serializable typesafe enumeration for the column and row default alignment types. |
Field Summary | |
---|---|
static double |
DEFAULT_GROW
The default resize weight. |
static double |
NO_GROW
Gives a column or row a fixed size. |
Constructor Summary | |
---|---|
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,
java.lang.String encodedDescription)
Constructs a FormSpec from the specified encoded description. |
Method Summary | |
---|---|
java.lang.String |
encode()
Returns a short and parseable string representation of this form specification. |
FormSpec.DefaultAlignment |
getDefaultAlignment()
Returns the default alignment. |
double |
getResizeWeight()
Returns the current resize weight. |
Size |
getSize()
Returns the size. |
java.lang.String |
toShortString()
Returns a string representation of this form specification. |
java.lang.String |
toString()
Returns a string representation of this form specification. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double NO_GROW
public static final double DEFAULT_GROW
Constructor Detail |
---|
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-negative
double; you can use NONE
as a convenience value for no
resize.
defaultAlignment
- the spec's default alignmentsize
- a constant, component or bounded sizeresizeWeight
- the spec resize weight
java.lang.NullPointerException
- if the size
is null
java.lang.IllegalArgumentException
- if the resizeWeight
is negativeprotected FormSpec(FormSpec.DefaultAlignment defaultAlignment, java.lang.String encodedDescription)
defaultAlignment
- the default alignmentencodedDescription
- the encoded descriptionMethod Detail |
---|
public final FormSpec.DefaultAlignment getDefaultAlignment()
public final Size getSize()
public final double getResizeWeight()
public final java.lang.String toString()
This method does not return an encoded version of this object; the contrary is the case. Many instances will return a string that cannot be parsed.
Note: The string representation may change at any time.
For parsing use encode()
instead.
toString
in class java.lang.Object
public final java.lang.String toShortString()
This method does not return an encoded version of this object; the contrary is the case. Many instances will return a string that cannot be parsed.
Note: The string representation may change at any time.
For parsing use encode()
instead.
public final java.lang.String encode()
for a more verbose string representation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |