public class ArrowDecoratorStyle extends AbstractStyle implements IArrowDecoratorStyle
| Modifier and Type | Class and Description |
|---|---|
static class |
ArrowDecoratorStyle.RegisterPersistence |
CartographicSupport.CartographicContext| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARROR_DECORATOR_STYLE_PERSISTENCE_DEFINITION_NAME |
LOGGER, STYLE_PERSISTENCE_DEFINITION_NAMEPAPER, WORLD| Constructor and Description |
|---|
ArrowDecoratorStyle() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
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 |
drawInsideRectangle(java.awt.Graphics2D g,
java.awt.Rectangle r)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
void |
drawOutline(java.awt.Graphics2D g,
java.awt.Rectangle r)
Used to show an outline of the style to graphically show its properties.
|
int |
getArrowMarkerCount()
Obtains the number of arrows that the user wants to draw in the same line.
|
java.lang.String |
getClassName() |
IMarkerSymbol |
getMarker() |
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.
|
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.
|
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) .
|
boolean |
isSuitableFor(ISymbol symbol)
True if this symbol is ok for the style or class.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setArrowMarkerCount(int arrowMarkerCount)
Defines the number of arrows that the user wants to draw in the same line.
|
void |
setCartographicContext(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(IMarkerSymbol marker) |
getDescription, setDescriptioncopyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, setDescriptioncloneQuietly, cloneQuietlycopyCartographicContextpublic static final java.lang.String ARROR_DECORATOR_STYLE_PERSISTENCE_DEFINITION_NAME
public int getArrowMarkerCount()
getArrowMarkerCount in interface IArrowDecoratorStylepublic void setArrowMarkerCount(int arrowMarkerCount)
setArrowMarkerCount in interface IArrowDecoratorStylepublic boolean isFlipAll()
isFlipAll in interface IArrowDecoratorStylepublic void setFlipAll(boolean flipAll)
setFlipAll in interface IArrowDecoratorStylepublic boolean isFlipFirst()
isFlipFirst in interface IArrowDecoratorStylepublic void setFlipFirst(boolean flipFirst)
setFlipFirst in interface IArrowDecoratorStylepublic boolean isFollowLineAngle()
isFollowLineAngle in interface IArrowDecoratorStylepublic void setFollowLineAngle(boolean followLineAngle)
setFollowLineAngle in interface IArrowDecoratorStylefollowingLineAngle - public void draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature feature)
throws CreateGeometryException
draw in interface IArrowDecoratorStyleg - affineTransform - feature - shp - CreateGeometryExceptionpublic void drawInsideRectangle(java.awt.Graphics2D g,
java.awt.Rectangle r)
IStyledrawInsideRectangle in interface IStyleg - Graphics2Dr - Rectanglepublic void drawOutline(java.awt.Graphics2D g,
java.awt.Rectangle r)
IStyledrawOutline in interface IStylepublic boolean isSuitableFor(ISymbol symbol)
IStyleisSuitableFor in interface IStylesymbol - ISymbolpublic java.lang.String getClassName()
public IMarkerSymbol getMarker()
getMarker in interface IArrowDecoratorStylepublic void setMarker(IMarkerSymbol marker)
setMarker in interface IArrowDecoratorStylepublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class AbstractStylejava.lang.CloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so its sure
it implements it, so this exception may be used for problems on specific
object instances.Object#clone()}.public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractStylePersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractStylePersistenceExceptionpublic void setCartographicContext(CartographicSupport.CartographicContext ctx)
setCartographicContext in interface CartographicSupportsetCartographicContext in class AbstractCartographicSupport