public class ArrowDecoratorStyle extends AbstractStyle implements IArrowDecoratorStyle
Modifier and Type | Class and Description |
---|---|
static class |
ArrowDecoratorStyle.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
static String |
ARROR_DECORATOR_STYLE_PERSISTENCE_DEFINITION_NAME |
STYLE_PERSISTENCE_DEFINITION_NAME
Constructor and Description |
---|
ArrowDecoratorStyle() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of the object.
|
void |
draw(Graphics2D g,
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(Graphics2D g,
Rectangle r)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
void |
drawOutline(Graphics2D g,
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.
|
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 |
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, setDescription
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, setDescription
public static final String ARROR_DECORATOR_STYLE_PERSISTENCE_DEFINITION_NAME
public int getArrowMarkerCount()
getArrowMarkerCount
in interface IArrowDecoratorStyle
public void setArrowMarkerCount(int arrowMarkerCount)
setArrowMarkerCount
in interface IArrowDecoratorStyle
public boolean isFlipAll()
isFlipAll
in interface IArrowDecoratorStyle
public void setFlipAll(boolean flipAll)
setFlipAll
in interface IArrowDecoratorStyle
public boolean isFlipFirst()
isFlipFirst
in interface IArrowDecoratorStyle
public void setFlipFirst(boolean flipFirst)
setFlipFirst
in interface IArrowDecoratorStyle
public boolean isFollowLineAngle()
isFollowLineAngle
in interface IArrowDecoratorStyle
public void setFollowLineAngle(boolean followLineAngle)
setFollowLineAngle
in interface IArrowDecoratorStyle
followingLineAngle
- public void draw(Graphics2D g, AffineTransform affineTransform, Geometry geom, Feature feature) throws CreateGeometryException
draw
in interface IArrowDecoratorStyle
g
- affineTransform
- feature
- shp
- CreateGeometryException
public void drawInsideRectangle(Graphics2D g, Rectangle r)
IStyle
drawInsideRectangle
in interface IStyle
g
- Graphics2Dr
- Rectanglepublic void drawOutline(Graphics2D g, Rectangle r)
IStyle
drawOutline
in interface IStyle
public boolean isSuitableFor(ISymbol symbol)
IStyle
isSuitableFor
in interface IStyle
symbol
- ISymbolpublic String getClassName()
public IMarkerSymbol getMarker()
getMarker
in interface IArrowDecoratorStyle
public void setMarker(IMarkerSymbol marker)
setMarker
in interface IArrowDecoratorStyle
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class AbstractStyle
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
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractStyle
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractStyle
PersistenceException