public class MultiLayerLineSymbol extends AbstractLineSymbol implements ILineSymbol, IMultiLayerSymbol, IMultiLayerLineSymbol
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiLayerLineSymbol.RegisterPersistence |
static class |
MultiLayerLineSymbol.RegisterSymbol |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MULTILAYER_LINE_SYMBOL_PERSISTENCE_DEFINITION_NAME |
LINE_SYMBOL_PERSISTENCE_DEFINITION_NAMESYMBOL_PERSISTENCE_DEFINITION_NAMESYMBOL_NAMEPAPER, WORLDSELECTION_COLOR| Constructor and Description |
|---|
MultiLayerLineSymbol() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayer(ISymbol newLayer)
Stacks a new symbol to the symbol list.
|
void |
addLayer(ISymbol newLayer,
int layerIndex)
Stacks a new symbol to the symbol list.
|
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,
Cancellable cancel)
Used when a symbol is going to be drawn.The method to do
it will depend on the derived version of the symbol.
|
void |
drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r,
PrintAttributes properties)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
int |
getAlpha()
Obtains the transparency of the line symbol
|
java.awt.Color |
getColor()
Returns the color of the line symbol
|
ISymbol |
getLayer(int layerIndex)
Obtains the symbol that "contains" a layer whose index is the argument of the method.
|
int |
getLayerCount()
Returns the number of layers
|
ILineStyle |
getLineStyle()
Obtains the style of the line symbol.
|
double |
getLineWidth()
Returns the width of the line symbol
|
int |
getOnePointRgb()
Returns the rgb of the symbol when it is drawn like a point.
|
void |
getPixExtentPlus(Geometry geom,
float[] distances,
ViewPort viewPort,
int dpi)
Returns the distance between the shape's bounding box and the
symbol-that-represents-this-shape's bounding box in a two-length-float
array passed as parameter.
|
ISymbol |
getSymbolForSelection()
Returns the derived version of the symbol that will be used to draw the
feature when it is selected.
|
boolean |
isSuitableFor(Geometry geom)
True if this symbol is ok for the geometry.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform at,
Geometry geom,
PrintAttributes properties) |
boolean |
removeLayer(ISymbol layer)
TODO maybe push it up to ISymbol
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAlpha(int outlineAlpha)
Defines the transparency of a line symbol.
|
void |
setCartographicSize(double cartographicSize,
Geometry geom)
Sets the size of the cartographic element in pixels.
|
void |
setLayer(int index,
ISymbol layer)
Establishes a concret symbol for a layer
|
void |
setLineColor(java.awt.Color color)
Sets the color for a line symbol
|
void |
setLineStyle(ILineStyle lineStyle)
Defines the style of the line symbol to be used.
|
void |
setLineWidth(double width)
Sets the width of the line symbol.
|
void |
setReferenceSystem(int system)
Sets the Reference System that defines how this units have to be
handled.
|
void |
setUnit(int unitIndex)
Defines the unit used to express measures.
|
void |
swapLayers(int index1,
int index2)
Changes the position of two layers in a multilayersymbol
|
getCartographicSize, getSymbolType, offsetFShape, setColor, toCartographicSizecloneForSelection, equals, getDescription, getID, getReferenceSystem, getUnit, isOneDotOrPixel, isShapeVisible, setDescription, setID, setIsShapeVisiblefinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCartographicSize, getReferenceSystem, getUnit, toCartographicSizegetDescription, getSymbolType, isOneDotOrPixel, isShapeVisible, setColor, setDescriptionpublic static final java.lang.String MULTILAYER_LINE_SYMBOL_PERSISTENCE_DEFINITION_NAME
public java.awt.Color getColor()
ILineSymbolgetColor in interface ISymbolgetColor in interface ILineSymbolgetColor in class AbstractLineSymbolpublic ILineStyle getLineStyle()
ILineSymbolgetLineStyle in interface ILineSymbolgetLineStyle in class AbstractLineSymbolpublic double getLineWidth()
ILineSymbolgetLineWidth in interface ILineSymbolpublic void setLineWidth(double width)
ILineSymbolsetLineWidth in interface ILineSymbolpublic void setLineColor(java.awt.Color color)
ILineSymbolsetLineColor in interface ILineSymbolsetLineColor in class AbstractLineSymbolpublic void setLineStyle(ILineStyle lineStyle)
ILineSymbolsetLineStyle in interface ILineSymbolsetLineStyle in class AbstractLineSymbolpublic void draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature feature,
Cancellable cancel)
ISymbolpublic void drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r,
PrintAttributes properties)
throws SymbolDrawingException
ISymboldrawInsideRectangle in interface ISymboldrawInsideRectangle in class AbstractLineSymbolproperties - TODOSymbolDrawingException - TODOpublic int getOnePointRgb()
ISymbolgetOnePointRgb in interface ISymbolgetOnePointRgb in class AbstractLineSymbolpublic void getPixExtentPlus(Geometry geom, float[] distances, ViewPort viewPort, int dpi)
ISymbol
Returns the distance between the shape's bounding box and the
symbol-that-represents-this-shape's bounding box in a two-length-float
array passed as parameter.
After this method returns, the float array passed will contain two values
representing the amount of pixels separating each of the X (first element)
and Y (second element) axes.
This distance maybe dependent on:
And in any other case, if the unit of the symbol is pixels or the symbol is not even an instance of CartographicSupport, the returning values are only defined by the symbol and are not calculated.
getPixExtentPlus in interface ISymbolgetPixExtentPlus in class AbstractLineSymbolpublic ISymbol getSymbolForSelection()
ISymbolgetSymbolForSelection in interface ISymbolpublic boolean isSuitableFor(Geometry geom)
ISymbolisSuitableFor in interface ISymbolisSuitableFor in class AbstractLineSymbolpublic void print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform at,
Geometry geom,
PrintAttributes properties)
print in interface IPrintableprint in class AbstractLineSymbolpublic void setLayer(int index,
ISymbol layer)
throws java.lang.IndexOutOfBoundsException
IMultiLayerSymbolsetLayer in interface IMultiLayerSymboljava.lang.IndexOutOfBoundsExceptionpublic void swapLayers(int index1,
int index2)
IMultiLayerSymbolswapLayers in interface IMultiLayerSymbolpublic ISymbol getLayer(int layerIndex)
IMultiLayerSymbolgetLayer in interface IMultiLayerSymbolpublic int getLayerCount()
IMultiLayerSymbolgetLayerCount in interface IMultiLayerSymbolpublic void addLayer(ISymbol newLayer)
IMultiLayerSymboladdLayer in interface IMultiLayerSymbolpublic void addLayer(ISymbol newLayer, int layerIndex) throws java.lang.IndexOutOfBoundsException
IMultiLayerSymboladdLayer in interface IMultiLayerSymboljava.lang.IndexOutOfBoundsExceptionpublic boolean removeLayer(ISymbol layer)
IMultiLayerSymbolremoveLayer in interface IMultiLayerSymbolpublic int getAlpha()
ILineSymbolgetAlpha in interface ILineSymbolgetAlpha in class AbstractLineSymbolpublic void setAlpha(int outlineAlpha)
ILineSymbolsetAlpha in interface ILineSymbolsetAlpha in class AbstractLineSymbolpublic void setUnit(int unitIndex)
CartographicSupportsetUnit in interface CartographicSupportsetUnit in class AbstractSymbolpublic void setReferenceSystem(int system)
CartographicSupportsetReferenceSystem in interface CartographicSupportsetReferenceSystem in class AbstractSymbolpublic void setCartographicSize(double cartographicSize,
Geometry geom)
CartographicSupportsetCartographicSize in interface CartographicSupportsetCartographicSize in class AbstractLineSymbolpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class AbstractLineSymboljava.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 AbstractLineSymbolPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractLineSymbolPersistenceException