Class AbstractMapObject

    • Field Detail

      • layer

        protected org.openstreetmap.gui.jmapviewer.Layer layer
      • style

        protected org.openstreetmap.gui.jmapviewer.Style style
      • visible

        protected Boolean visible
      • timestamp

        protected Date timestamp
        the timestamp.
    • Constructor Detail

      • AbstractMapObject

        public AbstractMapObject​(String name)
      • AbstractMapObject

        public AbstractMapObject​(org.openstreetmap.gui.jmapviewer.Layer layer)
      • AbstractMapObject

        public AbstractMapObject​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                 String name,
                                 org.openstreetmap.gui.jmapviewer.Style style)
    • Method Detail

      • getLayer

        public org.openstreetmap.gui.jmapviewer.Layer getLayer()
        Specified by:
        getLayer in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setLayer

        public void setLayer​(org.openstreetmap.gui.jmapviewer.Layer layer)
        Specified by:
        setLayer in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • getStyle

        public org.openstreetmap.gui.jmapviewer.Style getStyle()
        Specified by:
        getStyle in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • getStyleAssigned

        public org.openstreetmap.gui.jmapviewer.Style getStyleAssigned()
        Specified by:
        getStyleAssigned in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setStyle

        public void setStyle​(org.openstreetmap.gui.jmapviewer.Style style)
      • getColor

        public Color getColor()
        Specified by:
        getColor in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setColor

        public void setColor​(Color color)
      • getBackColor

        public Color getBackColor()
        Specified by:
        getBackColor in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setBackColor

        public void setBackColor​(Color backColor)
      • getStroke

        public Stroke getStroke()
        Specified by:
        getStroke in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setStroke

        public void setStroke​(Stroke stroke)
      • getFont

        public Font getFont()
        Specified by:
        getFont in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setFont

        public void setFont​(Font font)
      • isVisible

        public boolean isVisible()
        Specified by:
        isVisible in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setVisible

        public void setVisible​(Boolean visible)
      • getName

        public String getName()
        Specified by:
        getName in interface org.openstreetmap.gui.jmapviewer.interfaces.MapObject
      • setName

        public void setName​(String txt)
      • setTimestamp

        public void setTimestamp​(Date value)
        Sets the timestamp.
        Specified by:
        setTimestamp in interface TimestampSupporter
        Parameters:
        value - the new timestamp
      • addMetaData

        public Object addMetaData​(String key,
                                  Object value)
        Adds a key-value pair to the meta-data store.
        Specified by:
        addMetaData in interface adams.core.MetaDataSupporter
        Specified by:
        addMetaData in interface MetaDataSupporter
        Parameters:
        key - the key to store the value for
        value - the value to store
        Returns:
        any previously stored object for this key, otherwise null
      • removeMetaData

        public Object removeMetaData​(String key)
        Removes a key-value pair from the meta-data store.
        Specified by:
        removeMetaData in interface adams.core.MetaDataSupporter
        Specified by:
        removeMetaData in interface MetaDataSupporter
        Parameters:
        key - the key to remove the value for
        Returns:
        any previously stored object for this key, null if none was present
      • getMetaData

        public Object getMetaData​(String key)
        Returns the specified value from the meta-data store.
        Specified by:
        getMetaData in interface adams.core.MetaDataSupporter
        Specified by:
        getMetaData in interface MetaDataSupporter
        Parameters:
        key - the key to retrieve the value for
        Returns:
        stored object for this key, null if none was present
      • getMetaData

        public HashMap<String,​Object> getMetaData()
        Returns the meta-data store.
        Specified by:
        getMetaData in interface adams.core.MetaDataSupporter
        Specified by:
        getMetaData in interface MetaDataSupporter
        Returns:
        the meta-data
      • metaDataKeys

        public Set<String> metaDataKeys()
        Returns the set of meta-data keys.
        Specified by:
        metaDataKeys in interface adams.core.MetaDataSupporter
        Specified by:
        metaDataKeys in interface MetaDataSupporter
        Returns:
        the meta-data keys
      • getDefaultFont

        public static Font getDefaultFont()
      • paintText

        public void paintText​(Graphics g,
                              Point position)