Class MultipleNameVisitor
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.util.NameVisitor
-
- org.openstreetmap.josm.data.validation.util.MultipleNameVisitor
-
- All Implemented Interfaces:
OsmPrimitiveVisitor
public class MultipleNameVisitor extends NameVisitor
Able to create a name and an icon for a collection of elements.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
displayName
Name to be displayedprivate static javax.swing.Icon
MULTI_CLASS_ICON
private static java.lang.String
MULTI_CLASS_NAME
static IntegerProperty
MULTIPLE_NAME_MAX_LENGTH
Maximum displayed length, in characters.-
Fields inherited from class org.openstreetmap.josm.data.validation.util.NameVisitor
className, classNamePlural, icon, name
-
-
Constructor Summary
Constructors Constructor Description MultipleNameVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.Icon
getIcon()
Gets the icon of the itemsjava.lang.String
getText()
Gets the name of the itemsjavax.swing.JLabel
toLabel()
Returns an horizontalJLabel
with icon and name.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
setIcon, visit, visit, visit
-
-
-
-
Field Detail
-
MULTIPLE_NAME_MAX_LENGTH
public static final IntegerProperty MULTIPLE_NAME_MAX_LENGTH
Maximum displayed length, in characters.
-
MULTI_CLASS_NAME
private static final java.lang.String MULTI_CLASS_NAME
- See Also:
- Constant Field Values
-
MULTI_CLASS_ICON
private static final javax.swing.Icon MULTI_CLASS_ICON
-
displayName
private java.lang.String displayName
Name to be displayed
-
-
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()
Description copied from class:NameVisitor
Returns an horizontalJLabel
with icon and name.- Overrides:
toLabel
in classNameVisitor
- Returns:
- horizontal
JLabel
with icon and name
-
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 classjava.lang.Object
-
-