public abstract class ElemStyle extends Object implements StyleKeys
Modifier and Type | Class and Description |
---|---|
private static class |
ElemStyle.FontDescriptor |
Modifier and Type | Field and Description |
---|---|
private static String |
DEFAULT_FONT_NAME |
private static Float |
DEFAULT_FONT_SIZE |
private static Map<ElemStyle.FontDescriptor,Font> |
FONT_MAP |
protected static String[] |
ICON_KEYS |
boolean |
isModifier |
float |
major_z_index |
float |
object_z_index |
protected static String[] |
REPEAT_IMAGE_KEYS |
float |
z_index |
COLOR, DASHES, DASHES_BACKGROUND_COLOR, DASHES_BACKGROUND_OPACITY, DASHES_OFFSET, FILL_COLOR, FILL_IMAGE, FILL_OPACITY, ICON_HEIGHT_IDX, ICON_IMAGE, ICON_IMAGE_IDX, ICON_OPACITY_IDX, ICON_WIDTH_IDX, MODIFIER, OBJECT_Z_INDEX, OFFSET, OPACITY, REAL_WIDTH, REPEAT_IMAGE, REPEAT_IMAGE_ALIGN, REPEAT_IMAGE_OFFSET, REPEAT_IMAGE_PHASE, REPEAT_IMAGE_SPACING, TEXT, TEXT_POSITION, WIDTH, Z_INDEX
Modifier | Constructor and Description |
---|---|
protected |
ElemStyle(Cascade c,
float default_major_z_index) |
|
ElemStyle(float major_z_index,
float z_index,
float object_z_index,
boolean isModifier) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
private static Font |
getCachedFont(ElemStyle.FontDescriptor fd) |
private static Font |
getCachedFont(String name,
int style,
int size) |
protected static Font |
getFont(Cascade c) |
protected static Float |
getWidth(Cascade c,
String key,
Float relativeTo)
Get a property value of type Width
|
int |
hashCode() |
private static void |
initDefaultFontParameters() |
boolean |
isProperLineStyle() |
abstract void |
paintPrimitive(OsmPrimitive primitive,
MapPaintSettings paintSettings,
StyledMapRenderer painter,
boolean selected,
boolean member)
draws a primitive
|
String |
toString() |
protected static final String[] REPEAT_IMAGE_KEYS
public float major_z_index
public float z_index
public float object_z_index
public boolean isModifier
private static String DEFAULT_FONT_NAME
private static Float DEFAULT_FONT_SIZE
private static final Map<ElemStyle.FontDescriptor,Font> FONT_MAP
public ElemStyle(float major_z_index, float z_index, float object_z_index, boolean isModifier)
public abstract void paintPrimitive(OsmPrimitive primitive, MapPaintSettings paintSettings, StyledMapRenderer painter, boolean selected, boolean member)
primitive
- paintSettings
- painter
- selected
- true, if primitive is selectedmember
- true, if primitive is not selected and member of a selected relationpublic boolean isProperLineStyle()
protected static Float getWidth(Cascade c, String key, 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 void initDefaultFontParameters()
private static Font getCachedFont(ElemStyle.FontDescriptor fd)
private static Font getCachedFont(String name, int style, int size)