Class MultiCascade
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.MultiCascade
-
- All Implemented Interfaces:
StyleKeys
public class MultiCascade extends java.lang.Object implements StyleKeys
Several layers / cascades, e.g. one for the main Line and one for each overlay. The range is (0,Infinity) at first and it shrinks in the process when StyleSources apply zoom level dependent properties.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Cascade>
layers
Range
range
The scale range this cascade is valid for-
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 Constructor Description MultiCascade()
Constructs a newMultiCascade
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cascade
getCascade(java.lang.String layer)
Read-only version ofgetOrCreateCascade(java.lang.String)
.java.util.Collection<java.util.Map.Entry<java.lang.String,Cascade>>
getLayers()
Gets all cascades for the known layersCascade
getOrCreateCascade(java.lang.String layer)
Return the cascade with the given name.boolean
hasLayer(java.lang.String layer)
Check whether this cascade has a given layer
-
-
-
Constructor Detail
-
MultiCascade
public MultiCascade()
Constructs a newMultiCascade
.
-
-
Method Detail
-
getOrCreateCascade
public Cascade getOrCreateCascade(java.lang.String layer)
Return the cascade with the given name. If it doesn't exist, create a new layer with that name and return it. The new layer will be a clone of the "*" layer, if it exists.- Parameters:
layer
- layer- Returns:
- cascade
-
getCascade
public Cascade getCascade(java.lang.String layer)
Read-only version ofgetOrCreateCascade(java.lang.String)
. For convenience, it returns an empty cascade for non-existing layers. However this empty (read-only) cascade is not added to this MultiCascade object.- Parameters:
layer
- layer- Returns:
- cascade
-
getLayers
public java.util.Collection<java.util.Map.Entry<java.lang.String,Cascade>> getLayers()
Gets all cascades for the known layers- Returns:
- The cascades for the layers
-
hasLayer
public boolean hasLayer(java.lang.String layer)
Check whether this cascade has a given layer- Parameters:
layer
- The layer to check for- Returns:
true
if it has that layer
-
-