Ignore:
Timestamp:
2011-01-22T19:27:33+01:00 (14 years ago)
Author:
bastiK
Message:

Don't merge all mappaitn style rules into one StyleSet, but keep them as separate StyleSources. This allows switching styles on and off at runtime.

Location:
trunk/src/org/openstreetmap/josm/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPaintVisitor.java

    r3800 r3803  
    3434import org.openstreetmap.josm.gui.mappaint.AreaElemStyle;
    3535import org.openstreetmap.josm.gui.mappaint.ElemStyle;
     36import org.openstreetmap.josm.gui.mappaint.ElemStyles;
    3637import org.openstreetmap.josm.gui.mappaint.IconElemStyle;
    3738import org.openstreetmap.josm.gui.mappaint.LineElemStyle;
    3839import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    3940import org.openstreetmap.josm.gui.mappaint.SimpleNodeElemStyle;
    40 import org.openstreetmap.josm.gui.mappaint.StyleSource;
    4141
    4242public class MapPaintVisitor implements PaintVisitor {
     
    4949    private boolean drawRestriction;
    5050    private boolean leftHandTraffic;
    51     private StyleSource styles;
     51    private ElemStyles styles;
    5252    private double circum;
    5353    private double dist;
     
    535535        zoomLevelDisplay = Main.pref.getBoolean("mappaint.zoomLevelDisplay", false);
    536536        circum = nc.getDist100Pixel();
    537         styles = MapPaintStyles.getStyles().getStyleSet();
     537        styles = MapPaintStyles.getStyles();
    538538        drawMultipolygon = Main.pref.getBoolean("mappaint.multipolygon", true);
    539539        drawRestriction = Main.pref.getBoolean("mappaint.restriction", true);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java

    r3799 r3803  
    2424import org.openstreetmap.josm.gui.mappaint.AreaElemStyle;
    2525import org.openstreetmap.josm.gui.mappaint.ElemStyle;
     26import org.openstreetmap.josm.gui.mappaint.ElemStyles;
    2627import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
    27 import org.openstreetmap.josm.gui.mappaint.StyleSource;
    2828
    2929public class MultipolygonTest extends Test {
     
    4141    protected static final int NO_STYLE_POLYGON = 1611;
    4242
    43     private static StyleSource styles;
     43    private static ElemStyles styles;
    4444
    4545    private final List<List<Node>> nonClosedWays = new ArrayList<List<Node>>();
     
    5252    @Override
    5353    public void initialize() throws Exception {
    54         styles = MapPaintStyles.getStyles().getStyleSet();
     54        styles = MapPaintStyles.getStyles();
    5555    }
    5656
Note: See TracChangeset for help on using the changeset viewer.