Class ArrowDecoratorStyle
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 ClassesNested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext -
Field Summary
FieldsFields inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle
LOGGER, STYLE_PERSISTENCE_DEFINITION_NAMEFields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
PAPER, WORLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()voiddraw(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)voidvoiddrawOutline(Graphics2D g, Rectangle r) intObtains the number of arrows that the user wants to draw in the same line.org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbolbooleanDefines 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.booleanObtains the flipFirst attribute.If it is true only the first arrow of the line will be flipped.The rest will keep the same orientation.booleanGets 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) .booleanisSuitableFor(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol) voidloadFromState(org.gvsig.tools.persistence.PersistentState state) voidsaveToState(org.gvsig.tools.persistence.PersistentState state) voidsetArrowMarkerCount(int arrowMarkerCount) Defines the number of arrows that the user wants to draw in the same line.voidsetCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx) voidsetFlipAll(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.voidsetFlipFirst(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.voidsetFollowLineAngle(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.voidsetMarker(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol marker) Methods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.AbstractStyle
getDescription, setDescriptionMethods inherited from class org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
getDescription, setDescription
-
Field Details
-
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:
getArrowMarkerCountin interfaceorg.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:
setArrowMarkerCountin interfaceorg.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:
isFlipAllin interfaceorg.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:
setFlipAllin interfaceorg.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:
isFlipFirstin interfaceorg.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:
setFlipFirstin interfaceorg.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:
isFollowLineAnglein interfaceorg.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:
setFollowLineAnglein interfaceorg.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:
drawin interfaceorg.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle- Parameters:
g-affineTransform-feature-shp-- Throws:
org.gvsig.fmap.geom.exception.CreateGeometryException
-
drawInsideRectangle
- Specified by:
drawInsideRectanglein interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
-
drawOutline
- Specified by:
drawOutlinein interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
-
isSuitableFor
public boolean isSuitableFor(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol) - Specified by:
isSuitableForin interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.styles.IStyle
-
getClassName
-
getMarker
public org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol getMarker()- Specified by:
getMarkerin interfaceorg.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
-
setMarker
public void setMarker(org.gvsig.symbology.fmap.mapcontext.rendering.symbol.marker.IMarkerSymbol marker) - Specified by:
setMarkerin interfaceorg.gvsig.symbology.fmap.mapcontext.rendering.symbol.style.IArrowDecoratorStyle
-
clone
- Specified by:
clonein interfaceorg.gvsig.tools.lang.Cloneable- Overrides:
clonein classAbstractStyle- Throws:
CloneNotSupportedException
-
loadFromState
public void loadFromState(org.gvsig.tools.persistence.PersistentState state) throws org.gvsig.tools.persistence.exception.PersistenceException - Specified by:
loadFromStatein interfaceorg.gvsig.tools.persistence.Persistent- Overrides:
loadFromStatein classAbstractStyle- 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:
saveToStatein interfaceorg.gvsig.tools.persistence.Persistent- Overrides:
saveToStatein classAbstractStyle- Throws:
org.gvsig.tools.persistence.exception.PersistenceException
-
setCartographicContext
public void setCartographicContext(org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport.CartographicContext ctx) - Specified by:
setCartographicContextin interfaceorg.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport- Overrides:
setCartographicContextin classorg.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
-