public abstract class StyleElement extends java.lang.Object implements StyleKeys
Modifier and Type | Class and Description |
---|---|
private static class |
StyleElement.FontDescriptor |
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
DEFAULT_FONT_NAME |
private static java.lang.Float |
DEFAULT_FONT_SIZE |
private static java.util.Map<StyleElement.FontDescriptor,java.awt.Font> |
FONT_MAP |
protected static int |
ICON_HEIGHT_IDX |
protected static int |
ICON_IMAGE_IDX |
protected static java.lang.String[] |
ICON_KEYS |
protected static int |
ICON_OFFSET_X_IDX |
protected static int |
ICON_OFFSET_Y_IDX |
protected static int |
ICON_OPACITY_IDX |
protected static int |
ICON_WIDTH_IDX |
boolean |
isModifier |
private static java.lang.Object |
lock |
float |
majorZIndex |
float |
objectZIndex |
protected static java.lang.String[] |
REPEAT_IMAGE_KEYS |
float |
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_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, WIDTH, Z_INDEX
Modifier | Constructor and Description |
---|---|
protected |
StyleElement(Cascade c,
float default_major_z_index) |
|
StyleElement(float major_z_index,
float z_index,
float object_z_index,
boolean isModifier) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
private static java.awt.Font |
getCachedFont(java.lang.String name,
int style,
int size) |
private static java.awt.Font |
getCachedFont(StyleElement.FontDescriptor fd) |
private static java.lang.String |
getDefaultFontName() |
private static java.lang.Float |
getDefaultFontSize() |
protected static java.awt.Font |
getFont(Cascade c,
java.lang.String s) |
protected static java.lang.Float |
getWidth(Cascade c,
java.lang.String key,
java.lang.Float relativeTo)
Get a property value of type Width
|
int |
hashCode() |
boolean |
isProperLineStyle() |
abstract void |
paintPrimitive(OsmPrimitive primitive,
MapPaintSettings paintSettings,
StyledMapRenderer painter,
boolean selected,
boolean outermember,
boolean member)
draws a primitive
|
java.lang.String |
toString() |
protected static final int ICON_IMAGE_IDX
protected static final int ICON_WIDTH_IDX
protected static final int ICON_HEIGHT_IDX
protected static final int ICON_OPACITY_IDX
protected static final int ICON_OFFSET_X_IDX
protected static final int ICON_OFFSET_Y_IDX
protected static final java.lang.String[] ICON_KEYS
protected static final java.lang.String[] REPEAT_IMAGE_KEYS
public float majorZIndex
public float zIndex
public float objectZIndex
public boolean isModifier
private static volatile java.lang.String DEFAULT_FONT_NAME
private static volatile java.lang.Float DEFAULT_FONT_SIZE
private static final java.lang.Object lock
private static final java.util.Map<StyleElement.FontDescriptor,java.awt.Font> FONT_MAP
public StyleElement(float major_z_index, float z_index, float object_z_index, boolean isModifier)
protected StyleElement(Cascade c, float default_major_z_index)
public abstract void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter, boolean selected, boolean outermember, boolean member)
primitive
- primitive to drawpaintSettings
- 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 relationpublic boolean isProperLineStyle()
protected static java.lang.Float getWidth(Cascade c, java.lang.String key, java.lang.Float relativeTo)
c
- the cascadekey
- property key for the width valuerelativeTo
- reference width. Only needed, when relative width syntax is used, e.g. "+4".private static java.lang.Float getDefaultFontSize()
private static java.lang.String getDefaultFontName()
private static java.awt.Font getCachedFont(StyleElement.FontDescriptor fd)
private static java.awt.Font getCachedFont(java.lang.String name, int style, int size)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object