java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.ArrowDecoratorStyle
All Implemented Interfaces:
Cloneable, org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport, org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle, org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle, org.gvsig.tools.lang.Cloneable, org.gvsig.tools.persistence.Persistent

public class ArrowDecoratorStyle extends AbstractStyle implements org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
Class ArrowDecoratorStyle. It is used to store the information about the different options to draw an arrow in a line (and draw it too). This information is taken from the panel.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport

    org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle

    LOGGER, STYLE_PERSISTENCE_DEFINITION_NAME

    Fields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport

    PAPER, WORLD
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    draw(Graphics2D g, AffineTransform affineTransform, org.gvsig.fmap.geom.Geometry geom, org.gvsig.fmap.dal.feature.Feature feature)
    Draws an arrow(or other symbol that substitutes an arrow selected by the user) in a line.When the line is drawn, the symbol is added and takes care of the different options of the user(for example if he wants to flip the first symbol or all and the number of symbols per line to be drawn)
    void
     
    void
     
    int
    Obtains the number of arrows that the user wants to draw in the same line.
     
    org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol
     
    boolean
    Defines the flipAll attribute.If the value of this attribute is true all the arrows that we had drawn in the same line will be flipped.
    boolean
    Obtains the flipFirst attribute.If it is true only the first arrow of the line will be flipped.The rest will keep the same orientation.
    boolean
    Gets the followLineAngle attribute.This attribute allows the arrow that we are going to draw to be more or less aligned with the line where it will be included (depending on the angle) .
    boolean
    isSuitableFor(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
     
    void
    loadFromState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    saveToState(org.gvsig.tools.persistence.PersistentState state)
     
    void
    setArrowMarkerCount(int arrowMarkerCount)
    Defines the number of arrows that the user wants to draw in the same line.
    void
    setCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx)
     
    void
    setFlipAll(boolean flipAll)
    Obtains the flipAll attribute.If the value of this attribute is true all the arrows that we had drawn in the same line will be flipped.
    void
    setFlipFirst(boolean flipFirst)
    Sets the flipFirst attribute.If it is true only the first arrow of the line will be flipped.The rest will keep the same orientation.
    void
    setFollowLineAngle(boolean followLineAngle)
    Sets the followLineAngle attribute.This attribute allows the arrow that we are going to draw to be more or less aligned with the line where it will be included.
    void
    setMarker(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol marker)
     

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle

    getDescription, setDescription

    Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport

    copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnits

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle

    getDescription, setDescription
  • Field Details

    • ARROR_DECORATOR_STYLE_PERSISTENCE_DEFINITION_NAME

      public static final String ARROR_DECORATOR_STYLE_PERSISTENCE_DEFINITION_NAME
      See Also:
  • Constructor Details

    • ArrowDecoratorStyle

      public ArrowDecoratorStyle()
  • Method Details

    • getArrowMarkerCount

      public int getArrowMarkerCount()
      Obtains the number of arrows that the user wants to draw in the same line.
      Specified by:
      getArrowMarkerCount in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
      Returns:
    • setArrowMarkerCount

      public void setArrowMarkerCount(int arrowMarkerCount)
      Defines the number of arrows that the user wants to draw in the same line.
      Specified by:
      setArrowMarkerCount in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
    • isFlipAll

      public boolean isFlipAll()
      Defines the flipAll attribute.If the value of this attribute is true all the arrows that we had drawn in the same line will be flipped.
      Specified by:
      isFlipAll in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
      Returns:
    • setFlipAll

      public void setFlipAll(boolean flipAll)
      Obtains the flipAll attribute.If the value of this attribute is true all the arrows that we had drawn in the same line will be flipped.
      Specified by:
      setFlipAll in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
    • isFlipFirst

      public boolean isFlipFirst()
      Obtains the flipFirst attribute.If it is true only the first arrow of the line will be flipped.The rest will keep the same orientation.
      Specified by:
      isFlipFirst in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
      Returns:
    • setFlipFirst

      public void setFlipFirst(boolean flipFirst)
      Sets the flipFirst attribute.If it is true only the first arrow of the line will be flipped.The rest will keep the same orientation.
      Specified by:
      setFlipFirst in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
    • isFollowLineAngle

      public boolean isFollowLineAngle()
      Gets the followLineAngle attribute.This attribute allows the arrow that we are going to draw to be more or less aligned with the line where it will be included (depending on the angle) .
      Specified by:
      isFollowLineAngle in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
      Returns:
    • setFollowLineAngle

      public void setFollowLineAngle(boolean followLineAngle)
      Sets the followLineAngle attribute.This attribute allows the arrow that we are going to draw to be more or less aligned with the line where it will be included. (depending on the angle).
      Specified by:
      setFollowLineAngle in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
      Parameters:
      followingLineAngle -
    • draw

      public void draw(Graphics2D g, AffineTransform affineTransform, org.gvsig.fmap.geom.Geometry geom, org.gvsig.fmap.dal.feature.Feature feature) throws org.gvsig.fmap.geom.exception.CreateGeometryException
      Draws an arrow(or other symbol that substitutes an arrow selected by the user) in a line.When the line is drawn, the symbol is added and takes care of the different options of the user(for example if he wants to flip the first symbol or all and the number of symbols per line to be drawn)
      Specified by:
      draw in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
      Parameters:
      g -
      affineTransform -
      feature -
      shp -
      Throws:
      org.gvsig.fmap.geom.exception.CreateGeometryException
    • drawInsideRectangle

      public void drawInsideRectangle(Graphics2D g, Rectangle r)
      Specified by:
      drawInsideRectangle in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
    • drawOutline

      public void drawOutline(Graphics2D g, Rectangle r)
      Specified by:
      drawOutline in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
    • isSuitableFor

      public boolean isSuitableFor(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol)
      Specified by:
      isSuitableFor in interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
    • getClassName

      public String getClassName()
    • getMarker

      public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol getMarker()
      Specified by:
      getMarker in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
    • setMarker

      public void setMarker(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol marker)
      Specified by:
      setMarker in interface org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
    • clone

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

      public void setCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx)
      Specified by:
      setCartographicContext in interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
      Overrides:
      setCartographicContext in class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport