public abstract class AbstractMarkerSymbol extends AbstractSymbol implements IMarkerSymbol
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractMarkerSymbol.RegisterPersistence |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME |
SYMBOL_PERSISTENCE_DEFINITION_NAMECIRCLE_STYLE, CROSS_STYLE, DIAMOND_STYLE, SQUARE_STYLE, STAR_STYLE, SYMBOL_NAME, TRIANGLE_STYLE, VERTICAL_LINE_STYLE, X_STYLESELECTION_COLORPAPER, WORLD| Constructor and Description |
|---|
AbstractMarkerSymbol() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r,
PrintAttributes properties)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
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).
|
java.awt.Color |
getColor()
Returns the color of the marker symbol.
|
IMask |
getMask() |
java.awt.geom.Point2D |
getOffset()
Gets the offset for a marker symbol
|
int |
getOnePointRgb()
Returns the rgb of the symbol when it is drawn like a point.
|
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.
|
double |
getRotation()
Returns the rotation (in radians, counter-clockwise) of the marker symbol
|
double |
getSize()
Obtains the size of a marker symbol
|
int |
getSymbolType()
The use of this method -and its mechanism- is being valorated.
|
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 |
print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform at,
Geometry geom,
PrintAttributes properties) |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAlpha(int outlineAlpha)
Defines the transparency of a line symbol.
|
void |
setCartographicSize(double cartographicSize,
Geometry geom)
Sets the size of the cartographic element in pixels.
|
void |
setColor(java.awt.Color color)
Establishes a color for the marker symbol
|
void |
setMask(IMask mask)
Defines a mask for the symbol
|
void |
setOffset(java.awt.geom.Point2D offset)
Establishes the offset currently set for the marker symbol.
|
void |
setRotation(double r)
Sets the rotation of the marker symbol
|
void |
setSize(double size)
Sets the size of marker symbol
|
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, setUnitfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdraw, getDescription, getSymbolForSelection, isOneDotOrPixel, isShapeVisible, setDescriptiongetReferenceSystem, getUnit, setReferenceSystem, setUnitpublic static final java.lang.String MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME
public final int getSymbolType()
ISymbolgetSymbolType in interface ISymbolpublic double getRotation()
IMarkerSymbolgetRotation in interface IMarkerSymbolpublic void setRotation(double r)
IMarkerSymbolsetRotation in interface IMarkerSymbolpublic java.awt.geom.Point2D getOffset()
IMarkerSymbolgetOffset in interface IMarkerSymbolpublic void setOffset(java.awt.geom.Point2D offset)
IMarkerSymbolsetOffset in interface IMarkerSymbolpublic boolean isSuitableFor(Geometry geom)
ISymbolisSuitableFor in interface ISymbolpublic int getOnePointRgb()
ISymbolgetOnePointRgb in interface ISymbolpublic double getSize()
IMarkerSymbolgetSize in interface IMarkerSymbolpublic void setSize(double size)
IMarkerSymbolsetSize in interface IMarkerSymbolpublic java.awt.Color getColor()
IMarkerSymbolgetColor in interface ISymbolgetColor in interface IMarkerSymbolpublic void setColor(java.awt.Color color)
IMarkerSymbolsetColor in interface ISymbolsetColor in interface IMarkerSymbolcolor - to render the symbolpublic void setAlpha(int outlineAlpha)
IMarkerSymbolsetAlpha in interface IMarkerSymbolpublic 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 ISymbolpublic void print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform at,
Geometry geom,
PrintAttributes properties)
print in interface IPrintablepublic final IMask getMask()
getMask in interface IMarkerSymbolpublic void drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r,
PrintAttributes properties)
throws SymbolDrawingException
ISymboldrawInsideRectangle in interface ISymbolproperties - TODOSymbolDrawingException - TODOpublic final void setMask(IMask mask)
IMarkerSymbolsetMask in interface IMarkerSymbolpublic void setCartographicSize(double cartographicSize,
Geometry geom)
CartographicSupportsetCartographicSize in interface CartographicSupportpublic double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom)
CartographicSupporttoCartographicSize in interface CartographicSupportpublic double getCartographicSize(ViewPort viewPort, double dpi, Geometry geom)
CartographicSupportgetCartographicSize in interface CartographicSupportpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class AbstractSymboljava.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()}.public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractSymbolPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractSymbolPersistenceException