public class NodeElement extends StyleElement
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
ICON_KEYS |
MapImage |
mapImage
The image that is used to display this node.
|
RotationAngle |
mapImageAngle
The angle that is used to rotate
mapImage . |
Symbol |
symbol
The symbol that should be used for drawing this node.
|
defaultSelectedHandling, ICON_HEIGHT_IDX, ICON_IMAGE_IDX, ICON_OFFSET_X_IDX, ICON_OFFSET_Y_IDX, ICON_OPACITY_IDX, ICON_WIDTH_IDX, isModifier, majorZIndex, objectZIndex, zIndex
COLOR, DASHES, DASHES_BACKGROUND_COLOR, DASHES_BACKGROUND_OPACITY, DASHES_OFFSET, FILL_COLOR, FILL_EXTENT, FILL_EXTENT_THRESHOLD, FILL_IMAGE, FILL_OPACITY, FONT_FAMILY, FONT_SIZE, FONT_STYLE, FONT_WEIGHT, ICON_HEIGHT, ICON_IMAGE, ICON_OFFSET_X, ICON_OFFSET_Y, ICON_OPACITY, ICON_POSITION, ICON_ROTATION, ICON_WIDTH, LINECAP, LINEJOIN, MAJOR_Z_INDEX, MITERLIMIT, MODIFIER, OBJECT_Z_INDEX, OFFSET, OPACITY, REAL_WIDTH, REPEAT_IMAGE, REPEAT_IMAGE_ALIGN, REPEAT_IMAGE_HEIGHT, REPEAT_IMAGE_OFFSET, REPEAT_IMAGE_OPACITY, REPEAT_IMAGE_PHASE, REPEAT_IMAGE_SPACING, REPEAT_IMAGE_WIDTH, TEXT, TEXT_ANCHOR_HORIZONTAL, TEXT_ANCHOR_VERTICAL, TEXT_COLOR, TEXT_HALO_COLOR, TEXT_HALO_OPACITY, TEXT_HALO_RADIUS, TEXT_OFFSET, TEXT_OFFSET_X, TEXT_OFFSET_Y, TEXT_OPACITY, TEXT_POSITION, WAY_DIRECTION_ARROWS, WIDTH, Z_INDEX
Modifier | Constructor and Description |
---|---|
protected |
NodeElement(Cascade c,
MapImage mapImage,
Symbol symbol,
float defaultMajorZindex,
RotationAngle rotationAngle) |
Modifier and Type | Method and Description |
---|---|
static NodeElement |
create(Environment env)
Creates a new node element for the given Environment
|
(package private) static NodeElement |
create(Environment env,
float defaultMajorZindex,
boolean allowDefault) |
static MapImage |
createIcon(Environment env)
Create a map icon for the environment using the default keys.
|
static MapImage |
createIcon(Environment env,
java.lang.String... keys)
Create a map icon for the environment.
|
static RotationAngle |
createRotationAngle(Environment env)
Reads the icon-rotation property and creates a rotation angle from it.
|
private static Symbol |
createSymbol(Environment env)
Create a symbol for the environment
|
boolean |
equals(java.lang.Object obj) |
BoxTextElement.BoxProvider |
getBoxProvider()
Gets the selection box for this element.
|
int |
hashCode() |
private static int |
max(int... elements) |
void |
paintPrimitive(IPrimitive primitive,
MapPaintSettings settings,
StyledMapRenderer painter,
boolean selected,
boolean outermember,
boolean member)
draws a primitive
|
private void |
paintWithSymbol(MapPaintSettings settings,
StyledMapRenderer painter,
boolean selected,
boolean member,
INode n) |
java.lang.String |
toString() |
getFont, getWidth, isProperLineStyle
public final RotationAngle mapImageAngle
mapImage
. May be null
to indicate no rotation.private static final java.lang.String[] ICON_KEYS
protected NodeElement(Cascade c, MapImage mapImage, Symbol symbol, float defaultMajorZindex, RotationAngle rotationAngle)
public static NodeElement create(Environment env)
env
- The environmentnull
if the node should not be painted.static NodeElement create(Environment env, float defaultMajorZindex, boolean allowDefault)
public static RotationAngle createRotationAngle(Environment env)
env
- The environmentpublic static MapImage createIcon(Environment env)
env
- The environment to read the icon formnull
if no icon is definedpublic static MapImage createIcon(Environment env, java.lang.String... keys)
env
- The environment to read the icon formkeys
- The keys, indexed by the ICON_..._IDX constants.null
if no icon is definedprivate static Symbol createSymbol(Environment env)
env
- The environment to read the icon formpublic void paintPrimitive(IPrimitive primitive, MapPaintSettings settings, StyledMapRenderer painter, boolean selected, boolean outermember, boolean member)
StyleElement
paintPrimitive
in class StyleElement
primitive
- primitive to drawsettings
- paint settingspainter
- painterselected
- true, if primitive is selectedoutermember
- true, if primitive is not selected and outer member of a selected multipolygon relationmember
- true, if primitive is not selected and member of a selected relationprivate void paintWithSymbol(MapPaintSettings settings, StyledMapRenderer painter, boolean selected, boolean member, INode n)
public BoxTextElement.BoxProvider getBoxProvider()
BoxTextElement.BoxProvider
object.private static int max(int... elements)
public int hashCode()
hashCode
in class StyleElement
public boolean equals(java.lang.Object obj)
equals
in class StyleElement
public java.lang.String toString()
toString
in class StyleElement