public class CharacterMarkerSymbol extends AbstractMarkerSymbol implements IMarkerSymbol_v2
AbstractMarkerSymbol.RegisterPersistence
CartographicSupport.CartographicContext
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHARACTER_MARKER_SYMBOL_PERSISTENCE_NAME |
MARKER_SYMBOL_PERSISTENCE_DEFINITION_NAME
LOGGER, SYMBOL_PERSISTENCE_DEFINITION_NAME
CIRCLE_STYLE, CROSS_STYLE, DIAMOND_STYLE, HORIZONTAL_LINE_STYLE, SQUARE_STYLE, STAR_STYLE, SYMBOL_NAME, TRIANGLE_STYLE, VERTICAL_LINE_STYLE, X_STYLE
PAPER, WORLD
SELECTION_COLOR
Constructor and Description |
---|
CharacterMarkerSymbol()
Creates a new instance of CharacterMarker with default values
|
CharacterMarkerSymbol(java.awt.Font font,
int charCode,
java.awt.Color color)
Creates a new instance of CharacterMarker specifying the marker source
font, the character code corresponding to the symbol, and the color that
will be used in rendering time.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature feat,
Cancellable cancel,
java.awt.Rectangle r) |
java.awt.Font |
getFont()
Returns the font that will be used to define the symbol
|
int |
getOnePointRgb() |
void |
getPixExtentPlus(Geometry geom,
float[] distances,
ViewPort viewPort,
int dpi) |
ISymbol |
getSymbolForSelection(java.awt.Color selectionColor) |
int |
getUnicode()
Obtains the unicode for a symbol
|
boolean |
isOneDotOrPixel(Geometry geom,
double[] positionOfDotOrPixel,
ViewPort viewPort,
int dpi) |
boolean |
isSuitableFor(Geometry geom)
True if this symbol is ok for the geometry.
|
boolean |
isVisuallyCorrected()
Returns true of false depending if the character marker symbol selected is visually
corrected.That is, if the character has been properly scaled to use a specific number
of pixels to be represented.
|
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) |
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAlpha(int a)
Defines the transparency of a line symbol.
|
void |
setFont(java.awt.Font font)
Sets the font that will be used to define the symbol
|
void |
setSize(double size)
Sets the size of marker symbol
|
void |
setUnicode(int symbol)
Sets the unicode for a symbol represented by a character
|
void |
setVisuallyCorrected(boolean visuallyCorrected)
Sets the visual correction for a character in order to scale it if it is necessary.
|
getAdjustedSize, getCartographicSize, getColor, getEfectiveLineToOffsetColor, getEfectiveOffset, getEfectiveRotationInDegres, getEfectiveRotationInRadians, getEfectiveSize, getLineToOffsetColor, getLineToOffsetColorExpression, getMask, getOffset, getOffsetXExpression, getOffsetYExpression, getPoint, getRotation, getRotationExpression, getRotationInDegrees, getRotationInRadians, getSampleGeometry, getSize, getSizeExpression, getSymbolTable, getSymbolType, isDrawLineToOffset, setColor, setDrawLineToOffset, setLineToOffsetColor, setLineToOffsetColorExpression, setMask, setOffset, setOffsetXExpression, setOffsetYExpression, setRotation, setRotationExpression, setRotationInDegrees, setRotationInRadians, setSizeExpression
cloneForSelection, cloneForSelection, draw, drawInsideRectangle, equals, getDescription, getFeature, getID, getRequiredFeatureAttributeNames, getSymbolForSelection, isShapeVisible, setDescription, setFeature, setID, setIsShapeVisible
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnits
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEfectiveLineToOffsetColor, getEfectiveOffset, getEfectiveRotationInDegres, getEfectiveRotationInRadians, getEfectiveSize, getLineToOffsetColor, getLineToOffsetColorExpression, getOffsetXExpression, getOffsetYExpression, getRotationExpression, getSizeExpression, isDrawLineToOffset, setDrawLineToOffset, setLineToOffsetColor, setLineToOffsetColorExpression, setOffsetXExpression, setOffsetYExpression, setRotationExpression, setSizeExpression
getColor, getMask, getOffset, getRotation, getSize, setColor, setMask, setOffset, setRotation
copyCartographicContext, copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnits
draw, drawInsideRectangle, getDescription, getFeature, getID, getSymbolForSelection, getSymbolType, isShapeVisible, setDescription, setFeature, setID
cloneQuietly, cloneQuietly
public static final java.lang.String CHARACTER_MARKER_SYMBOL_PERSISTENCE_NAME
public CharacterMarkerSymbol()
public CharacterMarkerSymbol(java.awt.Font font, int charCode, java.awt.Color color)
font
- -
src FontcharCode
- -
character code of the symbol for this fontcolor
- -
color to be used in when rendering.public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public ISymbol getSymbolForSelection(java.awt.Color selectionColor)
getSymbolForSelection
in interface ISymbol
getSymbolForSelection
in class AbstractSymbol
public void draw(java.awt.Graphics2D g, java.awt.geom.AffineTransform affineTransform, Geometry geom, Feature feat, Cancellable cancel, java.awt.Rectangle r)
public void setUnicode(int symbol)
symbol,
- intpublic int getUnicode()
public void setSize(double size)
IMarkerSymbol
setSize
in interface IMarkerSymbol
setSize
in class AbstractMarkerSymbol
public boolean isVisuallyCorrected()
public void setVisuallyCorrected(boolean visuallyCorrected)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class AbstractMarkerSymbol
java.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 getPixExtentPlus(Geometry geom, float[] distances, ViewPort viewPort, int dpi)
public boolean isOneDotOrPixel(Geometry geom, double[] positionOfDotOrPixel, ViewPort viewPort, int dpi)
public int getOnePointRgb()
public boolean isSuitableFor(Geometry geom)
ISymbol
isSuitableFor
in interface ISymbol
isSuitableFor
in class AbstractMarkerSymbol
public void print(java.awt.Graphics2D g, java.awt.geom.AffineTransform at, Geometry geom, PrintAttributes properties)
print
in interface IPrintable
print
in class AbstractSymbol
public void setAlpha(int a)
IMarkerSymbol
setAlpha
in interface IMarkerSymbol
setAlpha
in class AbstractMarkerSymbol
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractMarkerSymbol
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractMarkerSymbol
PersistenceException
public static void registerPersistent()