org.openstreetmap.josm.gui.mappaint
Class ElemStyle
java.lang.Object
org.openstreetmap.josm.gui.mappaint.ElemStyle
- All Implemented Interfaces:
- StyleKeys
- Direct Known Subclasses:
- AreaElemStyle, BoxTextElemStyle, LineElemStyle, LinePatternElemStyle, LineTextElemStyle, NodeElemStyle
public abstract class ElemStyle
- extends java.lang.Object
- implements StyleKeys
Fields inherited from interface org.openstreetmap.josm.gui.mappaint.StyleKeys |
COLOR, DASHES, DASHES_BACKGROUND_COLOR, DASHES_BACKGROUND_OPACITY, DASHES_OFFSET, FILL_COLOR, FILL_IMAGE, FILL_OPACITY, ICON_IMAGE, MODIFIER, OBJECT_Z_INDEX, OFFSET, OPACITY, REAL_WIDTH, TEXT, TEXT_POSITION, WIDTH, Z_INDEX |
Constructor Summary |
protected |
ElemStyle(Cascade c,
float default_major_z_index)
|
|
ElemStyle(float major_z_index,
float z_index,
float object_z_index,
boolean isModifier)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
major_z_index
public float major_z_index
z_index
public float z_index
object_z_index
public float object_z_index
isModifier
public boolean isModifier
DEFAULT_FONT_NAME
private static java.lang.String DEFAULT_FONT_NAME
DEFAULT_FONT_SIZE
private static java.lang.Float DEFAULT_FONT_SIZE
FONT_MAP
private static final java.util.Map<ElemStyle.FontDescriptor,java.awt.Font> FONT_MAP
ElemStyle
public ElemStyle(float major_z_index,
float z_index,
float object_z_index,
boolean isModifier)
ElemStyle
protected ElemStyle(Cascade c,
float default_major_z_index)
paintPrimitive
public abstract void paintPrimitive(OsmPrimitive primitive,
MapPaintSettings paintSettings,
MapPainter painter,
boolean selected,
boolean member)
- draws a primitive
- Parameters:
primitive
- paintSettings
- painter
- selected
- true, if primitive is selectedmember
- true, if primitive is not selected and member of a selected relation
isProperLineStyle
public boolean isProperLineStyle()
getWidth
protected static java.lang.Float getWidth(Cascade c,
java.lang.String key,
java.lang.Float relativeTo)
- Get a property value of type Width
- Parameters:
c
- the cascadekey
- property key for the width valuerelativeTo
- reference width. Only needed, when relative width syntax
is used, e.g. "+4".
initDefaultFontParameters
private static void initDefaultFontParameters()
getCachedFont
private static java.awt.Font getCachedFont(ElemStyle.FontDescriptor fd)
getCachedFont
private static java.awt.Font getCachedFont(java.lang.String name,
int style,
int size)
getFont
protected static java.awt.Font getFont(Cascade c)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
JOSM