public abstract class AbstractFillSymbol extends AbstractSymbol implements IFillSymbol
Modifier and Type | Class and Description |
---|---|
static class |
AbstractFillSymbol.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
static String |
FILL_SYMBOL_PERSISTENCE_DEFINITION_NAME |
SYMBOL_PERSISTENCE_DEFINITION_NAME
SYMBOL_NAME
SELECTION_COLOR
PAPER, WORLD
Constructor and Description |
---|
AbstractFillSymbol() |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of the object.
|
double |
getCartographicSize(ViewPort viewPort,
double dpi,
Geometry geom)
Gets the size (in pixels) of the cartographic element according
to the current rendering context (output dpi, map scale, map units) and the
symbol cartgraphic settings (unit, size, and unit reference system).
|
Color |
getColor()
Returns the
Color to use to render the symbol. |
int |
getFillAlpha()
Obtains the transparency of the fill symbol
|
Color |
getFillColor() |
int |
getOnePointRgb()
Returns the rgb of the symbol when it is drawn like a point.
|
ILineSymbol |
getOutline()
Obtains the ILineSymbol interface of the outline
|
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.
|
boolean |
hasFill() |
boolean |
hasOutline() |
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 |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setCartographicSize(double cartographicSize,
Geometry geom)
Sets the size of the cartographic element in pixels.
|
void |
setColor(Color color)
Sets the
Color to use to render the symbol. |
void |
setFillColor(Color color)
Sets the color that will be used to draw the filling pattern of this symbol.
|
void |
setHasFill(boolean hasFill) |
void |
setHasOutline(boolean hasOutline) |
void |
setOutline(ILineSymbol outline)
Sets the color of the outline.
|
void |
setUnit(int unitIndex)
Defines the unit used to express measures.
|
double |
toCartographicSize(ViewPort viewPort,
double dpi,
Geometry geom)
Computes and sets the size (in pixels) of the cartographic element according
to the current rendering context (output dpi, map scale, map units) and the
symbol cartgraphic settings (unit, size, and unit reference system).
|
cloneForSelection, equals, getDescription, getID, getReferenceSystem, getUnit, isOneDotOrPixel, isShapeVisible, setDescription, setID, setIsShapeVisible, setReferenceSystem
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
draw, drawInsideRectangle, getDescription, getSymbolForSelection, getSymbolType, isOneDotOrPixel, isShapeVisible, setDescription
print
getReferenceSystem, getUnit, setReferenceSystem
public static final String FILL_SYMBOL_PERSISTENCE_DEFINITION_NAME
public boolean isSuitableFor(Geometry geom)
ISymbol
isSuitableFor
in interface ISymbol
isSuitableFor
in interface IFillSymbol
public int getOnePointRgb()
ISymbol
getOnePointRgb
in interface ISymbol
getOnePointRgb
in interface IFillSymbol
public 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 ISymbol
public void setFillColor(Color color)
IFillSymbol
setFillColor
in interface IFillSymbol
public void setOutline(ILineSymbol outline)
IFillSymbol
setOutline
in interface IFillSymbol
public Color getFillColor()
getFillColor
in interface IFillSymbol
public ILineSymbol getOutline()
IFillSymbol
getOutline
in interface IFillSymbol
public int getFillAlpha()
IFillSymbol
getFillAlpha
in interface IFillSymbol
public void setCartographicSize(double cartographicSize, Geometry geom)
CartographicSupport
setCartographicSize
in interface CartographicSupport
public double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom)
CartographicSupport
toCartographicSize
in interface CartographicSupport
public boolean hasFill()
hasFill
in interface IFillSymbol
public void setHasFill(boolean hasFill)
setHasFill
in interface IFillSymbol
public boolean hasOutline()
hasOutline
in interface IFillSymbol
public void setHasOutline(boolean hasOutline)
setHasOutline
in interface IFillSymbol
public double getCartographicSize(ViewPort viewPort, double dpi, Geometry geom)
CartographicSupport
getCartographicSize
in interface CartographicSupport
public void setUnit(int unitIndex)
CartographicSupport
setUnit
in interface CartographicSupport
setUnit
in class AbstractSymbol
public Color getColor()
ISymbol
Color
to use to render the symbol.public void setColor(Color color)
ISymbol
Color
to use to render the symbol.public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class AbstractSymbol
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
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractSymbol
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractSymbol
PersistenceException