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.StringdisplayNameName to be displayedprivate static javax.swing.IconMULTI_CLASS_ICONprivate static java.lang.StringMULTI_CLASS_NAMEstatic IntegerPropertyMULTIPLE_NAME_MAX_LENGTHMaximum 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.IcongetIcon()Gets the icon of the itemsjava.lang.StringgetText()Gets the name of the itemsjavax.swing.JLabeltoLabel()Returns an horizontalJLabelwith icon and name.java.lang.StringtoString()voidvisit(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:NameVisitorReturns an horizontalJLabelwith icon and name.- Overrides:
toLabelin classNameVisitor- Returns:
- horizontal
JLabelwith 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:
toStringin classjava.lang.Object
-
-