public class DefaultLabelLayouts extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<TacticalGraphicSymbol.LabelLayout>> |
layouts
Map to hold layouts.
|
| Constructor and Description |
|---|
DefaultLabelLayouts()
Create the map and populate it with the default layouts.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLayout(List<TacticalGraphicSymbol.LabelLayout> layoutList,
String key,
Offset... offsets)
Add a layout to a layout map, possibly replacing an existing layout.
|
protected List<TacticalGraphicSymbol.LabelLayout> |
createLayout(String key,
Offset offset,
Offset hotspot)
Create a simple layout map and populate it with one key value pair.
|
List<TacticalGraphicSymbol.LabelLayout> |
get(String sidc)
Indicates the layout for a particular type of graphic.
|
protected void |
populateMap()
Populate the map with the default layouts.
|
protected void |
putAll(List<TacticalGraphicSymbol.LabelLayout> value,
String... keys)
Map one value to many keys.
|
protected Map<String,List<TacticalGraphicSymbol.LabelLayout>> layouts
public DefaultLabelLayouts()
protected void addLayout(List<TacticalGraphicSymbol.LabelLayout> layoutList, String key, Offset... offsets)
layoutList - List to which to add an entry.key - Modifier key.offsets - List of offsets from which to create one or more LabelLayout objects. The offsets are specified
in pairs: first the image offset and then the label offset. If multiple pairs are provided,
then multiple LabelLayouts will be created and added to the map.IllegalArgumentException - if offsets does not have even length.protected List<TacticalGraphicSymbol.LabelLayout> createLayout(String key, Offset offset, Offset hotspot)
key - Modifier key.offset - Offset within the image at which to place the label.hotspot - Offset within the label to align with the label point in the image.public List<TacticalGraphicSymbol.LabelLayout> get(String sidc)
sidc - Symbol code of the graphic.protected void populateMap()
protected void putAll(List<TacticalGraphicSymbol.LabelLayout> value, String... keys)
value - Value to add.keys - Keys that map to the value.