Uses of Class
org.openstreetmap.josm.gui.mappaint.Environment
Packages that use Environment
Package
Description
Provides the classes for JOSM data validation tests.
Drawing system allowing to display and render OSM map data in a user-friendly and customizable way, through map styles.
Two implementations are provided: XML: this was the system used by default JOSM map style for a long time.
Two implementations are provided: XML: this was the system used by default JOSM map style for a long time.
Drawing system based on MapCSS map styles.
Style elements defining how a map paint style is rendered.
-
Uses of Environment in org.openstreetmap.josm.data.validation.tests
Methods in org.openstreetmap.josm.data.validation.tests with parameters of type EnvironmentModifier and TypeMethodDescriptionMapCSSTagCheckerRule.getErrorsForPrimitive(OsmPrimitive p, Selector matchingSelector, Environment env, Test tester) Constructs aTestErrorfor the given primitive, or returns null if the primitive does not give rise to an error.(package private) SelectorMapCSSTagCheckerRule.whichSelectorMatchesEnvironment(Environment env) -
Uses of Environment in org.openstreetmap.josm.gui.mappaint
Methods in org.openstreetmap.josm.gui.mappaint that return EnvironmentModifier and TypeMethodDescriptionEnvironment.clearSelectorMatchingInformation()Clears all matching context informationEnvironment.withChild(IPrimitive child) Creates a clone of this environment, with the specified child.Environment.withChildAndIndexAndLinkContext(IPrimitive child, int index, int count) Creates a clone of this environment, with the specified child, index, and context set toCondition.Context.LINK.Environment.withContext(Condition.Context context) Creates a clone of this environment, with the specifiedCondition.Context.Environment.withIndex(int index, int count) Creates a clone of this environment, with the specified index.Environment.withLinkContext()Creates a clone of this environment, with context set toCondition.Context.LINK.Environment.withParent(IPrimitive parent) Creates a clone of this environment, with the specified parent.Environment.withParentAndIndexAndLinkContext(IPrimitive parent, int index, int count) Creates a clone of this environment, with the specified parent, index, and context set toCondition.Context.LINK.Environment.withPrimitive(IPrimitive osm) Creates a clone of this environment, with the specified primitive.Environment.withSelector(Selector selector) Creates a clone of this environment, with the selector setConstructors in org.openstreetmap.josm.gui.mappaint with parameters of type EnvironmentModifierConstructorDescriptionEnvironment(Environment other) Creates a clone of the environmentother.privateEnvironment(Environment other, Selector selector) Creates a clone of the environmentother. -
Uses of Environment in org.openstreetmap.josm.gui.mappaint.mapcss
Fields in org.openstreetmap.josm.gui.mappaint.mapcss declared as EnvironmentModifier and TypeFieldDescriptionprotected final EnvironmentSelector.ChildOrParentSelector.AbstractFinder.eprivate final EnvironmentSelector.ChildOrParentSelector.MatchingReferrerFinder.eFields in org.openstreetmap.josm.gui.mappaint.mapcss with type parameters of type EnvironmentModifier and TypeFieldDescriptionprivate final Predicate<Environment>ConditionFactory.PseudoClassCondition.predicateMethods in org.openstreetmap.josm.gui.mappaint.mapcss with parameters of type EnvironmentModifier and TypeMethodDescription(package private) static booleanConditionFactory.PseudoClasses._new(Environment e) :newtests whether the object is new.protected voidSelector.ChildOrParentSelector.AbstractFinder.addToChildren(Environment e, IPrimitive p) (package private) static booleanConditionFactory.PseudoClasses.anticlockwise(Environment e) :anticlockwisewhether the way is closed and oriented anticlockwise, or non-closed and the 1st, 2nd and last node are in anticlockwise order.static ObjectFunctions.any(Environment ignored, Object... args) Returns the first non-null object.booleanCondition.applies(Environment e) Checks if the condition applies in the given MapCSSEnvironment.default booleanCondition.TagCondition.applies(Environment e) booleanConditionFactory.ClassCondition.applies(Environment env) booleanConditionFactory.ExpressionCondition.applies(Environment env) booleanConditionFactory.IndexCondition.applies(Environment env) booleanConditionFactory.OpenEndPseudoClassCondition.applies(Environment e) booleanConditionFactory.PseudoClassCondition.applies(Environment e) booleanConditionFactory.RoleCondition.applies(Environment env) static FloatFunctions.areasize(Environment env) Returns the area of a closed way or multipolygon in square meters ornull.(package private) static booleanConditionFactory.PseudoClasses.areaStyle(Environment e) :area-styletests whether the object has an area style.static booleanFunctions.at(Environment env, double lat, double lon) Determines if the object centroid lies at given lat/lon coordinates.static LatLonFunctions.center(Environment env) Returns the center of the environment OSM primitive.static StringFunctions.child_tag(Environment env, String key) Gets the value of the keykeyfrom the object's child.(package private) static booleanConditionFactory.PseudoClasses.clockwise(Environment e) :clockwisewhether the way is closed and oriented clockwise, or non-closed and the 1st, 2nd and last node are in clockwise order.(package private) static booleanConditionFactory.PseudoClasses.closed(Environment e) :closedtests whether the way is closed or the relation is a closed multipolygon(package private) static booleanConditionFactory.PseudoClasses.closed2(Environment e) (package private) static booleanConditionFactory.PseudoClasses.completely_downloaded(Environment e) :completely_downloadedtests whether the object is completely downloadedstatic StringFunctions.concat(Environment ignored, Object... args) Assembles the strings to one.(package private) static booleanConditionFactory.PseudoClasses.connection(Environment e) :connectiontests whether the object is a connection node.static intFunctions.count_roles(Environment env, String... roles) Returns the number of primitives in a relation with the specified roles.Expression.evaluate(Environment env) Evaluate this expression.ExpressionFactory.AndOperator.evaluate(Environment env) ExpressionFactory.CondOperator.evaluate(Environment env) ExpressionFactory.IsInsideFunction.evaluate(Environment env) ExpressionFactory.LengthFunction.evaluate(Environment env) ExpressionFactory.MinMaxFunction.evaluate(Environment env) ExpressionFactory.NullExpression.evaluate(Environment env) ExpressionFactory.OrOperator.evaluate(Environment env) LiteralExpression.evaluate(Environment env) PlaceholderExpression.evaluate(Environment env) voidDeclaration.execute(Environment env) Executes the instructions against the environmentenvvoidInstruction.AssignmentInstruction.execute(Environment env) voidInstruction.execute(Environment env) Execute the instruction in the given environment.voidMapCSSRule.execute(Environment env) Executes the instructions against the environmentenvprivate AreaSelector.ChildOrParentSelector.CrossingFinder.getAreaEastNorth(IPrimitive p, Environment e) Subpart.ExpressionSubpart.getId(Environment env) Subpart.getId(Environment env) Gets the ID of the subpartSubpart.StringSubpart.getId(Environment env) static doubleFunctions.gpx_distance(Environment env) Returns the lowest distance between the OSM object and a GPX pointstatic booleanFunctions.has_tag_key(Environment env, String key) Determines whether the object has a tag with the given key.(package private) static booleanConditionFactory.PseudoClasses.highlighted(Environment e) :highlightedtests whether the object is highlighted (i.e.static FloatFunctions.index(Environment env) Returns the index of node in parent way or member in parent relation.(package private) static booleanConditionFactory.PseudoClasses.inDownloadedArea(Environment e) :in-downloaded-areatests whether the object is within source area ("downloaded area").static booleanFunctions.inside(Environment env, String codes) Determines if the object is inside territories matching given ISO3166 codes.static booleanFunctions.is_anticlockwise(Environment env) Determines whether the way isclosed and oriented anticlockwise, or non-closed and the1st, 2nd and last node are in anticlockwise order.static booleanFunctions.is_clockwise(Environment env) Determines whether the way isclosed and oriented clockwise, or non-closed and the1st, 2nd and last node are in clockwise order.static BooleanFunctions.is_prop_set(Environment env, String key) Determines whether propertykeyis set.static BooleanFunctions.is_prop_set(Environment env, String key, String layer) Determines whether propertykeyis set on layerlayer.static booleanFunctions.is_right_hand_traffic(Environment env) check if there is right-hand traffic at the current locationstatic StringFunctions.join(Environment ignored, String... args) Assembles the strings to one, where the first entry is used as separator.static StringFunctions.JOSM_pref(Environment env, String key, String def) static BooleanFunctions.JOSM_search(Environment env, String searchStr) Determines whether the JOSM search withsearchStrapplies to the object.Functions.list(Environment ignored, Object... args) Creates a list of values, e.g., for thedashesproperty.private static voidMapCSSStyleSource.loadSettings(MapCSSRule r, Selector.GeneralSelector gs, Environment env) booleanMapCSSRule.matches(Environment env) Test whether the selector of this rule applies to the primitive.booleanSelector.AbstractSelector.matches(Environment env) Determines if all conditions match the given environment.booleanSelector.ChildOrParentSelector.matches(Environment e) booleanSelector.GeneralSelector.matches(Environment e) booleanSelector.LinkSelector.matches(Environment env) booleanSelector.matches(Environment env) Apply the selector to the primitive and check if it matches.booleanSelector.GeneralSelector.matchesBase(Environment e) booleanSelector.GeneralSelector.matchesConditions(Environment e) (package private) static booleanConditionFactory.PseudoClasses.modified(Environment e) :modifiedtests whether the object has been modified.static intFunctions.number_of_tags(Environment env) Get the number of tags for the current primitive.static intFunctions.osm_changeset_id(Environment env) Returns the id of the changeset the current object was last uploaded to.static longFunctions.osm_id(Environment env) Returns the OSM id of the current object.static intFunctions.osm_timestamp(Environment env) Returns the time of last modification to the current object, as timestamp.static longFunctions.osm_user_id(Environment env) Returns the OSM user id who last touched the current object.static StringFunctions.osm_user_name(Environment env) Returns the OSM user name who last touched the current object.static intFunctions.osm_version(Environment env) Returns the version number of the current object.static booleanFunctions.outside(Environment env, String codes) Determines if the object is outside territories matching given ISO3166 codes.static LongFunctions.parent_osm_id(Environment env) Returns the OSM id of the object's parent.static List<IPrimitive>Functions.parent_osm_primitives(Environment env) Gets a list of all OSM id's of the object's parent(s).static List<IPrimitive>Functions.parent_osm_primitives(Environment env, String key) Gets a list of all OSM id's of the object's parent(s) with a specified key.static List<IPrimitive>Functions.parent_osm_primitives(Environment env, String key, String keyValue) Gets a list of all OSM id's of the object's parent(s) with a specified key.static StringFunctions.parent_tag(Environment env, String key) Gets the first non-null value of the keykeyfrom the object's parent(s).Functions.parent_tags(Environment env, String key) Gets a list of all non-null values of the keykeyfrom the object's parent(s).static DoubleFunctions.parent_way_angle(Environment env) Get the rotation angle of the preceding parent way segment at the node location.static ObjectFunctions.prop(Environment env, String key) Returns the value of the propertykey, e.g.,prop("width").static ObjectFunctions.prop(Environment env, String key, String layer) Returns the value of the propertykeyfrom layerlayer.(package private) static booleanConditionFactory.PseudoClasses.righthandtraffic(Environment e) :righthandtrafficchecks if there is right-hand traffic at the current location.static StringFunctions.role(Environment env) Returns the role of current object in parent relation, or role of child if current object is a relation.(package private) static booleanConditionFactory.PseudoClasses.sameTags(Environment e) :same-tagstests whether the object has the same tags as its child/parent.(package private) static booleanConditionFactory.PseudoClasses.selected(Environment e) :selectedtests whether the object is selected in the editorstatic ObjectFunctions.setting(Environment env, String key) Get value of a setting.Functions.sort(Environment ignored, String... sortables) Sort an array of stringsstatic StringFunctions.tag(Environment env, String key) Gets the value of the keykeyfrom the object in question.Functions.tag_regex(Environment env, String keyRegex) Get keys that follow a regexFunctions.tag_regex(Environment env, String keyRegex, String flags) Get keys that follow a regex(package private) static booleanConditionFactory.PseudoClasses.tagged(Environment e) :taggedtests whether the object is tagged.static StringFunctions.tr(Environment ignored, String... args) Translates some text for the current locale.(package private) static booleanConditionFactory.PseudoClasses.unclosed_multipolygon(Environment e) :unclosed-multipolygontests whether the object is an unclosed multipolygon.(package private) static booleanConditionFactory.PseudoClasses.unconnected(Environment e) :unconnectedtests whether the object is an unconnected node.Functions.uniq(Environment ignored, String... values) Get unique valuesprivate voidSelector.ChildOrParentSelector.visitBBox(Environment e, Selector.ChildOrParentSelector.AbstractFinder finder) static FloatFunctions.waylength(Environment env) Returns the length of the way in metres ornull.Method parameters in org.openstreetmap.josm.gui.mappaint.mapcss with type arguments of type EnvironmentModifier and TypeMethodDescriptionstatic <T,U> ExpressionFactory.Factory ExpressionFactory.Factory.ofEnv(Class<T> type1, Class<U> type2, BiFunction<Environment, T, ?> biFunction, ExpressionFactory.TriFunction<Environment, T, U, ?> triFunction) Create aExpressionFactory.Factoryfor an overloaded functionstatic <T,U> ExpressionFactory.Factory ExpressionFactory.Factory.ofEnv(Class<T> type1, Class<U> type2, BiFunction<Environment, T, ?> biFunction, ExpressionFactory.TriFunction<Environment, T, U, ?> triFunction) Create aExpressionFactory.Factoryfor an overloaded functionstatic <T,U> ExpressionFactory.Factory ExpressionFactory.Factory.ofEnv(Class<T> type1, Class<U> type2, Function<Environment, ?> function, BiFunction<Environment, T, ?> biFunction, ExpressionFactory.TriFunction<Environment, T, U, ?> triFunction) Create aExpressionFactory.Factoryfor an overloaded functionstatic <T,U> ExpressionFactory.Factory ExpressionFactory.Factory.ofEnv(Class<T> type1, Class<U> type2, Function<Environment, ?> function, BiFunction<Environment, T, ?> biFunction, ExpressionFactory.TriFunction<Environment, T, U, ?> triFunction) Create aExpressionFactory.Factoryfor an overloaded functionstatic <T,U> ExpressionFactory.Factory ExpressionFactory.Factory.ofEnv(Class<T> type1, Class<U> type2, Function<Environment, ?> function, BiFunction<Environment, T, ?> biFunction, ExpressionFactory.TriFunction<Environment, T, U, ?> triFunction) Create aExpressionFactory.Factoryfor an overloaded functionstatic <T> ExpressionFactory.FactoryExpressionFactory.Factory.ofEnv(Class<T> type, BiFunction<Environment, T, ?> function) Create aExpressionFactory.Factoryfor a function that takes a parameterstatic ExpressionFactory.FactoryExpressionFactory.Factory.ofEnv(Function<Environment, ?> function) Create aExpressionFactory.Factoryfor a functionstatic ExpressionFactory.FactoryExpressionFactory.Factory.ofObjectVarargs(BiFunction<Environment, Object[], ?> function) static ExpressionFactory.FactoryExpressionFactory.Factory.ofStringVarargs(BiFunction<Environment, String[], ?> function) private static voidConditionFactory.PseudoClassCondition.register(String name, Predicate<Environment> predicate) Constructors in org.openstreetmap.josm.gui.mappaint.mapcss with parameters of type EnvironmentModifierConstructorDescriptionprotectedprotectedprivateprotected(package private)Constructor(package private)Constructor parameters in org.openstreetmap.josm.gui.mappaint.mapcss with type arguments of type EnvironmentModifierConstructorDescriptionprotectedPseudoClassCondition(String name, Predicate<Environment> predicate) -
Uses of Environment in org.openstreetmap.josm.gui.mappaint.styleelement
Methods in org.openstreetmap.josm.gui.mappaint.styleelement with parameters of type EnvironmentModifier and TypeMethodDescriptionprivate static floatLineElement.computeRealWidth(Environment env, LineElement.LineType type, Cascade c) static AreaElementAreaElement.create(Environment env) Create a newAreaElementstatic AreaIconElementAreaIconElement.create(Environment env) Create a newAreaIconElementstatic BoxTextElementBoxTextElement.create(Environment env, BoxTextElement.BoxProvider boxProvider) Create a newBoxTextElementwith a boxprovider and a box.static NodeElementNodeElement.create(Environment env) Creates a new node element for the given Environment(package private) static NodeElementNodeElement.create(Environment env, float defaultMajorZindex, boolean allowDefault) static RepeatImageElementRepeatImageElement.create(Environment env) Create a RepeatImageElement from the given environmentstatic TextElementTextElement.create(Environment env) Create a new text elementstatic TextLabelTextLabel.create(Environment env, Color defaultTextColor, boolean defaultAnnotate) Builds a text element from style properties incand the default text colordefaultTextColorstatic LineElementLineElement.createCasing(Environment env) Create a line element for the casing from the given MapCSS environmentstatic TextElementTextElement.createForContent(Environment env) JOSM traditionally adds both line and content text elements if a fill style was set.static MapImageNodeElement.createIcon(Environment env) Create a map icon for the environment using the default keys.static MapImageNodeElement.createIcon(Environment env, String... keys) Create a map icon for the environment.private static LineElementLineElement.createImpl(Environment env, LineElement.LineType type) static LineElementLineElement.createLeftCasing(Environment env) Create a line element for the left casing from the given MapCSS environmentstatic LineElementLineElement.createLine(Environment env) Create a line element from the given MapCSS environmentstatic LineElementLineElement.createRightCasing(Environment env) Create a line element for the right casing from the given MapCSS environmentstatic RotationAngleNodeElement.createRotationAngle(Environment env) Reads the icon-rotation property and creates a rotation angle from it.private static RotationAngleNodeElement.createRotationAngle(Environment env, String key) private static SymbolNodeElement.createSymbol(Environment env) Create a symbol for the environmentstatic RotationAngleNodeElement.createTextRotationAngle(Environment env) Reads the text-rotation property and creates a rotation angle from it.