public final class LayoutMap extends Object
new FormLayout("pref, $lcg, pref") o
new FormLayout("pref, ${lcg}, pref").
getRoot(). Application-wid
variables should be defined in the root LayoutMap. If you want to overrid
application-wide variables locally, obtain a LayoutMap using new LayoutMap(), configure it, and provide it as argument to th
FormLayout, ColumnSpec, and RowSpec constructors/factory methods.
Examples: "pref, $lcgap, $half, 2dlu, $half" "p, $lcgap, $table") Tips:
FormLayout,
ColumnSpec,
RowSpec| Constructor and Description |
|---|
LayoutMap()
Constructs a LayoutMap that has the root LayoutMap as parent.
|
LayoutMap(LayoutMap parent)
Constructs a LayoutMap with the given optional parent.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
columnContainsKey(String key)
Returns
true if this map or a parent map - if any - contain
a mapping for the specified key. |
String |
columnGet(String key)
Looks up and returns the String associated with the given key.
|
String |
columnPut(String key,
ColumnSpec value) |
String |
columnPut(String key,
Size value) |
String |
columnPut(String key,
String value)
Associates the specified column String with the specified ke
in this map.
|
String |
columnRemove(String key)
Removes the column value mapping for this key from this map if it i
present.
|
static LayoutMap |
getRoot()
Lazily initializes and returns the LayoutMap that is use
for variable expansion, if no custom LayoutMap is provided.
|
boolean |
rowContainsKey(String key)
Returns
true if this map or a parent map - if any - contain
a RowSpec mapping for the specified key. |
String |
rowGet(String key)
Looks up and returns the RowSpec associated with the given key.
|
String |
rowPut(String key,
RowSpec value)
Associates the specified ColumnSpec with the specified key in this map.
|
String |
rowPut(String key,
Size value) |
String |
rowPut(String key,
String value) |
String |
rowRemove(String key)
Removes the row value mapping for this key from this map if it i
present.
|
String |
toString()
Returns a string representation of this LayoutMap that list
the column and row associations.
|
public LayoutMap()
public LayoutMap(LayoutMap parent)
parent - the parent LayoutMap, may be nullpublic static LayoutMap getRoot()
public boolean columnContainsKey(String key)
true if this map or a parent map - if any - contain
a mapping for the specified key.key - key whose presence in this LayoutMap chain is to be tested.true if this map contains a column mappin
for the specified key.NullPointerException - if the key is null.Map.containsKey(Object)public String columnGet(String key)
key - key whose associated value is to be returned.key
or null if no LayoutMap in the parent chai
contains an association.NullPointerException - if key is nullMap.get(Object)public String columnPut(String key, String value)
value must not be null. To remov
an association from this map use columnRemove(String).
key - key with which the specified value is to be associated.value - column expression value to be associated with the specified key.null if there was no mapping for key.NullPointerException - if the key or valuenull.Map.put(Object, Object)public String columnPut(String key, ColumnSpec value)
public String columnRemove(String key)
null if the map contained no mapping for this key The map will not contain a String mapping for the specified ke once the call returns.
key - key whose mapping is to be removed from the map.null
NullPointerException - if key is null.Map.remove(Object)public boolean rowContainsKey(String key)
true if this map or a parent map - if any - contain
a RowSpec mapping for the specified key.key - key whose presence in this LayoutMap chain is to be tested.true if this map contains a row mappin
for the specified key.NullPointerException - if the key is null.Map.containsKey(Object)public String rowGet(String key)
key - key whose associated value is to be returned.key
or null if no LayoutMap in the parent chai
contains an association.NullPointerException - if key is nullMap.get(Object)public String rowPut(String key, RowSpec value)
null. To remove an associatio
from this map use rowRemove(String).
key - key with which the specified value is to be associated.value - ColumnSpec to be associated with the specified key.null if there was no mapping for key.NullPointerException - if the key or valuenull.Map.put(Object, Object)public String rowRemove(String key)
null if the map contained no mapping for this key The map will not contain a String mapping for the specified ke once the call returns.
key - key whose mapping is to be removed from the map.null
NullPointerException - if key is null.Map.remove(Object)Copyright © 2002-2014 JGoodies Software GmbH. All Rights Reserved.