public interface ISymbol extends Persistent, IPrintable, Cloneable
Modifier and Type | Field and Description |
---|---|
static java.awt.Color |
SELECTION_COLOR |
Modifier and Type | Method and Description |
---|---|
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 |
draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature f,
Cancellable cancel,
java.awt.Rectangle r) |
void |
drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
java.awt.Color |
getColor()
Returns the
Color to use to render the symbol. |
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.
|
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) |
int |
getSymbolType()
The use of this method -and its mechanism- is being valorated.
|
boolean |
isShapeVisible()
Tells whether the shape of the symbol will be drawn or not.
|
boolean |
isSuitableFor(Geometry geom)
True if this symbol is ok for the geometry.
|
void |
setColor(java.awt.Color color)
Sets the
Color to use to render the symbol. |
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).
|
loadFromState, saveToState
print
clone, cloneQuietly, cloneQuietly
ISymbol getSymbolForSelection()
ISymbol getSymbolForSelection(java.awt.Color selectionColor)
void draw(java.awt.Graphics2D g, java.awt.geom.AffineTransform affineTransform, Geometry geom, Feature f, Cancellable cancel)
g
- affineTransform
- shp
- cancel
- TODOjava.lang.String getDescription()
boolean isShapeVisible()
void setDescription(java.lang.String desc)
desc,
- a string with the descriptionISymbol.getDescription();
int getSymbolType()
boolean isSuitableFor(Geometry geom)
geom
- void drawInsideRectangle(java.awt.Graphics2D g, java.awt.geom.AffineTransform scaleInstance, java.awt.Rectangle r) throws SymbolDrawingException
scaleInstance
- r
- g2
- SymbolDrawingException
- TODOjava.awt.Color getColor()
Color
to use to render the symbol.Color
to use to render the symbolvoid setColor(java.awt.Color color)
Color
to use to render the symbol.color
- to render the symbolvoid setID(java.lang.String id)
id
- java.lang.String getID()
Feature getFeature()
void setFeature(Feature feature)
void draw(java.awt.Graphics2D g, java.awt.geom.AffineTransform affineTransform, Geometry geom, Feature f, Cancellable cancel, java.awt.Rectangle r)