Package org.openstreetmap.josm.gui.mappaint.MapPaintStyles

Examples of org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference


            case "icon":
                inIcon = true;
                for (int count=0; count<atts.getLength(); count++) {
                    switch (atts.getQName(count)) {
                    case "src":
                        IconReference icon = new IconReference(atts.getValue(count), style);
                        hadIcon = (icon != null);
                        rule.icon.icon = icon;
                        break;
                    case "annotate":
                        rule.icon.annotate = Boolean.parseBoolean (atts.getValue(count));
View Full Code Here


    public static AreaElemStyle create(Cascade c) {
        MapImage fillImage = null;
        Color color = null;

        IconReference iconRef = c.get(FILL_IMAGE, null, IconReference.class);
        if (iconRef != null) {
            fillImage = new MapImage(iconRef.iconName, iconRef.source);
            fillImage.getImage();

            color = new Color(fillImage.getImage().getRGB(
View Full Code Here

    }

    protected ImageIcon getSourceIcon() {
        if (imageIcon == null) {
            if (icon != null) {
                imageIcon = MapPaintStyles.getIcon(new IconReference(icon, this), -1, -1);
            }
            if (imageIcon == null) {
                imageIcon = getDefaultIcon();
            }
        }
View Full Code Here

            } else {
                value = val;
            }
            if (key.equals(ICON_IMAGE) || key.equals(FILL_IMAGE) || key.equals(REPEAT_IMAGE)) {
                if (value instanceof String) {
                    value = new IconReference((String) value, env.source);
                }
            }
            env.mc.getOrCreateCascade(env.layer).putOrClear(key, value);
        }
View Full Code Here

    }

    public static MapImage createIcon(final Environment env, final String[] keys) {
        Cascade c = env.mc.getCascade(env.layer);

        final IconReference iconRef = c.get(keys[ICON_IMAGE_IDX], null, IconReference.class, true);
        if (iconRef == null)
            return null;

        Cascade c_def = env.mc.getCascade("default");
View Full Code Here

TOP

Related Classes of org.openstreetmap.josm.gui.mappaint.MapPaintStyles.IconReference

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.