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 String
displayName
Name to be displayedprivate static Icon
MULTI_CLASS_ICON
private static 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 Icon
getIcon()
Gets the icon of the itemsString
getText()
Gets the name of the itemsJLabel
toLabel()
Returns an horizontalJLabel
with icon and name.String
toString()
void
visit(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 String MULTI_CLASS_NAME
- See Also:
- Constant Field Values
-
MULTI_CLASS_ICON
private static final Icon MULTI_CLASS_ICON
-
displayName
private String displayName
Name to be displayed
-
-
Constructor Detail
-
MultipleNameVisitor
public MultipleNameVisitor()
-
-
Method Detail
-
visit
public void visit(Collection<? extends OsmPrimitive> data)
Visits a collection of primitives- Parameters:
data
- The collection of primitives
-
toLabel
public 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
-
-