Class LabelCompositionStrategy.TagLookupCompositionStrategy
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy.TagLookupCompositionStrategy
-
- All Implemented Interfaces:
LabelCompositionStrategy
- Enclosing interface:
- LabelCompositionStrategy
public static class LabelCompositionStrategy.TagLookupCompositionStrategy extends Object implements LabelCompositionStrategy
Strategy where the label is given by the content of a tag whose name specified in the MapCSS style file.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy
LabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy, LabelCompositionStrategy.StaticLabelCompositionStrategy, LabelCompositionStrategy.TagLookupCompositionStrategy
-
-
Field Summary
Fields Modifier and Type Field Description private String
defaultLabelTag
-
Constructor Summary
Constructors Constructor Description TagLookupCompositionStrategy(String defaultLabelTag)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
compose(IPrimitive primitive)
Replies the text value to be rendered as label for the primitiveprimitive
.boolean
equals(Object obj)
String
getDefaultLabelTag()
int
hashCode()
String
toString()
-
-
-
Field Detail
-
defaultLabelTag
private final String defaultLabelTag
-
-
Constructor Detail
-
TagLookupCompositionStrategy
public TagLookupCompositionStrategy(String defaultLabelTag)
-
-
Method Detail
-
compose
public String compose(IPrimitive primitive)
Description copied from interface:LabelCompositionStrategy
Replies the text value to be rendered as label for the primitiveprimitive
.- Specified by:
compose
in interfaceLabelCompositionStrategy
- Parameters:
primitive
- the primitive- Returns:
- the text value to be rendered or null, if primitive is null or if no suitable value could be composed
-
getDefaultLabelTag
public String getDefaultLabelTag()
-
-