public class NameVisitor extends java.lang.Object implements OsmPrimitiveVisitor
Modifier and Type | Field and Description |
---|---|
java.lang.String |
className
The name of the item class
|
java.lang.String |
classNamePlural
The plural name of the item class
|
javax.swing.Icon |
icon
The icon of this item.
|
java.lang.String |
name
The name of this item.
|
Constructor and Description |
---|
NameVisitor() |
Modifier and Type | Method and Description |
---|---|
javax.swing.JLabel |
toLabel()
Returns an horizontal
JLabel with icon and name. |
void |
visit(Node n)
If the node has a name-key or id-key, this is displayed.
|
void |
visit(Relation e)
Visiting call for relations.
|
void |
visit(Way w)
If the way has a name-key or id-key, this is displayed.
|
public java.lang.String className
public java.lang.String classNamePlural
public java.lang.String name
public javax.swing.Icon icon
public NameVisitor()
public void visit(Node n)
visit
in interface OsmPrimitiveVisitor
n
- The node to inspect.public void visit(Way w)
visit
in interface OsmPrimitiveVisitor
w
- The way to inspect.public void visit(Relation e)
OsmPrimitiveVisitor
visit
in interface OsmPrimitiveVisitor
e
- The relation to inspect.public javax.swing.JLabel toLabel()
JLabel
with icon and name.JLabel
with icon and name