|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openstreetmap.josm.gui.DefaultNameFormatter
public class DefaultNameFormatter
This is the default implementation of a NameFormatter for names of OsmPrimitives.
| Field Summary | |
|---|---|
static java.lang.String[] |
DEFAULT_NAMING_TAGS_FOR_RELATIONS
the default list of tags which are used as naming tags in relations |
| Constructor Summary | |
|---|---|
DefaultNameFormatter()
|
|
| Method Summary | |
|---|---|
java.lang.String |
buildDefaultToolTip(org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive primitive)
Builds a default tooltip text for an HistoryOsmPrimitive primitive. |
java.lang.String |
buildDefaultToolTip(org.openstreetmap.josm.data.osm.IPrimitive primitive)
Builds a default tooltip text for the primitive primitive. |
protected void |
decorateNameWithId(java.lang.StringBuilder name,
org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive primitive)
Decorates the name of primitive with its id, if the preference osm-primitives.showid is set. |
protected java.lang.String |
decorateNameWithId(java.lang.String name,
org.openstreetmap.josm.data.osm.IPrimitive primitive)
Decorates the name of primitive with its id, if the preference osm-primitives.showid is set. |
java.lang.String |
format(org.openstreetmap.josm.data.osm.Changeset changeset)
Formats a name for a changeset |
java.lang.String |
format(org.openstreetmap.josm.data.osm.history.HistoryNode node)
Formats a name for a history node |
java.lang.String |
format(org.openstreetmap.josm.data.osm.history.HistoryRelation relation)
Formats a name for a HistoryRelation) |
java.lang.String |
format(org.openstreetmap.josm.data.osm.history.HistoryWay way)
Formats a name for a way |
java.lang.String |
format(org.openstreetmap.josm.data.osm.INode node)
Formats a name for a node |
java.lang.String |
format(org.openstreetmap.josm.data.osm.IRelation relation)
Formats a name for a relation |
java.lang.String |
format(org.openstreetmap.josm.data.osm.IWay way)
Formats a name for a way |
static DefaultNameFormatter |
getInstance()
Replies the unique instance of this formatter |
static java.util.List<java.lang.String> |
getNamingtagsForRelations()
Replies the list of naming tags used in relations. |
java.util.Comparator<org.openstreetmap.josm.data.osm.Node> |
getNodeComparator()
|
java.util.Comparator<org.openstreetmap.josm.data.osm.Relation> |
getRelationComparator()
|
java.util.Comparator<org.openstreetmap.josm.data.osm.Way> |
getWayComparator()
|
static void |
registerFormatHook(NameFormatterHook hook)
Registers a format hook. |
static void |
unregisterFormatHook(NameFormatterHook hook)
Unregisters a format hook. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String[] DEFAULT_NAMING_TAGS_FOR_RELATIONS
| Constructor Detail |
|---|
public DefaultNameFormatter()
| Method Detail |
|---|
public static DefaultNameFormatter getInstance()
public static void registerFormatHook(NameFormatterHook hook)
hook - the format hook. Ignored if null.public static void unregisterFormatHook(NameFormatterHook hook)
hook - the format hook. Ignored if null.public static java.util.List<java.lang.String> getNamingtagsForRelations()
DEFAULT_NAMING_TAGS_FOR_RELATIONS
protected java.lang.String decorateNameWithId(java.lang.String name,
org.openstreetmap.josm.data.osm.IPrimitive primitive)
name - the name without the idprimitive - the primitive
public java.lang.String format(org.openstreetmap.josm.data.osm.INode node)
format in interface org.openstreetmap.josm.data.osm.NameFormatternode - the node
public java.util.Comparator<org.openstreetmap.josm.data.osm.Node> getNodeComparator()
getNodeComparator in interface org.openstreetmap.josm.data.osm.NameFormatterpublic java.lang.String format(org.openstreetmap.josm.data.osm.IWay way)
format in interface org.openstreetmap.josm.data.osm.NameFormatterway - the way
public java.util.Comparator<org.openstreetmap.josm.data.osm.Way> getWayComparator()
getWayComparator in interface org.openstreetmap.josm.data.osm.NameFormatterpublic java.lang.String format(org.openstreetmap.josm.data.osm.IRelation relation)
format in interface org.openstreetmap.josm.data.osm.NameFormatterrelation - the relation
public java.util.Comparator<org.openstreetmap.josm.data.osm.Relation> getRelationComparator()
getRelationComparator in interface org.openstreetmap.josm.data.osm.NameFormatterpublic java.lang.String format(org.openstreetmap.josm.data.osm.Changeset changeset)
format in interface org.openstreetmap.josm.data.osm.NameFormatterchangeset - the changeset
public java.lang.String buildDefaultToolTip(org.openstreetmap.josm.data.osm.IPrimitive primitive)
primitive.
primitive - the primitmive
protected void decorateNameWithId(java.lang.StringBuilder name,
org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive primitive)
StringBuilder passed in in name.
name - the name without the idprimitive - the primitivepublic java.lang.String format(org.openstreetmap.josm.data.osm.history.HistoryNode node)
format in interface org.openstreetmap.josm.data.osm.history.HistoryNameFormatternode - the node
public java.lang.String format(org.openstreetmap.josm.data.osm.history.HistoryWay way)
format in interface org.openstreetmap.josm.data.osm.history.HistoryNameFormatterway - the way
public java.lang.String format(org.openstreetmap.josm.data.osm.history.HistoryRelation relation)
HistoryRelation)
format in interface org.openstreetmap.josm.data.osm.history.HistoryNameFormatterrelation - the relation
public java.lang.String buildDefaultToolTip(org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive primitive)
primitive.
primitive - the primitmive
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||