org.openstreetmap.josm.data.validation.util
Class MultipleNameVisitor
java.lang.Object
org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
org.openstreetmap.josm.data.validation.util.NameVisitor
org.openstreetmap.josm.data.validation.util.MultipleNameVisitor
- All Implemented Interfaces:
- Visitor
public class MultipleNameVisitor
- extends NameVisitor
Able to create a name and an icon for a collection of elements.
Method Summary |
javax.swing.Icon |
getIcon()
Gets the icon of the items |
java.lang.String |
getText()
Gets the name of the items |
javax.swing.JLabel |
toLabel()
|
java.lang.String |
toString()
|
void |
visit(java.util.Collection<? extends OsmPrimitive> data)
Visits a collection of primitives |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MULTIPLE_NAME_MAX_LENGTH
public static final int MULTIPLE_NAME_MAX_LENGTH
- See Also:
- Constant Field Values
multipleClassname
private java.lang.String multipleClassname
- The class name of the combined primitives
displayName
private java.lang.String displayName
size
private int size
- Size of the collection
MultipleNameVisitor
public MultipleNameVisitor()
visit
public void visit(java.util.Collection<? extends OsmPrimitive> data)
- Visits a collection of primitives
- Parameters:
data
- The collection of primitives
toLabel
public javax.swing.JLabel toLabel()
- Overrides:
toLabel
in class NameVisitor
getText
public java.lang.String getText()
- Gets the name of the items
- Returns:
- the name of the items
getIcon
public javax.swing.Icon getIcon()
- Gets the icon of the items
- Returns:
- the icon of the items
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
JOSM