|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.forms.layout.FormSpec
com.jgoodies.forms.layout.RowSpec
public final class RowSpec
Specifies rows in FormLayout by their default orientation, start size and resizing behavior.
Examples:
The following examples specify a centered row with a size of 14 dlu
that won't grow.
new RowSpec(Sizes.dluX(14)); new RowSpec(RowSpec.CENTER, Sizes.dluX(14), 0.0); new RowSpec(rowSpec.CENTER, Sizes.dluX(14), RowSpec.NO_GROW); RowSpec.parse("14dlu"); RowSpec.parse("14dlu:0"); RowSpec.parse("center:14dlu:0");
The FormSpecs
provides
predefined frequently used RowSpec instances.
FormSpecs
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class com.jgoodies.forms.layout.FormSpec |
---|
FormSpec.DefaultAlignment |
Field Summary | |
---|---|
static FormSpec.DefaultAlignment |
BOTTOM
By default put the components in the bottom. |
static FormSpec.DefaultAlignment |
CENTER
By default put the components in the center. |
static FormSpec.DefaultAlignment |
DEFAULT
Unless overridden the default alignment for a row is CENTER. |
static FormSpec.DefaultAlignment |
FILL
By default fill the component into the row. |
static FormSpec.DefaultAlignment |
TOP
By default put the components in the top. |
Fields inherited from class com.jgoodies.forms.layout.FormSpec |
---|
DEFAULT_GROW, NO_GROW |
Constructor Summary | |
---|---|
RowSpec(FormSpec.DefaultAlignment defaultAlignment,
Size size,
double resizeWeight)
Constructs a RowSpec from the given default orientation, size, and resize weight. |
|
RowSpec(Size size)
Constructs a RowSpec for the given size using the default alignment, and no resizing. |
Method Summary | |
---|---|
static RowSpec |
createGap(ConstantSize gapHeight)
Creates and returns a RowSpec that represents a gap with the
specified ConstantSize . |
static RowSpec |
decode(String encodedRowSpec)
Parses the encoded row specification and returns a RowSpec object that represents the string. |
static RowSpec |
decode(String encodedRowSpec,
LayoutMap layoutMap)
Parses the encoded row specifications and returns a RowSpec object that represents the string. |
static RowSpec[] |
decodeSpecs(String encodedRowSpecs)
Parses and splits encoded row specifications using the default LayoutMap and returns an array of RowSpec objects. |
static RowSpec[] |
decodeSpecs(String encodedRowSpecs,
LayoutMap layoutMap)
Parses and splits encoded row specifications using the given LayoutMap and returns an array of RowSpec objects. |
protected boolean |
isHorizontal()
Returns if this is a horizontal specification (vs. vertical). |
Methods inherited from class com.jgoodies.forms.layout.FormSpec |
---|
encode, getDefaultAlignment, getResizeWeight, getSize, toShortString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final FormSpec.DefaultAlignment TOP
public static final FormSpec.DefaultAlignment CENTER
public static final FormSpec.DefaultAlignment BOTTOM
public static final FormSpec.DefaultAlignment FILL
public static final FormSpec.DefaultAlignment DEFAULT
Constructor Detail |
---|
public RowSpec(FormSpec.DefaultAlignment defaultAlignment, Size size, double resizeWeight)
The resize weight must be a non-negative double; you can use
NO_FILL
as a convenience value for no resize.
defaultAlignment
- the row's default alignmentsize
- constant size, component size, or bounded sizeresizeWeight
- the row's non-negative resize weight
IllegalArgumentException
- if the size is invalid or
the resize weight is negativepublic RowSpec(Size size)
size
- constant size, component size, or bounded size
IllegalArgumentException
- if the size is invalidMethod Detail |
---|
public static RowSpec createGap(ConstantSize gapHeight)
RowSpec
that represents a gap with the
specified ConstantSize
.
gapHeight
- specifies the gap height
NullPointerException
- if gapHeight
is null
public static RowSpec decode(String encodedRowSpec)
encodedRowSpec
- the encoded row specification
NullPointerException
- if encodedRowSpec
is null
decode(String, LayoutMap)
,
LayoutMap.getRoot()
public static RowSpec decode(String encodedRowSpec, LayoutMap layoutMap)
encodedRowSpec
- the encoded column specificationlayoutMap
- expands layout row variables
NullPointerException
- if encodedRowSpec
or
layoutMap
is null
decodeSpecs(String, LayoutMap)
public static RowSpec[] decodeSpecs(String encodedRowSpecs)
LayoutMap
and returns an array of RowSpec objects.
encodedRowSpecs
- comma separated encoded row specifications
NullPointerException
- if encodedRowSpecs
is null
decodeSpecs(String, LayoutMap)
,
decode(String)
,
LayoutMap.getRoot()
public static RowSpec[] decodeSpecs(String encodedRowSpecs, LayoutMap layoutMap)
LayoutMap
and returns an array of RowSpec objects.
encodedRowSpecs
- comma separated encoded row specificationslayoutMap
- expands layout row variables
NullPointerException
- encodedRowSpecs
or
layoutMap
is null
RowSpec(String)
protected boolean isHorizontal()
false
(for vertical)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |