public class SimpleLineStyle extends AbstractStyle implements CartographicSupport, ISimpleLineStyle
http://www.oreilly.com/catalog/java2d/chapter/ch04.html| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleLineStyle.RegisterPersistence |
CartographicSupport.CartographicContext| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SIMPLE_LINE_STYLE_PERSISTENCE_DEFINITION_NAME |
LOGGER, STYLE_PERSISTENCE_DEFINITION_NAMEPAPER, WORLD| Constructor and Description |
|---|
SimpleLineStyle()
Constructor method
|
SimpleLineStyle(float width,
int cap,
int join,
float miterlimit,
float[] dash,
float dash_phase)
Constructor method
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
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.
|
IArrowDecoratorStyle |
getArrowDecorator()
Gets the arrow decorator style that has the line
|
double |
getCartographicOffset() |
java.awt.Stroke |
getCartographicStroke() |
java.lang.String |
getClassName() |
float |
getLineWidth()
Returns the width of the line
|
double |
getOffset()
Returns the offset of the line
|
java.awt.Stroke |
getStroke()
Returns the stroke of the line
|
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 |
setArrowDecorator(IArrowDecoratorStyle arrowDecoratorStyle)
Sets the arrow decorator style of the line
|
void |
setCartographicContext(CartographicSupport.CartographicContext ctx) |
void |
setLineWidth(float width)
Establishes the width of the line
|
void |
setOffset(double offset)
Establishes the offset of the line
|
void |
setStroke(java.awt.Stroke stroke)
Sets the stroke of the line
|
getDescription, setDescriptioncopyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyCartographicContext, copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsgetDescription, setDescriptioncloneQuietly, cloneQuietlypublic static final java.lang.String SIMPLE_LINE_STYLE_PERSISTENCE_DEFINITION_NAME
public SimpleLineStyle()
public SimpleLineStyle(float width,
int cap,
int join,
float miterlimit,
float[] dash,
float dash_phase)
width - cap - join - miterlimit - dash - dash_phase - public void drawInsideRectangle(java.awt.Graphics2D g,
java.awt.Rectangle r)
IStyledrawInsideRectangle in interface IStyleg - Graphics2Dr - Rectanglepublic java.lang.String getClassName()
public java.awt.Stroke getStroke()
ILineStylegetStroke in interface ILineStylepublic java.awt.Stroke getCartographicStroke()
getCartographicStroke in interface ILineStylepublic float getLineWidth()
ILineStylegetLineWidth in interface ILineStylepublic void setLineWidth(float width)
ILineStylesetLineWidth in interface ILineStylewidth - of the linepublic boolean isSuitableFor(ISymbol symbol)
IStyleisSuitableFor in interface IStylesymbol - ISymbolpublic void setStroke(java.awt.Stroke stroke)
ILineStylesetStroke in interface ILineStylepublic void drawOutline(java.awt.Graphics2D g,
java.awt.Rectangle r)
IStyledrawOutline in interface IStylepublic double getOffset()
ILineStylegetOffset in interface ILineStylepublic double getCartographicOffset()
getCartographicOffset in interface ILineStylepublic void setOffset(double offset)
ILineStylesetOffset in interface ILineStylepublic IArrowDecoratorStyle getArrowDecorator()
ILineStylegetArrowDecorator in interface ILineStylepublic void setArrowDecorator(IArrowDecoratorStyle arrowDecoratorStyle)
ILineStylesetArrowDecorator in interface ILineStylepublic 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