source: josm/trunk/src/org/openstreetmap/josm/gui/mappaint/Environment.java@ 4011

Last change on this file since 4011 was 4011, checked in by bastiK, 14 years ago

applied #6150 - mapcss - improve parent_tag (based on patch by Gubaer)

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.mappaint;
3
4import java.util.Collection;
5import java.util.List;
6
7import org.openstreetmap.josm.data.osm.OsmPrimitive;
8import org.openstreetmap.josm.gui.mappaint.mapcss.Instruction;
9
10public class Environment {
11
12 public OsmPrimitive osm;
13 public MultiCascade mc;
14 public String layer;
15 public StyleSource source;
16
17 /**
18 * <p>When matching a child selector, the matching referrers will be stored.
19 * They can be accessed in {@link Instruction#execute(Environment)} to access
20 * tags from parent objects.</p>
21 */
22 private List<OsmPrimitive> matchingReferrers = null;
23
24 public Environment(OsmPrimitive osm, MultiCascade mc, String layer, StyleSource source) {
25 this.osm = osm;
26 this.mc = mc;
27 this.layer = layer;
28 this.source = source;
29 }
30
31 public Collection<OsmPrimitive> getMatchingReferrers() {
32 return matchingReferrers;
33 }
34
35 public void setMatchingReferrers(List<OsmPrimitive> refs) {
36 matchingReferrers = refs;
37 }
38
39 public void clearMatchingReferrers() {
40 matchingReferrers = null;
41 }
42}
Note: See TracBrowser for help on using the repository browser.