Package com.jgoodies.forms.layout
Class FormSpecParser
java.lang.Object
com.jgoodies.forms.layout.FormSpecParser
Parses encoded column and row specifications.
Returns ColumnSpec or RowSpec arrays if successful,
and aims to provide useful information in case of a syntax error.
- Version:
- $Revision: 1.12 $
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Used by the parser for encoded column and row specifications.(package private) static final class
Internal helper class that is returned bymultiplier(String, int)
. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
FormSpecParser
(String source, String description, LayoutMap layoutMap, boolean horizontal) Constructs a parser for the given encoded column/row specification, the given LayoutMap, and orientation. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
fail
(int index, NumberFormatException cause) private void
static void
private static String
private FormSpecParser.Multiplier
multiplier
(String expression, int offset) private ColumnSpec[]
(package private) static ColumnSpec[]
parseColumnSpecs
(String encodedColumnSpecs, LayoutMap layoutMap) private RowSpec[]
(package private) static RowSpec[]
parseRowSpecs
(String encodedRowSpecs, LayoutMap layoutMap)
-
Field Details
-
MULTIPLIER_PREFIX_PATTERN
-
DIGIT_PATTERN
-
source
-
layoutMap
-
-
Constructor Details
-
FormSpecParser
Constructs a parser for the given encoded column/row specification, the given LayoutMap, and orientation.- Parameters:
source
- the raw encoded column or row specification as provided by the userdescription
- describes the source, e.g. "column specification"layoutMap
- maps layout variable names to ColumnSpec and RowSpec objectshorizontal
-true
for columns,false
for rows- Throws:
NullPointerException
- ifsource
orlayoutMap
isnull
-
-
Method Details
-
parseColumnSpecs
-
parseRowSpecs
-
parseColumnSpecs
-
parseRowSpecs
-
split
-
addSpec
-
multiplier
-
fail
-
fail
-
fail
-
message
-