public abstract class AbstractSymbol extends java.lang.Object implements ISymbol_v2, CartographicSupport
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSymbol.RegisterPersistence |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SYMBOL_PERSISTENCE_DEFINITION_NAME |
SELECTION_COLORPAPER, WORLD| Constructor and Description |
|---|
AbstractSymbol() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
protected ISymbol |
cloneForSelection() |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDescription()
The description is a human-readable text used to label it when show in a symbol menu or something like that.
|
java.lang.String |
getID()
Get the id ob the symbol (the basename of file)
|
int |
getReferenceSystem()
Returns the Reference System used to draw the elements of the image.
|
int |
getUnit()
Returns the unit used to express measures.
|
boolean |
isOneDotOrPixel(Geometry geom,
double[] positionOfDotOrPixel,
ViewPort viewPort,
int dpi)
Informs that the geometry will be represented with that symbol in just one pixel or dot
|
boolean |
isShapeVisible()
Tells whether the shape of the symbol will be drawn or not.
|
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 |
setDescription(java.lang.String desc)
Sets the description of this symbol
|
void |
setID(java.lang.String id)
Set the id ob the symbol (the basename of file)
|
void |
setIsShapeVisible(boolean isShapeVisible)
Sets this symbol to visible
|
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.
|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdraw, drawInsideRectangle, getColor, getOnePointRgb, getPixExtentPlus, getSymbolForSelection, getSymbolType, isSuitableFor, setColorprintgetCartographicSize, setCartographicSize, toCartographicSizepublic static final java.lang.String SYMBOL_PERSISTENCE_DEFINITION_NAME
public final void setDescription(java.lang.String desc)
ISymbolsetDescription in interface ISymbolISymbol.getDescription();public final java.lang.String getDescription()
ISymbolgetDescription in interface ISymbolpublic final void setID(java.lang.String id)
setID in interface ISymbol_v2id - public final java.lang.String getID()
getID in interface ISymbol_v2id - public final boolean isShapeVisible()
ISymbolisShapeVisible in interface ISymbolpublic final void setIsShapeVisible(boolean isShapeVisible)
isShapeVisible - public void setUnit(int unitIndex)
CartographicSupportsetUnit in interface CartographicSupportpublic int getUnit()
CartographicSupportgetUnit in interface CartographicSupportpublic int getReferenceSystem()
CartographicSupport
The elements have to be scaled to pixel when the image is bein drawn in
order to compose the map. The elements of the map may define its size in
other units than pixel.
CartographicSupport enables the elements to define the size in
measure units but these units may refer to different reference system. Two
kinds of Reference Systems are allowed in this context: CartographicSupport.WORLD,
and CartographicSupport.PAPER.
Depending on which Reference System is used the unit used by this element
refers to distances in the real world (then they are map's CRS-dependant)
or screen or printer output (then they are output DPI-dependant)
In case the unit used is pixel then the reference system does not
have any effect since the source unit is the same than the target unit.
getReferenceSystem in interface CartographicSupportpublic void setReferenceSystem(int system)
CartographicSupportsetReferenceSystem in interface CartographicSupportpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean isOneDotOrPixel(Geometry geom, double[] positionOfDotOrPixel, ViewPort viewPort, int dpi)
ISymbolisOneDotOrPixel in interface ISymbolpositionOfDotOrPixel - (out) filled with pixel or dot locationpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class java.lang.Objectjava.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()}.protected ISymbol cloneForSelection()
public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceException