/[schmitzm]/trunk/src/skrueger/geotools/XMapPane.java
ViewVC logotype

Diff of /trunk/src/skrueger/geotools/XMapPane.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 495 by mojays, Fri Oct 23 14:19:46 2009 UTC revision 505 by alfonx, Sat Oct 31 10:53:43 2009 UTC
# Line 43  import java.awt.Graphics; Line 43  import java.awt.Graphics;
43  import java.awt.Graphics2D;  import java.awt.Graphics2D;
44  import java.awt.LayoutManager;  import java.awt.LayoutManager;
45  import java.awt.Rectangle;  import java.awt.Rectangle;
46    import java.awt.RenderingHints;
47  import java.awt.event.InputEvent;  import java.awt.event.InputEvent;
48  import java.awt.event.MouseEvent;  import java.awt.event.MouseEvent;
49  import java.awt.event.MouseListener;  import java.awt.event.MouseListener;
50  import java.awt.event.MouseMotionListener;  import java.awt.event.MouseMotionListener;
51    import java.awt.geom.AffineTransform;
52  import java.awt.image.BufferedImage;  import java.awt.image.BufferedImage;
53  import java.beans.PropertyChangeEvent;  import java.beans.PropertyChangeEvent;
54  import java.beans.PropertyChangeListener;  import java.beans.PropertyChangeListener;
# Line 176  public class JMapPane extends JPanel imp Line 178  public class JMapPane extends JPanel imp
178           */           */
179          private boolean panning_started = false;          private boolean panning_started = false;
180    
181            /**
182             * This color is used as the default background color when painting a map.
183             */
184            private Color mapBackgroundColor = Color.WHITE;
185    
186          public JMapPane() {          public JMapPane() {
187                  this(null, true, null, null);                  this(null, true, null, null);
188          }          }
# Line 230  public class JMapPane extends JPanel imp Line 237  public class JMapPane extends JPanel imp
237                  Map<Object, Object> hints = new HashMap<Object, Object>();                  Map<Object, Object> hints = new HashMap<Object, Object>();
238    
239                  this.renderer = renderer;                  this.renderer = renderer;
240  //MS: Apply hint also for ShapeFileRenderer                  // MS: Apply hint also for ShapeFileRenderer
241  //              if (renderer instanceof StreamingRenderer) {                  // if (renderer instanceof StreamingRenderer) {
242                          hints = renderer.getRendererHints();                  hints = renderer.getRendererHints();
243                          if (hints == null) {                  if (hints == null) {
244                                  hints = new HashMap<Object, Object>();                          hints = new HashMap<Object, Object>();
245                          }                  }
246                          if (hints.containsKey(StreamingRenderer.LABEL_CACHE_KEY)) {                  if (hints.containsKey(StreamingRenderer.LABEL_CACHE_KEY)) {
247                                  labelCache = (LabelCache) hints                          labelCache = (LabelCache) hints
248                                                  .get(StreamingRenderer.LABEL_CACHE_KEY);                                          .get(StreamingRenderer.LABEL_CACHE_KEY);
249                          } else {                  } else {
250                                  hints.put(StreamingRenderer.LABEL_CACHE_KEY, labelCache);                          hints.put(StreamingRenderer.LABEL_CACHE_KEY, labelCache);
251                          }                  }
252    
253                          hints.put("memoryPreloadingEnabled", Boolean.TRUE);                  hints.put("memoryPreloadingEnabled", Boolean.TRUE);
254    
255                          renderer.setRendererHints(hints);                  renderer.setRendererHints(hints);
256  //              }                  // }
257    
258                  if (this.context != null) {                  if (this.context != null) {
259                          this.renderer.setContext(this.context);                          this.renderer.setContext(this.context);
# Line 339  public class JMapPane extends JPanel imp Line 346  public class JMapPane extends JPanel imp
346    
347                  if (changed) { /* if the map changed then redraw */                  if (changed) { /* if the map changed then redraw */
348                          changed = false;                          changed = false;
349                            
350                            // The baseImage should not have alpha
351                          baseImage = new BufferedImage(dr.width, dr.height,                          baseImage = new BufferedImage(dr.width, dr.height,
352                                          BufferedImage.TYPE_INT_ARGB);                                          BufferedImage.TYPE_INT_RGB);
353    
354                          final Graphics2D ig = baseImage.createGraphics();                          final Graphics2D ig = baseImage.createGraphics();
355                          /* System.out.println("rendering"); */                          ig.setBackground(getMapBackgroundColor());
356                            ig.fillRect(0, 0, dr.width, dr.height);
357                            
358    //                      /* System.out.println("rendering"); */
359                          if (renderer.getContext() != null)                          if (renderer.getContext() != null)
360                                  renderer.setContext(context);                                  renderer.setContext(context);
361                          labelCache.clear(); // work around anoying labelcache bug  
362                            // TODO is this clearing still needed? We already replace all that stuff whenever we change the style. Deactivated 31.10.09.. let's see
363    //                      labelCache.clear(); // work around anoying labelcache bug
364    
365                          // draw the map                          // draw the map
366                          renderer.paint((Graphics2D) ig, dr, mapArea);                          renderer.paint(ig, dr, mapArea);
367    
368                          // TODO nur machen, wenn panning beginnt                          // TODO nur machen, wenn panning beginnt
369                          panningImage = new BufferedImage(dr.width, dr.height,                          panningImage = new BufferedImage(dr.width, dr.height,
# Line 483  public class JMapPane extends JPanel imp Line 497  public class JMapPane extends JPanel imp
497                                  final int dy = lastY - startY;                                  final int dy = lastY - startY;
498                                  // System.out.println("translate "+dx+","+dy);                                  // System.out.println("translate "+dx+","+dy);
499                                  final Graphics2D g2 = panningImage.createGraphics();                                  final Graphics2D g2 = panningImage.createGraphics();
500                                  g2.setBackground(new Color(240, 240, 240)); // TODO richtige                                  g2.setBackground(getMapBackgroundColor());
                                 // farbe? am besten  
                                 // vom L&F die  
                                 // hintergrundfarbe  
                                 // auslesen...  
501    
502                                  g2.clearRect(0, 0, this.getWidth(), this.getHeight());                                  g2.clearRect(0, 0, this.getWidth(), this.getHeight());
503                                  g2.drawImage(baseImage, dx, dy, this);                                  g2.drawImage(baseImage, dx, dy, this);
# Line 567  public class JMapPane extends JPanel imp Line 577  public class JMapPane extends JPanel imp
577          protected void processDrag(final int x1, final int y1, final int x2,          protected void processDrag(final int x1, final int y1, final int x2,
578                          final int y2, final MouseEvent e) {                          final int y2, final MouseEvent e) {
579    
   
580                  /****                  /****
581                   * If no layers exist, we ignore the drag.                   * If no layers exist, we ignore the drag.
582                   */                   */
583                  if (context.getLayerCount() <= 0) {                  if (context.getLayerCount() <= 0) {
584                          return;                          return;
585                  }                  }
586                    
587                  // System.out.println("processing drag from " + x1 + "," + y1 + " -> "                  // System.out.println("processing drag from " + x1 + "," + y1 + " -> "
588                  // + x2 + "," + y2);                  // + x2 + "," + y2);
589                  if ((x1 == x2) && (y1 == y2)) {                  if ((x1 == x2) && (y1 == y2)) {
# Line 620  public class JMapPane extends JPanel imp Line 629  public class JMapPane extends JPanel imp
629                          final Coordinate ur = new Coordinate(right, top);                          final Coordinate ur = new Coordinate(right, top);
630                          // xulu.sc                          // xulu.sc
631                          // mapArea = fixAspectRatio(this.getBounds(), new Envelope(ll, ur));                          // mapArea = fixAspectRatio(this.getBounds(), new Envelope(ll, ur));
                           
632    
633                          setMapArea(bestAllowedMapArea(new Envelope(ll, ur)));                          setMapArea(bestAllowedMapArea(new Envelope(ll, ur)));
634                          // xulu.ec                          // xulu.ec
# Line 646  public class JMapPane extends JPanel imp Line 654  public class JMapPane extends JPanel imp
654                          setMapArea(bestAllowedMapArea(new Envelope(ll, ur)));                          setMapArea(bestAllowedMapArea(new Envelope(ll, ur)));
655    
656                          // sk.sc                          // sk.sc
657                          // {                           {
658                          // // SK tries to paint a preview of the zoom ;-9 aha.... well                          // // SK tries to paint a preview of the zoom ;-9 aha.... well
659                          // Graphics2D graphics = (Graphics2D) JMapPane.this.getGraphics();  //                              
660                          // graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,  //                               double reductionFactor = 1/8.;
661                          // RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);  ////                            
662                          // graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,  ////                     BufferedImage reducedBaseImage = new BufferedImage((int)(baseImage.getWidth()*reductionFactor), (int)(baseImage.getHeight()*reductionFactor), BufferedImage.TYPE_INT_RGB);
663                          // RenderingHints.VALUE_ANTIALIAS_OFF);  ////                     Graphics2D reducedG = (Graphics2D) reducedBaseImage.getGraphics();
664                          // graphics.setRenderingHint(RenderingHints.KEY_RENDERING,  //                       AffineTransform reductionTransform =new AffineTransform();
665                          // RenderingHints.VALUE_RENDER_SPEED);  //                       reductionTransform.scale(reductionFactor, reductionFactor);
666                          // graphics.drawImage(baseImage, 0, 0, JMapPane.this.getWidth(),  ////                    reducedG.drawImage(baseImage, reductionTransform, null);
667                          // JMapPane.this.getHeight(), x1, y1, x2, y2, null);  //                      
668                          // }  //                       Graphics2D graphics = (Graphics2D) JMapPane.this.getGraphics();
669    ////                     graphics.getTransform().scale(reductionFactor, reductionFactor);
670    //                      
671    //                       graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
672    //                       RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
673    //                       graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
674    //                       RenderingHints.VALUE_ANTIALIAS_OFF);
675    //                       graphics.setRenderingHint(RenderingHints.KEY_RENDERING,
676    //                       RenderingHints.VALUE_RENDER_SPEED);
677    //                       graphics.drawImage(baseImage, 0, 0, JMapPane.this.getWidth(),
678    //                       JMapPane.this.getHeight(), x1, y1, x2, y2, null);
679                             }
680                          // xulu.ec                          // xulu.ec
681                  } else if (state == JMapPane.ZoomOut) {                  } else if (state == JMapPane.ZoomOut) {
682                          drawRectangle(this.getGraphics());                          drawRectangle(this.getGraphics());
# Line 866  public class JMapPane extends JPanel imp Line 885  public class JMapPane extends JPanel imp
885    
886                  /**                  /**
887                   * Correct the aspect Ratio before we check the rest. Otherwise we might                   * Correct the aspect Ratio before we check the rest. Otherwise we might
888                   * easily fail.                   * easily fail. We allow to grow here, because we don't check against
889                     * the maxExtend
890                   */                   */
891                  env = JTSUtil.fixAspectRatio(this.getBounds(), env, false);                  env = JTSUtil.fixAspectRatio(this.getBounds(), env, true);
892    
893                  final double scale = env.getWidth() / getWidth();                  final double scale = env.getWidth() / getWidth();
894                  final double centerX = env.getMinX() + env.getWidth() / 2.;                  final double centerX = env.getMinX() + env.getWidth() / 2.;
# Line 905  public class JMapPane extends JPanel imp Line 925  public class JMapPane extends JPanel imp
925                  }                  }
926    
927                  Envelope maxAllowedExtend = getMaxExtend();                  Envelope maxAllowedExtend = getMaxExtend();
928                  while (maxAllowedExtend != null && !maxAllowedExtend.contains(newArea) && newArea != null && !newArea.isNull() && !Double.isNaN(newArea.getMinX()) && !Double.isNaN(newArea.getMaxX()) && !Double.isNaN(newArea.getMinY()) && !Double.isNaN(newArea.getMaxY()) ) {                  while (maxAllowedExtend != null && !maxAllowedExtend.contains(newArea)
929                                    && newArea != null && !newArea.isNull()
930                                    && !Double.isNaN(newArea.getMinX())
931                                    && !Double.isNaN(newArea.getMaxX())
932                                    && !Double.isNaN(newArea.getMinY())
933                                    && !Double.isNaN(newArea.getMaxY())) {
934                          /*                          /*
935                           * If a maxExtend is set, we have to honour that...                           * If a maxExtend is set, we have to honour that...
936                           */                           */
# Line 913  public class JMapPane extends JPanel imp Line 938  public class JMapPane extends JPanel imp
938                          // Exceeds top? Move down and maybe cut                          // Exceeds top? Move down and maybe cut
939                          if (newArea.getMaxY() > maxAllowedExtend.getMaxY()) {                          if (newArea.getMaxY() > maxAllowedExtend.getMaxY()) {
940                                  double divY = newArea.getMaxY() - maxAllowedExtend.getMaxY();                                  double divY = newArea.getMaxY() - maxAllowedExtend.getMaxY();
941  //                              LOGGER.debug("Moving area down by " + divY);                                  // LOGGER.debug("Moving area down by " + divY);
942    
943                                  newArea = new Envelope(new Coordinate(newArea.getMinX(),                                  newArea = new Envelope(new Coordinate(newArea.getMinX(),
944                                                  newArea.getMinY() - divY), new Coordinate(newArea                                                  newArea.getMinY() - divY), new Coordinate(newArea
945                                                  .getMaxX(), newArea.getMaxY() - divY));                                                  .getMaxX(), newArea.getMaxY() - divY));
946    
947                                  if (newArea.getMinY() < maxAllowedExtend.getMinY()) {                                  if (newArea.getMinY() < maxAllowedExtend.getMinY()) {
948  //                                      LOGGER.debug("Now it exeeds the bottom border.. cut!");                                          // LOGGER.debug("Now it exeeds the bottom border.. cut!");
949                                          // And cut the bottom if it moved out of the area                                          // And cut the bottom if it moved out of the area
950                                          newArea = new Envelope(new Coordinate(newArea.getMinX(),                                          newArea = new Envelope(new Coordinate(newArea.getMinX(),
951                                                          maxAllowedExtend.getMinY()), new Coordinate(newArea                                                          maxAllowedExtend.getMinY()), new Coordinate(newArea
952                                                          .getMaxX(), newArea.getMaxY()));                                                          .getMaxX(), newArea.getMaxY()));
953    
954  //                                      LOGGER.debug("and fix aspect ratio");                                          // LOGGER.debug("and fix aspect ratio");
955    
956                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, false);                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea,
957                                                            false);
958                                  }                                  }
959                          }                          }
960    
961                          // Exceeds bottom? Move up and maybe cut                          // Exceeds bottom? Move up and maybe cut
962                          if (newArea.getMinY() < maxAllowedExtend.getMinY()) {                          if (newArea.getMinY() < maxAllowedExtend.getMinY()) {
963                                  double divY = newArea.getMinY() - maxAllowedExtend.getMinY();                                  double divY = newArea.getMinY() - maxAllowedExtend.getMinY();
964  //                              LOGGER.debug("Moving area up by " + divY);                                  // LOGGER.debug("Moving area up by " + divY);
965    
966                                  newArea = new Envelope(new Coordinate(newArea.getMinX(),                                  newArea = new Envelope(new Coordinate(newArea.getMinX(),
967                                                  newArea.getMinY() - divY), new Coordinate(newArea                                                  newArea.getMinY() - divY), new Coordinate(newArea
968                                                  .getMaxX(), newArea.getMaxY() - divY));                                                  .getMaxX(), newArea.getMaxY() - divY));
969    
970                                  if (newArea.getMaxY() > maxAllowedExtend.getMaxY()) {                                  if (newArea.getMaxY() > maxAllowedExtend.getMaxY()) {
971  //                                      LOGGER.debug("Now it exeeds the top border.. cut!");                                          // LOGGER.debug("Now it exeeds the top border.. cut!");
972                                          // And cut the bottom if it moved out of the area                                          // And cut the bottom if it moved out of the area
973                                          newArea = new Envelope(new Coordinate(newArea.getMinX(),                                          newArea = new Envelope(new Coordinate(newArea.getMinX(),
974                                                          newArea.getMinY()), new Coordinate(newArea                                                          newArea.getMinY()), new Coordinate(newArea
975                                                          .getMaxX(), maxAllowedExtend.getMaxY()));                                                          .getMaxX(), maxAllowedExtend.getMaxY()));
976    
977  //                                      LOGGER.debug("and fix aspect ratio");                                          // LOGGER.debug("and fix aspect ratio");
978    
979                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, false);                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea,
980                                                            false);
981                                  }                                  }
982                          }                          }
983    
# Line 959  public class JMapPane extends JPanel imp Line 986  public class JMapPane extends JPanel imp
986    
987                                  // Move left..                                  // Move left..
988                                  double divX = newArea.getMaxX() - maxAllowedExtend.getMaxX();                                  double divX = newArea.getMaxX() - maxAllowedExtend.getMaxX();
989  //                              LOGGER.debug("Moving area left by " + divX);                                  // LOGGER.debug("Moving area left by " + divX);
990    
991                                  newArea = new Envelope(new Coordinate(newArea.getMinX() - divX,                                  newArea = new Envelope(new Coordinate(newArea.getMinX() - divX,
992                                                  newArea.getMinY()), new Coordinate(newArea.getMaxX()                                                  newArea.getMinY()), new Coordinate(newArea.getMaxX()
993                                                  - divX, newArea.getMaxY()));                                                  - divX, newArea.getMaxY()));
994    
995                                  if (newArea.getMinX() < maxAllowedExtend.getMinX()) {                                  if (newArea.getMinX() < maxAllowedExtend.getMinX()) {
996  //                                      LOGGER.debug("Now it exeeds the left border.. cut!");                                          // LOGGER.debug("Now it exeeds the left border.. cut!");
997                                          // And cut the left if it moved out of the area                                          // And cut the left if it moved out of the area
998                                          newArea = new Envelope(new Coordinate(maxAllowedExtend.getMinX(),                                          newArea = new Envelope(new Coordinate(maxAllowedExtend
999                                                          newArea.getMinY()), new Coordinate(newArea                                                          .getMinX(), newArea.getMinY()), new Coordinate(
1000                                                          .getMaxX(), newArea.getMaxY()));                                                          newArea.getMaxX(), newArea.getMaxY()));
1001    
1002  //                                      LOGGER.debug("and fix aspect ratio");                                          // LOGGER.debug("and fix aspect ratio");
1003    
1004                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, false);                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea,
1005                                                            false);
1006                                  }                                  }
1007                          }                          }
1008    
# Line 983  public class JMapPane extends JPanel imp Line 1011  public class JMapPane extends JPanel imp
1011    
1012                                  // Move right..                                  // Move right..
1013                                  double divX = newArea.getMinX() - maxAllowedExtend.getMinX();                                  double divX = newArea.getMinX() - maxAllowedExtend.getMinX();
1014  //                              LOGGER.debug("Moving area right by " + divX);                                  // LOGGER.debug("Moving area right by " + divX);
1015    
1016                                  newArea = new Envelope(new Coordinate(newArea.getMinX() - divX,                                  newArea = new Envelope(new Coordinate(newArea.getMinX() - divX,
1017                                                  newArea.getMinY()), new Coordinate(newArea.getMaxX()                                                  newArea.getMinY()), new Coordinate(newArea.getMaxX()
1018                                                  - divX, newArea.getMaxY()));                                                  - divX, newArea.getMaxY()));
1019    
1020                                  if (newArea.getMaxX() > maxAllowedExtend.getMaxX()) {                                  if (newArea.getMaxX() > maxAllowedExtend.getMaxX()) {
1021  //                                      LOGGER.debug("Now it exeeds the right border.. cut!");                                          // LOGGER.debug("Now it exeeds the right border.. cut!");
1022                                          // And cut the left if it moved out of the area                                          // And cut the left if it moved out of the area
1023                                          newArea = new Envelope(new Coordinate(newArea.getMinX(),                                          newArea = new Envelope(new Coordinate(newArea.getMinX(),
1024                                                          newArea.getMinY()), new Coordinate(maxAllowedExtend                                                          newArea.getMinY()), new Coordinate(maxAllowedExtend
1025                                                          .getMaxX(), newArea.getMaxY()));                                                          .getMaxX(), newArea.getMaxY()));
1026    
1027  //                                      LOGGER.debug("and fix aspect ratio");                                          // LOGGER.debug("and fix aspect ratio");
1028    
1029                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea, false);                                          newArea = JTSUtil.fixAspectRatio(this.getBounds(), newArea,
1030                                                            false);
1031                                  }                                  }
1032                          }                          }
1033    
# Line 1031  public class JMapPane extends JPanel imp Line 1060  public class JMapPane extends JPanel imp
1060    
1061          /**          /**
1062           * Set the maximum allowed zoom scale. This is the smaller number value of           * Set the maximum allowed zoom scale. This is the smaller number value of
1063           * the two.           * the two. If <code>null</code> is passed, Double.MINVALUE are used which
1064             * mean there is no restriction.
1065           *           *
1066           * @author <a href="mailto:[email protected]">Stefan Alfons           * @author <a href="mailto:[email protected]">Stefan Alfons
1067           *         Kr&uuml;ger</a>           *         Kr&uuml;ger</a>
1068           */           */
1069          public void setMaxZoomScale(final Double maxZoomScale) {          public void setMaxZoomScale(final Double maxZoomScale) {
1070                  this.maxZoomScale = maxZoomScale;                  this.maxZoomScale = maxZoomScale == null ? Double.MIN_VALUE
1071                                    : maxZoomScale;
1072          }          }
1073    
1074          /**          /**
1075           * Set the minimum (nearest) allowed zoom scale. This is the bigger number           * Set the minimum (nearest) allowed zoom scale. This is the bigger number
1076           * value of the two.           * value of the two. If <code>null</code> is passed, Double.MAXVALUE are
1077             * used which mean there is no restriction.
1078             *
1079           *           *
1080           * @author <a href="mailto:[email protected]">Stefan Alfons           * @author <a href="mailto:[email protected]">Stefan Alfons
1081           *         Kr&uuml;ger</a>           *         Kr&uuml;ger</a>
1082           */           */
1083          public void setMinZoomScale(final Double minZoomScale) {          public void setMinZoomScale(final Double minZoomScale) {
1084                  this.minZoomScale = minZoomScale;                  this.minZoomScale = minZoomScale == null ? Double.MAX_VALUE
1085                                    : minZoomScale;
1086          }          }
1087    
1088          /**          /**
# Line 1076  public class JMapPane extends JPanel imp Line 1110  public class JMapPane extends JPanel imp
1110          public Envelope getMaxExtend() {          public Envelope getMaxExtend() {
1111                  if (maxExtend == null) {                  if (maxExtend == null) {
1112                          try {                          try {
1113                                  return JTSUtil.fixAspectRatio(                                  return JTSUtil.fixAspectRatio(this.getBounds(),
1114                                      this.getBounds(),                                                  // Kartenbereich um 10% vergroessern
1115                          // Kartenbereich um 10% vergroessern                                                  JTSUtil.expandEnvelope(context.getLayerBounds(), 0.1),
1116                                      JTSUtil.expandEnvelope(context.getLayerBounds(), 0.1),                                                  true);
                                     true  
                                 );  
1117                          } catch (IOException e) {                          } catch (IOException e) {
1118                                  LOGGER.warn(                                  LOGGER
1119                                                    .warn(
1120                                                                  "maxExtend == null; failed to getLayerBounds of context",                                                                  "maxExtend == null; failed to getLayerBounds of context",
1121                                                                  e);                                                                  e);
1122                          }                          }
# Line 1091  public class JMapPane extends JPanel imp Line 1124  public class JMapPane extends JPanel imp
1124                  return maxExtend;                  return maxExtend;
1125          }          }
1126    
1127            /**
1128             * Set the background color of the map.
1129             * @param if <code>null</code>, white is used.
1130             */
1131            public void setMapBackgroundColor(Color bgColor) {
1132                    if (bgColor == null) bgColor = Color.WHITE;
1133                    this.mapBackgroundColor = bgColor;
1134            }
1135    
1136            /**
1137             * Returns the background {@link Color} of the map pane. Default is white.
1138            **/
1139            public Color getMapBackgroundColor() {
1140                    return mapBackgroundColor;
1141            }
1142    
1143  }  }

Legend:
Removed from v.495  
changed lines
  Added in v.505

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26