public class DefaultLabelLayouts
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,java.util.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(java.util.List<TacticalGraphicSymbol.LabelLayout> layoutList,
java.lang.String key,
Offset... offsets)
Add a layout to a layout map, possibly replacing an existing layout.
|
protected java.util.List<TacticalGraphicSymbol.LabelLayout> |
createLayout(java.lang.String key,
Offset offset,
Offset hotspot)
Create a simple layout map and populate it with one key value pair.
|
java.util.List<TacticalGraphicSymbol.LabelLayout> |
get(java.lang.String sidc)
Indicates the layout for a particular type of graphic.
|
protected void |
populateMap()
Populate the map with the default layouts.
|
protected void |
putAll(java.util.List<TacticalGraphicSymbol.LabelLayout> value,
java.lang.String... keys)
Map one value to many keys.
|
protected java.util.Map<java.lang.String,java.util.List<TacticalGraphicSymbol.LabelLayout>> layouts
public DefaultLabelLayouts()
protected void addLayout(java.util.List<TacticalGraphicSymbol.LabelLayout> layoutList, java.lang.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.java.lang.IllegalArgumentException - if offsets does not have even length.protected java.util.List<TacticalGraphicSymbol.LabelLayout> createLayout(java.lang.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 java.util.List<TacticalGraphicSymbol.LabelLayout> get(java.lang.String sidc)
sidc - Symbol code of the graphic.protected void populateMap()
protected void putAll(java.util.List<TacticalGraphicSymbol.LabelLayout> value, java.lang.String... keys)
value - Value to add.keys - Keys that map to the value.