Class LabelCompositionStrategy.StaticLabelCompositionStrategy
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.styleelement.LabelCompositionStrategy.StaticLabelCompositionStrategy
-
- All Implemented Interfaces:
LabelCompositionStrategy
- Enclosing interface:
- LabelCompositionStrategy
public static class LabelCompositionStrategy.StaticLabelCompositionStrategy extends Object implements LabelCompositionStrategy
Strategy where the label is given by a static text 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
defaultLabel
-
Constructor Summary
Constructors Constructor Description StaticLabelCompositionStrategy(String defaultLabel)
-
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
getDefaultLabel()
int
hashCode()
String
toString()
-
-
-
Field Detail
-
defaultLabel
private final String defaultLabel
-
-
Constructor Detail
-
StaticLabelCompositionStrategy
public StaticLabelCompositionStrategy(String defaultLabel)
-
-
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
-
getDefaultLabel
public String getDefaultLabel()
-
-