Class AreaElement
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement
-
- org.openstreetmap.josm.gui.mappaint.styleelement.AreaElement
-
- All Implemented Interfaces:
StyleKeys
public class AreaElement extends StyleElement
This is the style that defines how an area is filled.
-
-
Field Summary
Fields Modifier and Type Field Description java.awt.Color
color
If fillImage == null, color is the fill-color, otherwise an arbitrary color value sampled from the fillImage.private static IntegerProperty
DEFAULT_FILL_ALPHA
The default opacity for the fill.java.lang.Float
extent
Fill the area only partially from the bordersjava.lang.Float
extentThreshold
Areas smaller than this are filled no matter what valueextent
has.MapImage
fillImage
An image to cover this area.-
Fields inherited from class org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement
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
-
Fields inherited from interface org.openstreetmap.josm.gui.mappaint.StyleKeys
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, TEXT_ROTATION, WAY_DIRECTION_ARROWS, WIDTH, Z_INDEX
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AreaElement(Cascade c, java.awt.Color color, MapImage fillImage, java.lang.Float extent, java.lang.Float extentThreshold)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AreaElement
create(Environment env)
Create a newAreaElement
boolean
equals(java.lang.Object obj)
int
hashCode()
void
paintPrimitive(IPrimitive osm, MapPaintSettings paintSettings, StyledMapRenderer painter, boolean selected, boolean outermember, boolean member)
draws a primitivejava.lang.String
toString()
-
Methods inherited from class org.openstreetmap.josm.gui.mappaint.styleelement.StyleElement
getFont, getWidth, isProperLineStyle
-
-
-
-
Field Detail
-
DEFAULT_FILL_ALPHA
private static final IntegerProperty DEFAULT_FILL_ALPHA
The default opacity for the fill. For historical reasons in range 0.255.
-
color
public java.awt.Color color
If fillImage == null, color is the fill-color, otherwise an arbitrary color value sampled from the fillImage. The color may be fully transparent to indicate that the area should not be filled.
-
fillImage
public MapImage fillImage
An image to cover this area. May be null to disable this feature.
-
extent
public java.lang.Float extent
Fill the area only partially from the bordersPublic access is discouraged.
-
extentThreshold
public java.lang.Float extentThreshold
Areas smaller than this are filled no matter what valueextent
has.Public access is discouraged.
-
-
Constructor Detail
-
AreaElement
protected AreaElement(Cascade c, java.awt.Color color, MapImage fillImage, java.lang.Float extent, java.lang.Float extentThreshold)
-
-
Method Detail
-
create
public static AreaElement create(Environment env)
Create a newAreaElement
- Parameters:
env
- The current style definitions- Returns:
- The area element or
null
if the area should not be filled.
-
paintPrimitive
public void paintPrimitive(IPrimitive osm, MapPaintSettings paintSettings, StyledMapRenderer painter, boolean selected, boolean outermember, boolean member)
Description copied from class:StyleElement
draws a primitive- Specified by:
paintPrimitive
in classStyleElement
- Parameters:
osm
- 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 relation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classStyleElement
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classStyleElement
-
toString
public java.lang.String toString()
- Overrides:
toString
in classStyleElement
-
-