public abstract class AbstractSymbol extends Object implements ISymbol_v2, CartographicSupport
Modifier and Type | Class and Description |
---|---|
static class |
AbstractSymbol.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
static String |
SYMBOL_PERSISTENCE_DEFINITION_NAME |
SELECTION_COLOR
PAPER, WORLD
Constructor and Description |
---|
AbstractSymbol() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of the object.
|
protected ISymbol |
cloneForSelection() |
boolean |
equals(Object obj) |
String |
getDescription()
The description is a human-readable text used to label it when show in a symbol menu or something like that.
|
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(String desc)
Sets the description of this symbol
|
void |
setID(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, wait
draw, drawInsideRectangle, getColor, getOnePointRgb, getPixExtentPlus, getSymbolForSelection, getSymbolType, isSuitableFor, setColor
print
getCartographicSize, setCartographicSize, toCartographicSize
public static final String SYMBOL_PERSISTENCE_DEFINITION_NAME
public final void setDescription(String desc)
ISymbol
setDescription
in interface ISymbol
ISymbol.getDescription();
public final String getDescription()
ISymbol
getDescription
in interface ISymbol
public final void setID(String id)
setID
in interface ISymbol_v2
id
- public final String getID()
getID
in interface ISymbol_v2
id
- public final boolean isShapeVisible()
ISymbol
isShapeVisible
in interface ISymbol
public final void setIsShapeVisible(boolean isShapeVisible)
isShapeVisible
- public void setUnit(int unitIndex)
CartographicSupport
setUnit
in interface CartographicSupport
public int getUnit()
CartographicSupport
getUnit
in interface CartographicSupport
public 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 CartographicSupport
public void setReferenceSystem(int system)
CartographicSupport
setReferenceSystem
in interface CartographicSupport
public boolean isOneDotOrPixel(Geometry geom, double[] positionOfDotOrPixel, ViewPort viewPort, int dpi)
ISymbol
isOneDotOrPixel
in interface ISymbol
positionOfDotOrPixel
- (out) filled with pixel or dot locationpublic Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
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
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException