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.line.impl.AbstractLineSymbol
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.impl.PictureLineSymbol
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.line.ILineSymbol, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.IPictureLineSymbol, 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 PictureLineSymbol extends AbstractLineSymbol implements org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.IPictureLineSymbol
PictureLineSymbol allows to use any symbol defined as an image (by an image file) supported by gvSIG.This symbol will be used as an initial object.The line will be painted as a succession of puntual symbols through the path defined by it(the line).
  • Field Details

    • PICTURE_LINE_SYMBOL_PERSISTENCE_DEFINITION_NAME

      public static final String PICTURE_LINE_SYMBOL_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • PictureLineSymbol

      public PictureLineSymbol()
      Constructor method
    • PictureLineSymbol

      public PictureLineSymbol(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 void setImage(URL imageUrl) throws IOException
      Sets the URL for the image to be used as a picture line symbol
      Specified by:
      setImage in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol
      Parameters:
      imageFile - , File
      Throws:
      IOException
    • setSelImage

      public void setSelImage(URL selImageUrl) throws IOException
      Sets the URL for the image to be used as a picture line symbol (when it is selected in the map)
      Specified by:
      setSelImage in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IPictureMarkerSymbol
      Parameters:
      imageFile - , File
      Throws:
      IOException
    • setLineWidth

      public void setLineWidth(double width)
      Specified by:
      setLineWidth in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • getLineWidth

      public double getLineWidth()
      Specified by:
      getLineWidth in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.line.ILineSymbol
    • 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
    • getAdjustedSize

      protected double getAdjustedSize(Rectangle r, double size)
    • getClassName

      public String getClassName()
    • getSelectedSource

      public URL getSelectedSource()
      Returns the URL of the image that is used as a picture line 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
    • getSource

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

      public Object clone() throws CloneNotSupportedException
      Specified by:
      clone in interface org.gvsig.tools.lang.Cloneable
      Overrides:
      clone in class AbstractLineSymbol
      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 AbstractLineSymbol
      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 AbstractLineSymbol
      Throws:
      org.gvsig.tools.persistence.exception.PersistenceException
    • getSymbolTable

      protected org.gvsig.expressionevaluator.SymbolTable getSymbolTable(org.gvsig.fmap.dal.feature.Feature f)
    • getEfectiveLineToOffsetColor

      public Color getEfectiveLineToOffsetColor(org.gvsig.fmap.dal.feature.Feature f)
      Specified by:
      getEfectiveLineToOffsetColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getEfectiveOffset

      public Point2D getEfectiveOffset(org.gvsig.fmap.dal.feature.Feature f)
      Specified by:
      getEfectiveOffset in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getEfectiveRotationInDegres

      public double getEfectiveRotationInDegres(org.gvsig.fmap.dal.feature.Feature f)
      Specified by:
      getEfectiveRotationInDegres in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getEfectiveRotationInRadians

      public double getEfectiveRotationInRadians(org.gvsig.fmap.dal.feature.Feature f)
      Specified by:
      getEfectiveRotationInRadians in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getEfectiveSize

      public double getEfectiveSize(org.gvsig.fmap.dal.feature.Feature f)
      Specified by:
      getEfectiveSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getLineToOffsetColor

      public Color getLineToOffsetColor()
      Specified by:
      getLineToOffsetColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getLineToOffsetColorExpression

      public String getLineToOffsetColorExpression()
      Specified by:
      getLineToOffsetColorExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getOffsetXExpression

      public String getOffsetXExpression()
      Specified by:
      getOffsetXExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getOffsetYExpression

      public String getOffsetYExpression()
      Specified by:
      getOffsetYExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getRotationExpression

      public String getRotationExpression()
      Specified by:
      getRotationExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getSizeExpression

      public String getSizeExpression()
      Specified by:
      getSizeExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • isDrawLineToOffset

      public boolean isDrawLineToOffset()
      Specified by:
      isDrawLineToOffset in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • setDrawLineToOffset

      public void setDrawLineToOffset(boolean drawLineToOffset)
      Specified by:
      setDrawLineToOffset in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • setLineToOffsetColor

      public void setLineToOffsetColor(Color color)
      Specified by:
      setLineToOffsetColor in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • setLineToOffsetColorExpression

      public void setLineToOffsetColorExpression(String lineToOffsetColorExpression)
      Specified by:
      setLineToOffsetColorExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • setOffsetXExpression

      public void setOffsetXExpression(String offsetXExpression)
      Specified by:
      setOffsetXExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • setOffsetYExpression

      public void setOffsetYExpression(String offsetYExpression)
      Specified by:
      setOffsetYExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • setRotationExpression

      public void setRotationExpression(String rotationExpression)
      Specified by:
      setRotationExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • setSizeExpression

      public void setSizeExpression(String sizeExpression)
      Specified by:
      setSizeExpression in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol_v2
    • getRotation

      public double getRotation()
      Specified by:
      getRotation in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setRotation

      public void setRotation(double r)
      Specified by:
      setRotation in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getOffset

      public Point2D getOffset()
      Specified by:
      getOffset in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setOffset

      public void setOffset(Point2D offset)
      Specified by:
      setOffset in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getSize

      public double getSize()
      Specified by:
      getSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setSize

      public void setSize(double size)
      Specified by:
      setSize in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • getMask

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask getMask()
      Specified by:
      getMask in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • setMask

      public void setMask(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IMask mask)
      Specified by:
      setMask in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
    • 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