Package org.openstreetmap.josm.gui.mappaint.mapcss.Selector

Examples of org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector


        private static void removeMetaRules(MapCSSStyleSource source) {
            for (Iterator<MapCSSRule> it = source.rules.iterator(); it.hasNext(); ) {
                MapCSSRule x = it.next();
                if (x.selector instanceof GeneralSelector) {
                    GeneralSelector gs = (GeneralSelector) x.selector;
                    if ("meta".equals(gs.base) && gs.getConditions().isEmpty()) {
                        it.remove();
                    }
                }
            }
        }
View Full Code Here


        // create a fake environment to read the meta data block
        Environment env = new Environment(n, mc, "default", this);

        for (MapCSSRule r : rules) {
            if ((r.selector instanceof GeneralSelector)) {
                GeneralSelector gs = (GeneralSelector) r.selector;
                if (gs.getBase().equals(type)) {
                    if (!gs.matchesConditions(env)) {
                        continue;
                    }
                    r.execute(env);
                }
            }
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.mappaint.mapcss.Selector.GeneralSelector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.