Class NameVisitor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String className
      The name of the item class
      java.lang.String classNamePlural
      The plural name of the item class
      javax.swing.Icon icon
      The icon of this item.
      java.lang.String name
      The name of this item.
    • Constructor Summary

      Constructors 
      Constructor Description
      NameVisitor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void setIcon​(OsmPrimitive p)  
      javax.swing.JLabel toLabel()
      Returns an horizontal JLabel with icon and name.
      void visit​(Node n)
      If the node has a name-key or id-key, this is displayed.
      void visit​(Relation e)
      Visiting call for relations.
      void visit​(Way w)
      If the way has a name-key or id-key, this is displayed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • className

        public java.lang.String className
        The name of the item class
      • classNamePlural

        public java.lang.String classNamePlural
        The plural name of the item class
      • name

        public java.lang.String name
        The name of this item.
      • icon

        public javax.swing.Icon icon
        The icon of this item.
    • Method Detail

      • visit

        public void visit​(Node n)
        If the node has a name-key or id-key, this is displayed. If not, (lat,lon) is displayed.
        Specified by:
        visit in interface OsmPrimitiveVisitor
        Parameters:
        n - The node to inspect.
      • visit

        public void visit​(Way w)
        If the way has a name-key or id-key, this is displayed. If not, (x nodes) is displayed with x being the number of nodes in the way.
        Specified by:
        visit in interface OsmPrimitiveVisitor
        Parameters:
        w - The way to inspect.
      • toLabel

        public javax.swing.JLabel toLabel()
        Returns an horizontal JLabel with icon and name.
        Returns:
        horizontal JLabel with icon and name