org.openstreetmap.josm.data.validation.util
Class MultipleNameVisitor

java.lang.Object
  extended by org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
      extended by org.openstreetmap.josm.data.validation.util.NameVisitor
          extended by 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.


Field Summary
private  java.lang.String displayName
           
static int MULTIPLE_NAME_MAX_LENGTH
           
private  java.lang.String multipleClassname
          The class name of the combined primitives
private  int size
          Size of the collection
 
Fields inherited from class org.openstreetmap.josm.data.validation.util.NameVisitor
className, classNamePlural, icon, name
 
Constructor Summary
MultipleNameVisitor()
           
 
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 org.openstreetmap.josm.data.validation.util.NameVisitor
visit, visit, visit
 
Methods inherited from class org.openstreetmap.josm.data.osm.visitor.AbstractVisitor
visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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

Constructor Detail

MultipleNameVisitor

public MultipleNameVisitor()
Method Detail

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