Ignore:
Timestamp:
2007-07-17T22:07:04+02:00 (17 years ago)
Author:
ulf
Message:

use long for the scale value (instead of int), as the scale values are potentially larger than an int, probably causing overflow exceptions

Location:
applications/editors/josm/plugins/mappaint/src/mappaint
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mappaint/src/mappaint/AreaElemStyle.java

    r3601 r3614  
    66        Color colour;
    77
    8         public AreaElemStyle (Color colour, int maxScale, int minScale)
     8        public AreaElemStyle (Color colour, long maxScale, long minScale)
    99        {
    1010                this.colour = colour;
  • applications/editors/josm/plugins/mappaint/src/mappaint/ElemStyle.java

    r3601 r3614  
    44{
    55        // zoom range to display the feature
    6         protected int minScale;
    7         protected int maxScale;
     6        protected long minScale;
     7        protected long maxScale;
    88
    9         public int getMinScale()
     9        public long getMinScale()
    1010        {
    1111                return minScale;
    1212        }
    13         public int getMaxScale()
     13        public long getMaxScale()
    1414        {
    1515                return maxScale;
  • applications/editors/josm/plugins/mappaint/src/mappaint/ElemStyleHandler.java

    r3601 r3614  
    2626    ImageIcon curIcon = null;
    2727    boolean curIconAnnotate = true;
    28         int curScaleMax = 1000000000;
    29         int curScaleMin = 0;
     28        long curScaleMax = 1000000000;
     29        long curScaleMin = 0;
    3030
    3131    public ElemStyleHandler(  )
     
    191191                        String content = new String(ch, start, length);
    192192
    193                         curScaleMax = Integer.parseInt(content);
     193                        curScaleMax = Long.parseLong(content);
    194194                }
    195195                if(     inScaleMin == true) {
    196196                        String content = new String(ch, start, length);
    197197
    198                         curScaleMin = Integer.parseInt(content);
     198                        curScaleMin = Long.parseLong(content);
    199199                }
    200200    }
  • applications/editors/josm/plugins/mappaint/src/mappaint/IconElemStyle.java

    r3601 r3614  
    77        boolean annotate;
    88
    9         public IconElemStyle (ImageIcon icon, boolean annotate, int maxScale, int minScale)
     9        public IconElemStyle (ImageIcon icon, boolean annotate, long maxScale, long minScale)
    1010        {
    1111                this.icon=icon;
  • applications/editors/josm/plugins/mappaint/src/mappaint/LineElemStyle.java

    r3601 r3614  
    99        boolean dashed = false;
    1010
    11         public LineElemStyle (int width, int realWidth, Color colour, boolean dashed, int maxScale, int minScale)
     11        public LineElemStyle (int width, int realWidth, Color colour, boolean dashed, long maxScale, long minScale)
    1212        {
    1313                this.width = width;
Note: See TracChangeset for help on using the changeset viewer.