Ignore:
Timestamp:
2018-05-21T20:42:27+02:00 (6 years ago)
Author:
Don-vip
Message:

support rendering of IPrimitive

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java

    r12378 r13810  
    22package org.openstreetmap.josm.gui.mappaint;
    33
    4 import org.openstreetmap.josm.data.osm.OsmPrimitive;
     4import org.openstreetmap.josm.data.osm.IPrimitive;
    55import org.openstreetmap.josm.data.osm.Relation;
    66import org.openstreetmap.josm.gui.mappaint.mapcss.Condition.Context;
     
    1818     * The primitive that is currently evaluated
    1919     */
    20     public OsmPrimitive osm;
     20    public IPrimitive osm;
    2121
    2222    /**
     
    4343     * is evaluated in a {@link LinkSelector} (within a child selector)
    4444     */
    45     public OsmPrimitive parent;
     45    public IPrimitive parent;
    4646
    4747    /**
    4848     * The same for parent selector. Only one of the 2 fields (parent or child) is not null in any environment.
    4949     */
    50     public OsmPrimitive child;
     50    public IPrimitive child;
    5151
    5252    /**
     
    7171     * @param osm OSM primitive
    7272     * @since 8415
    73      */
    74     public Environment(OsmPrimitive osm) {
     73     * @since 13810 (signature)
     74     */
     75    public Environment(IPrimitive osm) {
    7576        this.osm = osm;
    7677    }
     
    8283     * @param layer layer
    8384     * @param source style source
    84      */
    85     public Environment(OsmPrimitive osm, MultiCascade mc, String layer, StyleSource source) {
     85     * @since 13810 (signature)
     86     */
     87    public Environment(IPrimitive osm, MultiCascade mc, String layer, StyleSource source) {
    8688        this.osm = osm;
    8789        this.mc = mc;
     
    114116     * @return A clone of this environment, with the specified primitive
    115117     * @see #osm
    116      */
    117     public Environment withPrimitive(OsmPrimitive osm) {
     118     * @since 13810 (signature)
     119     */
     120    public Environment withPrimitive(IPrimitive osm) {
    118121        Environment e = new Environment(this);
    119122        e.osm = osm;
     
    126129     * @return A clone of this environment, with the specified parent
    127130     * @see #parent
    128      */
    129     public Environment withParent(OsmPrimitive parent) {
     131     * @since 13810 (signature)
     132     */
     133    public Environment withParent(IPrimitive parent) {
    130134        Environment e = new Environment(this);
    131135        e.parent = parent;
     
    142146     * @see #index
    143147     * @since 6175
    144      */
    145     public Environment withParentAndIndexAndLinkContext(OsmPrimitive parent, int index, int count) {
     148     * @since 13810 (signature)
     149     */
     150    public Environment withParentAndIndexAndLinkContext(IPrimitive parent, int index, int count) {
    146151        Environment e = new Environment(this);
    147152        e.parent = parent;
     
    157162     * @return A clone of this environment, with the specified child
    158163     * @see #child
    159      */
    160     public Environment withChild(OsmPrimitive child) {
     164     * @since 13810 (signature)
     165     */
     166    public Environment withChild(IPrimitive child) {
    161167        Environment e = new Environment(this);
    162168        e.child = child;
     
    173179     * @see #index
    174180     * @since 6175
    175      */
    176     public Environment withChildAndIndexAndLinkContext(OsmPrimitive child, int index, int count) {
     181     * @since 13810 (signature)
     182     */
     183    public Environment withChildAndIndexAndLinkContext(IPrimitive child, int index, int count) {
    177184        Environment e = new Environment(this);
    178185        e.child = child;
Note: See TracChangeset for help on using the changeset viewer.