Class Selector.GeneralSelector
java.lang.Object
org.openstreetmap.josm.gui.mappaint.mapcss.Selector.AbstractSelector
org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector
- All Implemented Interfaces:
Selector
- Enclosing interface:
- Selector
General selector. See wiki
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.mappaint.mapcss.Selector
Selector.AbstractSelector, Selector.ChildOrParentSelector, Selector.ChildOrParentSelectorType, Selector.GeneralSelector, Selector.LinkSelector -
Field Summary
FieldsFields inherited from interface org.openstreetmap.josm.gui.mappaint.mapcss.Selector
BASE_ANY, BASE_AREA, BASE_CANVAS, BASE_META, BASE_NODE, BASE_RELATION, BASE_SETTING, BASE_SETTINGS, BASE_WAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringSet base and check if this is a known value.static RangefromLevel(int a, int b) getBase()getRange()Returns the scale range, an interval of the form "lower < x <= upper" where 0 <= lower < upper.Returns the subpart, if supported.static doublelevel2scale(int lvl) booleanDetermines if all conditions match the given environment.booleanbooleanmatchesBase(OsmPrimitiveType type) booleanbooleanstatic intscale2level(double scale) toString()Methods inherited from class org.openstreetmap.josm.gui.mappaint.mapcss.Selector.AbstractSelector
getConditions
-
Field Details
-
base
-
range
-
subpart
-
-
Constructor Details
-
GeneralSelector
-
-
Method Details
-
getSubpart
Description copied from interface:SelectorReturns the subpart, if supported. A subpart identifies different rendering layers (::subpartsyntax).- Returns:
- the subpart, if supported
-
getRange
Description copied from interface:SelectorReturns the scale range, an interval of the form "lower < x <= upper" where 0 <= lower < upper.- Returns:
- the scale range, if supported
-
matchesConditions
-
matches
Description copied from class:Selector.AbstractSelectorDetermines if all conditions match the given environment.- Specified by:
matchesin interfaceSelector- Overrides:
matchesin classSelector.AbstractSelector- Parameters:
e- The environment to check- Returns:
trueif all conditions apply, false otherwise.
-
checkBase
Set base and check if this is a known value.- Parameters:
base- value for base- Returns:
- the matching String constant for a known value
- Throws:
IllegalArgumentException- if value is not knwon
-
getBase
-
matchesBase
-
matchesBase
-
matchesBase
-
fromLevel
-
level2scale
-
scale2level
-
toString
-