Class ConditionFactory.PseudoClasses
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.mapcss.ConditionFactory.PseudoClasses
-
- Enclosing class:
- ConditionFactory
public static final class ConditionFactory.PseudoClasses extends java.lang.Object
Like CSS pseudo classes, MapCSS pseudo classes are written in lower case with dashes between words.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.function.Predicate<OsmPrimitive>
IN_DOWNLOADED_AREA
-
Constructor Summary
Constructors Modifier Constructor Description private
PseudoClasses()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static boolean
_new(Environment e)
:new
tests whether the object is new.(package private) static boolean
anticlockwise(Environment e)
:anticlockwise
whether the way is closed and oriented anticlockwise, or non-closed and the 1st, 2nd and last node are in anticlockwise order.(package private) static boolean
areaStyle(Environment e)
:area-style
tests whether the object has an area style.(package private) static boolean
clockwise(Environment e)
:clockwise
whether the way is closed and oriented clockwise, or non-closed and the 1st, 2nd and last node are in clockwise order.(package private) static boolean
closed(Environment e)
:closed
tests whether the way is closed or the relation is a closed multipolygon(package private) static boolean
closed2(Environment e)
(package private) static boolean
completely_downloaded(Environment e)
:completely_downloaded
tests whether the object is completely downloaded(package private) static boolean
connection(Environment e)
:connection
tests whether the object is a connection node.(package private) static boolean
highlighted(Environment e)
:highlighted
tests whether the object is highlighted (i.e.(package private) static boolean
inDownloadedArea(Environment e)
:in-downloaded-area
tests whether the object is within source area ("downloaded area").(package private) static boolean
modified(Environment e)
:modified
tests whether the object has been modified.(package private) static boolean
righthandtraffic(Environment e)
:righthandtraffic
checks if there is right-hand traffic at the current location.(package private) static boolean
sameTags(Environment e)
:same-tags
tests whether the object has the same tags as its child/parent.(package private) static boolean
selected(Environment e)
:selected
tests whether the object is selected in the editor(package private) static boolean
tagged(Environment e)
:tagged
tests whether the object is tagged.(package private) static boolean
unclosed_multipolygon(Environment e)
:unclosed-multipolygon
tests whether the object is an unclosed multipolygon.(package private) static boolean
unconnected(Environment e)
:unconnected
tests whether the object is an unconnected node.
-
-
-
Field Detail
-
IN_DOWNLOADED_AREA
private static final java.util.function.Predicate<OsmPrimitive> IN_DOWNLOADED_AREA
-
-
Constructor Detail
-
PseudoClasses
private PseudoClasses()
-
-
Method Detail
-
closed
static boolean closed(Environment e)
:closed
tests whether the way is closed or the relation is a closed multipolygon- Parameters:
e
- MapCSS environment- Returns:
true
if the way is closed or the relation is a closed multipolygon
-
modified
static boolean modified(Environment e)
:modified
tests whether the object has been modified.- Parameters:
e
- MapCSS environment- Returns:
true
if the object has been modified- See Also:
IPrimitive.isModified()
-
_new
static boolean _new(Environment e)
:new
tests whether the object is new.- Parameters:
e
- MapCSS environment- Returns:
true
if the object is new- See Also:
PrimitiveId.isNew()
-
connection
static boolean connection(Environment e)
:connection
tests whether the object is a connection node.- Parameters:
e
- MapCSS environment- Returns:
true
if the object is a connection node- See Also:
INode.isConnectionNode()
-
tagged
static boolean tagged(Environment e)
:tagged
tests whether the object is tagged.- Parameters:
e
- MapCSS environment- Returns:
true
if the object is tagged- See Also:
IPrimitive.isTagged()
-
sameTags
static boolean sameTags(Environment e)
:same-tags
tests whether the object has the same tags as its child/parent.- Parameters:
e
- MapCSS environment- Returns:
true
if the object has the same tags as its child/parent- See Also:
IPrimitive.hasSameInterestingTags(IPrimitive)
-
areaStyle
static boolean areaStyle(Environment e)
:area-style
tests whether the object has an area style. This is useful for validators.- Parameters:
e
- MapCSS environment- Returns:
true
if the object has an area style- See Also:
ElemStyles.hasAreaElemStyle(IPrimitive, boolean)
-
unconnected
static boolean unconnected(Environment e)
:unconnected
tests whether the object is an unconnected node.- Parameters:
e
- MapCSS environment- Returns:
true
if the object is an unconnected node
-
righthandtraffic
static boolean righthandtraffic(Environment e)
:righthandtraffic
checks if there is right-hand traffic at the current location.- Parameters:
e
- MapCSS environment- Returns:
true
if there is right-hand traffic at the current location- See Also:
Functions.is_right_hand_traffic(Environment)
-
clockwise
static boolean clockwise(Environment e)
:clockwise
whether the way is closed and oriented clockwise, or non-closed and the 1st, 2nd and last node are in clockwise order.- Parameters:
e
- MapCSS environment- Returns:
true
if the way clockwise- See Also:
Functions.is_clockwise(Environment)
-
anticlockwise
static boolean anticlockwise(Environment e)
:anticlockwise
whether the way is closed and oriented anticlockwise, or non-closed and the 1st, 2nd and last node are in anticlockwise order.- Parameters:
e
- MapCSS environment- Returns:
true
if the way clockwise- See Also:
Functions.is_anticlockwise(Environment)
-
unclosed_multipolygon
static boolean unclosed_multipolygon(Environment e)
:unclosed-multipolygon
tests whether the object is an unclosed multipolygon.- Parameters:
e
- MapCSS environment- Returns:
true
if the object is an unclosed multipolygon
-
inDownloadedArea
static boolean inDownloadedArea(Environment e)
:in-downloaded-area
tests whether the object is within source area ("downloaded area").- Parameters:
e
- MapCSS environment- Returns:
true
if the object is within source area ("downloaded area")- See Also:
SearchCompiler.InDataSourceArea
-
completely_downloaded
static boolean completely_downloaded(Environment e)
:completely_downloaded
tests whether the object is completely downloaded- Parameters:
e
- MapCSS environment- Returns:
true
if the object is completely downloaded
-
closed2
static boolean closed2(Environment e)
-
selected
static boolean selected(Environment e)
:selected
tests whether the object is selected in the editor- Parameters:
e
- MapCSS environment- Returns:
true
if the object is selected
-
highlighted
static boolean highlighted(Environment e)
:highlighted
tests whether the object is highlighted (i.e. is hovered over)- Parameters:
e
- The MapCSS environment- Returns:
true
if the object is highlighted- Since:
- 17862
- See Also:
IPrimitive.isHighlighted()
-
-