|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.gui.mappaint.LabelCompositionStrategy
public abstract class LabelCompositionStrategy
Provides an abstract parent class and three concrete sub classes for various strategies on how to compose the text label which can be rendered close to a node or within an area in an OSM map.
The three strategies below support three rules for composing a label:
LabelCompositionStrategy.StaticLabelCompositionStrategy
- the label is given by a static text
specified in the MapCSS style fileLabelCompositionStrategy.TagLookupCompositionStrategy
- the label is given by the content of a
tag whose name specified in the MapCSS style fileLabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy
- the label is given by the value
of one
of the configured "name tags". The list of relevant name tags can be configured
in the JOSM preferences
content of a tag whose name specified in the MapCSS style file, see the preference
option mappaint.nameOrder.
Nested Class Summary | |
---|---|
static class |
LabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy
|
static class |
LabelCompositionStrategy.StaticLabelCompositionStrategy
|
static class |
LabelCompositionStrategy.TagLookupCompositionStrategy
|
Constructor Summary | |
---|---|
LabelCompositionStrategy()
|
Method Summary | |
---|---|
abstract java.lang.String |
compose(OsmPrimitive primitive)
Replies the text value to be rendered as label for the primitive primitive . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LabelCompositionStrategy()
Method Detail |
---|
public abstract java.lang.String compose(OsmPrimitive primitive)
primitive
.
primitive
- the primitive
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |