public abstract class AbstractSymbol extends AbstractCartographicSupport implements ISymbol_v2, CartographicSupport
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSymbol.RegisterPersistence |
CartographicSupport.CartographicContext| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOGGER |
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() |
protected ISymbol |
cloneForSelection(java.awt.Color selectionColor) |
void |
draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature f,
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 affineTransform,
java.awt.Rectangle r)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
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.
|
Feature |
getFeature() |
java.lang.String |
getID()
Get the id ob the symbol (the basename of file).This attribute is not persistent.
|
java.lang.String[] |
getRequiredFeatureAttributeNames(FeatureStore featureStore) |
ISymbol |
getSymbolForSelection()
Returns the derived version of the symbol that will be used to draw the
feature when it is selected.
|
ISymbol |
getSymbolForSelection(java.awt.Color selectionColor) |
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 |
print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
PrintAttributes properties) |
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 |
setFeature(Feature feature) |
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
|
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdraw, getColor, getSymbolType, isSuitableFor, setColorcloneQuietly, cloneQuietlycopyCartographicContext, copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitsprotected static final Logger LOGGER
public static final java.lang.String SYMBOL_PERSISTENCE_DEFINITION_NAME
public Feature getFeature()
getFeature in interface ISymbolpublic void setFeature(Feature feature)
setFeature in interface ISymbolpublic 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)
ISymbolpublic final java.lang.String getID()
ISymbolpublic boolean isShapeVisible()
ISymbolisShapeVisible in interface ISymbolpublic final void setIsShapeVisible(boolean isShapeVisible)
isShapeVisible - public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic 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()
protected ISymbol cloneForSelection(java.awt.Color selectionColor)
public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic java.lang.String[] getRequiredFeatureAttributeNames(FeatureStore featureStore) throws DataException
DataExceptionpublic void draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature f,
Cancellable cancel)
ISymbolpublic void drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
java.awt.Rectangle r)
throws SymbolDrawingException
ISymboldrawInsideRectangle in interface ISymbolSymbolDrawingException - TODOpublic void print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
PrintAttributes properties)
print in interface IPrintablepublic ISymbol getSymbolForSelection()
ISymbolgetSymbolForSelection in interface ISymbolpublic ISymbol getSymbolForSelection(java.awt.Color selectionColor)
getSymbolForSelection in interface ISymbol