java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.impl.AbstractMarkerSymbol
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.impl.PictureMarkerSymbol
All Implemented Interfaces:
Cloneable, org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport, org.gvsig.fmap.mapcontext.rendering.symbols.IPrintable, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol, org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol_v2, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent

public class PictureMarkerSymbol extends AbstractMarkerSymbol implements org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol
PictureMarkerSymbol allows to use an image file as a definition to be painted instead of a marker symbol.
  • Field Details

    • PICTURE_MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME

      public static final String PICTURE_MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • PictureMarkerSymbol

      public PictureMarkerSymbol()
    • PictureMarkerSymbol

      public PictureMarkerSymbol(URL imageURL, URL selImageURL) throws IOException
      Constructor method
      Parameters:
      imageURL - , URL of the normal image
      selImageURL - , URL of the image when it is selected in the map
      Throws:
      IOException
  • Method Details

    • setImage

      public final void setImage(URL imageUrl) throws IOException
      Sets the file for the image to be used as a marker symbol
      Specified by:
      setImage in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol
      Parameters:
      imageUrl -
      Throws:
      IOException
    • setSelImage

      public final void setSelImage(URL imageFileUrl) throws IOException
      Sets the file for the image to be used as a marker symbol (when it is selected in the map)
      Specified by:
      setSelImage in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol
      Parameters:
      imageFileUrl -
      Throws:
      IOException
    • getSymbolForSelection

      public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getSymbolForSelection(Color selectionColor)
      Specified by:
      getSymbolForSelection in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
      Overrides:
      getSymbolForSelection in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
    • draw

      public void draw(Graphics2D g, AffineTransform affineTransform, org.gvsig.fmap.geom.Geometry geom, org.gvsig.fmap.dal.feature.Feature f, org.gvsig.tools.task.Cancellable cancel, Rectangle r)
      Specified by:
      draw in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
    • getClassName

      public String getClassName()
    • getSource

      public URL getSource()
      Returns the URL of the image that is used as a marker symbol
      Specified by:
      getSource in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol
      Returns:
      imagePath,URL
    • getSelectedSource

      public URL getSelectedSource()
      Returns the URL of the image that is used as a marker symbol (when it is selected in the map)
      Specified by:
      getSelectedSource in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol
      Returns:
      selimagePath,URL
    • clone

      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class AbstractMarkerSymbol
      Throws:
      CloneNotSupportedException
    • loadFromState

      public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      loadFromState in interface org.gvsig.tools.persistence.Persistent
      Overrides:
      loadFromState in class AbstractMarkerSymbol
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • saveToState

      public void saveToState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException
      Specified by:
      saveToState in interface org.gvsig.tools.persistence.Persistent
      Overrides:
      saveToState in class AbstractMarkerSymbol
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • getRequiredFeatureAttributeNames

      public String[] getRequiredFeatureAttributeNames(org.gvsig.fmap.dal.feature.FeatureStore featureStore) throws org.gvsig.fmap.dal.exception.DataException
      Overrides:
      getRequiredFeatureAttributeNames in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • setFeature

      public void setFeature(org.gvsig.fmap.dal.feature.Feature feature)
      Specified by:
      setFeature in interface org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol
      Overrides:
      setFeature in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractSymbol