org.openstreetmap.josm.gui.mappaint
Class LabelCompositionStrategy

java.lang.Object
  extended by org.openstreetmap.josm.gui.mappaint.LabelCompositionStrategy
Direct Known Subclasses:
LabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy, LabelCompositionStrategy.StaticLabelCompositionStrategy, LabelCompositionStrategy.TagLookupCompositionStrategy

public abstract class LabelCompositionStrategy
extends java.lang.Object

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:


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

LabelCompositionStrategy

public LabelCompositionStrategy()
Method Detail

compose

public abstract java.lang.String compose(OsmPrimitive primitive)
Replies the text value to be rendered as label for the primitive primitive.

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


JOSM