/[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

branches/2.0-RC1/src/skrueger/geotools/XMapPane.java revision 615 by alfonx, Mon Dec 14 17:31:41 2009 UTC branches/2.0-RC2/src/skrueger/geotools/XMapPane.java revision 651 by alfonx, Fri Jan 29 08:37:34 2010 UTC
# Line 69  import schmitzm.geotools.map.event.MapLa Line 69  import schmitzm.geotools.map.event.MapLa
69  import schmitzm.lang.LangUtil;  import schmitzm.lang.LangUtil;
70  import schmitzm.swing.JPanel;  import schmitzm.swing.JPanel;
71  import schmitzm.swing.SwingUtil;  import schmitzm.swing.SwingUtil;
72    import schmitzm.swing.event.MouseInputType;
73    
74  import com.vividsolutions.jts.geom.Coordinate;  import com.vividsolutions.jts.geom.Coordinate;
75  import com.vividsolutions.jts.geom.Envelope;  import com.vividsolutions.jts.geom.Envelope;
# Line 107  public class XMapPane extends JPanel { Line 108  public class XMapPane extends JPanel {
108    
109          private final static Logger LOGGER = Logger.getLogger(XMapPane.class);          private final static Logger LOGGER = Logger.getLogger(XMapPane.class);
110    
111            /**
112             * A flag indicating whether the {@link XMapPane} is accepting repaints from
113             * the EDT. @see {@link XMapPane#setPainting(boolean))
114             **/
115          private boolean acceptsRepaintCalls = true;          private boolean acceptsRepaintCalls = true;
116    
117          /**          /**
# Line 275  public class XMapPane extends JPanel { Line 280  public class XMapPane extends JPanel {
280                          final AffineTransform at = xMapPane.getScreenToWorld();                          final AffineTransform at = xMapPane.getScreenToWorld();
281                          if (at != null) {                          if (at != null) {
282                                  Point2D transformed = at.transform(e.getPoint(), null);                                  Point2D transformed = at.transform(e.getPoint(), null);
283                                  return new DirectPosition2D(xMapPane.getMapContext().getCoordinateReferenceSystem(), transformed.getX(), transformed.getY());                                  return new DirectPosition2D(xMapPane.getMapContext()
284                                                    .getCoordinateReferenceSystem(), transformed.getX(),
285                                                    transformed.getY());
286                          }                          }
287                          return null;                          return null;
288                  }                  }
289                  throw new IllegalArgumentException(                  throw new IllegalArgumentException(
290                                  "MouseEvent has to be of instance MapMouseEvent or come from an XMapPane");                                  "MouseEvent has to be of instance MapMouseEvent or come from an XMapPane");
291          }          }
           
   
292    
293          /**          /**
294           * Listens to changes of the "background" {@link MapContext} and triggers           * Listens to changes of the "background" {@link MapContext} and triggers
# Line 390  public class XMapPane extends JPanel { Line 395  public class XMapPane extends JPanel {
395           * While dragging, the {@link #updateFinalImage()} method is translating the           * While dragging, the {@link #updateFinalImage()} method is translating the
396           * cached images while setting it together.           * cached images while setting it together.
397           **/           **/
398          Point imageOrigin = new Point(0, 0);          private final Point imageOrigin = new Point(0, 0);
399          /**          /**
400           * For every rendering thread started,           * For every rendering thread started,
401           * {@link GTUtil#createGTRenderer(MapContext)} is called to create a new           * {@link GTUtil#createGTRenderer(MapContext)} is called to create a new
# Line 419  public class XMapPane extends JPanel { Line 424  public class XMapPane extends JPanel {
424    
425                  @Override                  @Override
426                  public void layerChanged(final MapLayerListEvent event) {                  public void layerChanged(final MapLayerListEvent event) {
427  //                      getLocalRenderer().setContext(getMapContext()); geht doch auch ohne?!?!? wow...                          // getLocalRenderer().setContext(getMapContext()); geht doch auch
428                            // ohne?!?!? wow...
429                          requestStartRendering();                          requestStartRendering();
430                  }                  }
431    
# Line 559  public class XMapPane extends JPanel { Line 565  public class XMapPane extends JPanel {
565    
566          /**          /**
567           * The default state is ZOOM_IN, hence by default the           * The default state is ZOOM_IN, hence by default the
568           * {@link #zoomMapPaneMouseListener} is also enabled.           * {@link #xMapPaneMouseListener} is also enabled.
569           **/           **/
570          private int state = ZOOM_IN;          private int state = ZOOM_IN;
571    
# Line 571  public class XMapPane extends JPanel { Line 577  public class XMapPane extends JPanel {
577    
578          private AffineTransform worldToScreen;          private AffineTransform worldToScreen;
579    
580            // /**
581            // * This {@link MouseListener} is managing all zoom related tasks
582            // */
583            // private final ZoomXMapPaneMouseListener zoomMapPaneMouseListener = new
584            // ZoomXMapPaneMouseListener(
585            // this);
586    
587          /**          /**
588           * This {@link MouseListener} is managing all zoom related tasks           * This {@link MouseListener} is managing all zoom related tasks
589           */           */
590          public final ZoomXMapPaneMouseListener zoomMapPaneMouseListener = new ZoomXMapPaneMouseListener(          private final XMapPaneMouseListener xMapPaneMouseListener = new XMapPaneMouseListener(
591                          this);                          this);
592    
593          /** Is set if a renderer has an error **/          /** Is set if a renderer has an error **/
# Line 616  public class XMapPane extends JPanel { Line 629  public class XMapPane extends JPanel {
629                  /**                  /**
630                   * Adding the #zoomMapPaneMouseListener                   * Adding the #zoomMapPaneMouseListener
631                   */                   */
632                  this.addMouseListener(zoomMapPaneMouseListener);                  this.addMouseListener(xMapPaneMouseListener);
633                  this.addMouseMotionListener(zoomMapPaneMouseListener);                  this.addMouseMotionListener(xMapPaneMouseListener);
634                  this.addMouseWheelListener(zoomMapPaneMouseListener);                  this.addMouseWheelListener(xMapPaneMouseListener);
635                    xMapPaneMouseListener.actions.put(MouseInputType.LClick,
636                                    XMapPaneAction.ZOOM_IN);
637                    xMapPaneMouseListener.actions.put(MouseInputType.LDrag,
638                                    XMapPaneAction.ZOOM_IN);
639                    xMapPaneMouseListener.actions.put(MouseInputType.Wheel,
640                                    XMapPaneAction.ZOOM_IN);
641    
642                    xMapPaneMouseListener.actions.put(MouseInputType.RClick,
643                                    XMapPaneAction.ZOOM_OUT);
644    
645                    xMapPaneMouseListener.actions.put(MouseInputType.RDrag,
646                                    XMapPaneAction.PAN);
647    
648                  /*                  /*
649                   * We use a Timer object to avoid rendering delays and flickering when                   * We use a Timer object to avoid rendering delays and flickering when
# Line 973  public class XMapPane extends JPanel { Line 998  public class XMapPane extends JPanel {
998                  // Remove all mapPaneListeners that have registered with us                  // Remove all mapPaneListeners that have registered with us
999                  mapPaneListeners.clear();                  mapPaneListeners.clear();
1000    
1001                  removeMouseMotionListener(zoomMapPaneMouseListener);                  removeMouseMotionListener(xMapPaneMouseListener);
1002                  removeMouseListener(zoomMapPaneMouseListener);                  removeMouseListener(xMapPaneMouseListener);
1003    
1004                  if (localContext != null)                  if (localContext != null)
1005                          getMapContext().clearLayerList();                          getMapContext().clearLayerList();
# Line 990  public class XMapPane extends JPanel { Line 1015  public class XMapPane extends JPanel {
1015           */           */
1016          protected void drawRectangle(final Graphics graphics, final Point startPos,          protected void drawRectangle(final Graphics graphics, final Point startPos,
1017                          final Point e) {                          final Point e) {
1018                    drawRectangle(graphics, startPos, e, Color.WHITE);
1019            }
1020    
1021            /**
1022             * Draws a rectangle in XOR mode from the origin at {@link #startPos} to the
1023             * given point. All in screen coordinates.
1024             */
1025            protected void drawRectangle(final Graphics graphics, final Point startPos,
1026                            final Point e, Color color) {
1027    
1028                  if (!isWellDefined())                  if (!isWellDefined())
1029                          return;                          return;
# Line 1005  public class XMapPane extends JPanel { Line 1039  public class XMapPane extends JPanel {
1039                  if (width == 0 && height == 0)                  if (width == 0 && height == 0)
1040                          return;                          return;
1041    
1042                  graphics.setXORMode(Color.WHITE);                  graphics.setXORMode(color);
1043                  graphics.drawRect(left, bottom, width, height);                  graphics.drawRect(left, bottom, width, height);
1044          }          }
1045    
# Line 1131  public class XMapPane extends JPanel { Line 1165  public class XMapPane extends JPanel {
1165                          ReferencedEnvelope mapArea_ = null;                          ReferencedEnvelope mapArea_ = null;
1166                          try {                          try {
1167                                  mapArea_ = localContext.getLayerBounds();                                  mapArea_ = localContext.getLayerBounds();
1168                          } catch (final IOException e) {                          } catch (final Exception e) {
1169                                  LOGGER.warn("localContext.getLayerBounds()", e);                                  LOGGER.warn("localContext.getLayerBounds()", e);
1170                          }                          }
1171    
# Line 1344  public class XMapPane extends JPanel { Line 1378  public class XMapPane extends JPanel {
1378          }          }
1379    
1380          /**          /**
1381           * Called from the listeners while the mouse is dragging, this method either           * Usually called from {@link XMapPaneAction_Pan} to pan the image.
          * paints a translated (moved/panned) version of the image, or a rectangle.  
1382           *           *
1383           * @param startPos           * @param startPos
1384           *            in screen coordinates           *            in screen coordinates
1385           * @param lastPos           * @param lastPos
1386           *            in screen coordinates           *            in screen coordinates
          * @param event  
          *            the {@link MouseEvent} to read the mouse buttons from  
1387           */           */
1388          public void mouseDragged(final Point startPos, final Point lastPos,          public void pan(final int dX, final int dY) {
                         final MouseEvent event) {  
1389    
1390                  if ((getState() == XMapPane.PAN)                  // if ((getState() == XMapPane.PAN)
1391                                  || ((event.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) != 0)) {                  // || ((event.getModifiersEx() & InputEvent.BUTTON3_DOWN_MASK) != 0)) {
1392    
1393                          // Panning needs a panning coursor                  // Panning needs a panning coursor
1394                          if (getCursor() != SwingUtil.PANNING_CURSOR) {                  if (getCursor() != SwingUtil.PANNING_CURSOR) {
1395                                  setCursor(SwingUtil.PANNING_CURSOR);                          setCursor(SwingUtil.PANNING_CURSOR);
1396    
1397                                  // While panning, we deactivate the rendering. So the tasks are                          // While panning, we deactivate the rendering. So the tasks are
1398                                  // ready to start when the panning is finished.                          // ready to start when the panning is finished.
1399                                  if (bgExecuter != null && bgExecuter.isRunning())                          if (bgExecuter != null && bgExecuter.isRunning())
1400                                          bgExecuter.cancelTask();                                  bgExecuter.cancelTask();
1401                                  if (localExecuter.isRunning())                          if (localExecuter.isRunning())
1402                                          localExecuter.cancelTask();                                  localExecuter.cancelTask();
1403                          }                  }
1404                    //
1405                          if (lastPos.x > 0 && lastPos.y > 0) {                  // if (lastPos.x > 0 && lastPos.y > 0) {
1406                                  final int dx = event.getX() - lastPos.x;                  // final int dx = event.getX() - lastPos.x;
1407                                  final int dy = event.getY() - lastPos.y;                  // final int dy = event.getY() - lastPos.y;
1408    
1409                                  // TODO Stop dragging when the drag would not be valid...                  // TODO Stop dragging when the drag would not be valid...
1410                                  // boolean dragValid = true;                  // boolean dragValid = true;
1411                                  // // check if this panning results in a valid mapArea                  // // check if this panning results in a valid mapArea
1412                                  // {                  // {
1413                                  // Rectangle winBounds = xMapPane.getBounds();                  // Rectangle winBounds = xMapPane.getBounds();
1414                                  // winBounds.translate(xMapPane.imageOrigin.x,                  // winBounds.translate(xMapPane.imageOrigin.x,
1415                                  // -xMapPane.imageOrigin.y);                  // -xMapPane.imageOrigin.y);
1416                                  // Envelope newMapAreaBefore = xMapPane.tranformWindowToGeo(                  // Envelope newMapAreaBefore = xMapPane.tranformWindowToGeo(
1417                                  // winBounds.x, winBounds.y, winBounds.x                  // winBounds.x, winBounds.y, winBounds.x
1418                                  // + winBounds.width, winBounds.y                  // + winBounds.width, winBounds.y
1419                                  // + winBounds.height);                  // + winBounds.height);
1420                                  //                                                        //                                      
1421                                  //                  //
1422                                  // winBounds = xMapPane.getBounds();                  // winBounds = xMapPane.getBounds();
1423                                  // Point testIng = new Point(xMapPane.imageOrigin);                  // Point testIng = new Point(xMapPane.imageOrigin);
1424                                  // testIng.translate(dx, dy);                  // testIng.translate(dx, dy);
1425                                  // winBounds.translate(testIng.x, -testIng.y);                  // winBounds.translate(testIng.x, -testIng.y);
1426                                  // Envelope newMapAreaAfter = xMapPane.tranformWindowToGeo(                  // Envelope newMapAreaAfter = xMapPane.tranformWindowToGeo(
1427                                  // winBounds.x, winBounds.y, winBounds.x                  // winBounds.x, winBounds.y, winBounds.x
1428                                  // + winBounds.width, winBounds.y                  // + winBounds.width, winBounds.y
1429                                  // + winBounds.height);                  // + winBounds.height);
1430                                  //                  //
1431                                  // // If the last drag doesn't change the MapArea anymore cancel                  // // If the last drag doesn't change the MapArea anymore cancel
1432                                  // it.                  // it.
1433                                  // if (xMapPane.bestAllowedMapArea(newMapAreaAfter).equals(                  // if (xMapPane.bestAllowedMapArea(newMapAreaAfter).equals(
1434                                  // xMapPane.bestAllowedMapArea(newMapAreaBefore))){                  // xMapPane.bestAllowedMapArea(newMapAreaBefore))){
1435                                  // dragValid = false;                  // dragValid = false;
1436                                  // return;                  // return;
1437                                  // }                  // }
1438                                  // }                  // }
1439    
1440                                  imageOrigin.translate(dx, dy);                  getImageOrigin().translate(dX, dY);
1441                                  updateFinalImage();                  updateFinalImage();
1442                                  repaint();                  repaint();
1443                          }                  // }
1444    
1445                  } else if ((getState() == XMapPane.ZOOM_IN)                  // } else if ((getState() == XMapPane.ZOOM_IN)
1446                                  || (getState() == XMapPane.ZOOM_OUT)                  // || (getState() == XMapPane.ZOOM_OUT)
1447                                  || (getState() == XMapPane.SELECT_ALL)                  // || (getState() == XMapPane.SELECT_ALL)
1448                                  || (getState() == XMapPane.SELECT_TOP)) {                  // || (getState() == XMapPane.SELECT_TOP)) {
1449                    //
1450                          // Draws a rectangle                  // // Draws a rectangle
1451                          final Graphics2D graphics = (Graphics2D) getGraphics();                  // final Graphics2D graphics = (Graphics2D) getGraphics();
1452                          drawRectangle(graphics, startPos, event.getPoint());                  // drawRectangle(graphics, startPos, event.getPoint());
1453                          if ((lastPos.x > 0) && (lastPos.y > 0))                  // if ((lastPos.x > 0) && (lastPos.y > 0))
1454                                  drawRectangle(graphics, startPos, lastPos);                  // drawRectangle(graphics, startPos, lastPos);
1455                          graphics.dispose();                  // graphics.dispose();
1456                  }                  // }
1457          }          }
1458    
1459          /**          /**
# Line 1443  public class XMapPane extends JPanel { Line 1473  public class XMapPane extends JPanel {
1473           */           */
1474          public void onRenderingCompleted(final long l) {          public void onRenderingCompleted(final long l) {
1475                  lastRenderingDuration = (lastRenderingDuration + l) / 2;                  lastRenderingDuration = (lastRenderingDuration + l) / 2;
1476  //              LOGGER                  // LOGGER
1477  //                              .debug("complete rendering after " + lastRenderingDuration                  // .debug("complete rendering after " + lastRenderingDuration
1478  //                                              + "ms");                  // + "ms");
1479    
1480                  repaintTimer.stop();                  repaintTimer.stop();
1481    
# Line 1585  public class XMapPane extends JPanel { Line 1615  public class XMapPane extends JPanel {
1615                  }                  }
1616    
1617          }          }
1618    //
1619          /**  //      /**
1620           * Performs a {@value #PAN} action. During panning, the displacement is  //       * Performs a {@value #PAN} action. During panning, the displacement is
1621           * stored in {@link #imageOrigin} object. Calling {@link #performPan()} will  //       * stored in {@link #imageOrigin} object. Calling {@link #performPan()} will
1622           * reset the offset and call {@link #setMapArea(Envelope)}.  //       * reset the offset and call {@link #setMapArea(Envelope)}.
1623           */  //       */
1624          public void performPan() {  //      public void performPan() {
1625    //
1626                  final Rectangle winBounds = getVisibleRect();  //              final Rectangle winBounds = getVisibleRect();
1627    //
1628                  winBounds.translate(-imageOrigin.x, -imageOrigin.y);  //              winBounds.translate(-imageOrigin.x, -imageOrigin.y);
1629                  final Envelope newMapArea = tranformWindowToGeo(winBounds.x,  //              final Envelope newMapArea = tranformWindowToGeo(winBounds.x,
1630                                  winBounds.y, winBounds.x + winBounds.width, winBounds.y  //                              winBounds.y, winBounds.x + winBounds.width, winBounds.y
1631                                                  + winBounds.height);  //                                              + winBounds.height);
1632    //
1633                  imageOrigin.x = 0;  //              imageOrigin.x = 0;
1634                  imageOrigin.y = 0;  //              imageOrigin.y = 0;
1635    //
1636                  if (!setMapArea(newMapArea)) {  //              if (!setMapArea(newMapArea)) {
1637                          /**  //                      /**
1638                           * If setMapArea returns true, the finalImage is updated anyways.  //                       * If setMapArea returns true, the finalImage is updated anyways.
1639                           * This if-case exists to ensure that we repaint a correct image  //                       * This if-case exists to ensure that we repaint a correct image
1640                           * even if the new panning area has been denied.  //                       * even if the new panning area has been denied.
1641                           */  //                       */
1642                          updateFinalImage();  //                      updateFinalImage();
1643                          repaint();  //                      repaint();
1644                  }  //              }
1645    //
1646                  if (getCursor() == SwingUtil.PANNING_CURSOR)  //              if (getCursor() == SwingUtil.PANNING_CURSOR)
1647                          setCursor(SwingUtil.PAN_CURSOR);  //                      setCursor(SwingUtil.PAN_CURSOR);
1648          }  //      }
1649    
1650          /**          /**
1651           * Entfernt einen Listener von der Map.           * Entfernt einen Listener von der Map.
# Line 1661  public class XMapPane extends JPanel { Line 1691  public class XMapPane extends JPanel {
1691           *            the current map pane extent (screen units)           *            the current map pane extent (screen units)
1692           */           */
1693          private void resetTransforms() {          private void resetTransforms() {
                 final ReferencedEnvelope refMapEnv = new ReferencedEnvelope(mapArea,  
                                 getMapContext().getCoordinateReferenceSystem());  
   
1694                  // System.out                  // System.out
1695                  // .println("paintArea in resetTeansofrms = " + getVisibleRect());                  // .println("paintArea in resetTeansofrms = " + getVisibleRect());
1696                  if (!isWellDefined())                  if (!isWellDefined())
1697                          return;                          return;
1698    
1699                    if (mapArea == null)
1700                            return;
1701    
1702                    final ReferencedEnvelope refMapEnv = new ReferencedEnvelope(mapArea,
1703                                    getMapContext().getCoordinateReferenceSystem());
1704    
1705                  worldToScreen = RendererUtilities.worldToScreenTransform(refMapEnv,                  worldToScreen = RendererUtilities.worldToScreenTransform(refMapEnv,
1706                                  getVisibleRect());                                  getVisibleRect());
1707    
# Line 1958  public class XMapPane extends JPanel { Line 1991  public class XMapPane extends JPanel {
1991           *           *
1992           * @param state           * @param state
1993           */           */
1994            @Deprecated
1995          public void setState(final int state) {          public void setState(final int state) {
1996                  this.state = state;                  this.state = state;
1997    
1998                  zoomMapPaneMouseListener.setEnabled((state == ZOOM_IN                  // throw new RuntimeException("Old concept.. migrate to new concept!");
1999                                  || state == ZOOM_OUT || state == PAN));  
2000                    // xMapPaneMouseListener.setEnabled((state == ZOOM_IN
2001                    // || state == ZOOM_OUT || state == PAN));
2002    
2003                  // Je nach Aktion den Cursor umsetzen                  // Je nach Aktion den Cursor umsetzen
2004                  updateCursor();                  updateCursor();
2005          }          }
2006    
2007            public void configureMouse(MouseInputType type, XMapPaneAction action) {
2008                    xMapPaneMouseListener.actions.put(type, action);
2009            }
2010    
2011          /**          /**
2012           * Standardmaessig wird der Cursor automatisch je nach MapPane-Aktion (Zoom,           * Standardmaessig wird der Cursor automatisch je nach MapPane-Aktion (Zoom,
2013           * Auswahl, ...) gesetzt. Mit dieser Methode kann ein statischer Cursor           * Auswahl, ...) gesetzt. Mit dieser Methode kann ein statischer Cursor
# Line 2185  public class XMapPane extends JPanel { Line 2225  public class XMapPane extends JPanel {
2225    
2226                  final Graphics2D finalG = getFinalImage().createGraphics();                  final Graphics2D finalG = getFinalImage().createGraphics();
2227                  finalG.setBackground(getMapBackgroundColor());                  finalG.setBackground(getMapBackgroundColor());
2228                  finalG.drawImage(getPreFinalImage(), imageOrigin.x, imageOrigin.y,                  finalG.drawImage(getPreFinalImage(), getImageOrigin().x, getImageOrigin().y,
2229                                  getMapBackgroundColor(), null);                                  getMapBackgroundColor(), null);
2230    
2231                  // When panning, we have to clear the area around the image                  // When panning, we have to clear the area around the image
2232                  final Rectangle painedArea = new Rectangle(imageOrigin.x,                  final Rectangle painedArea = new Rectangle(getImageOrigin().x,
2233                                  imageOrigin.y, getFinalImage().getWidth(), getFinalImage()                                  getImageOrigin().y, getFinalImage().getWidth(), getFinalImage()
2234                                                  .getHeight());                                                  .getHeight());
2235                  SwingUtil.clearAround(finalG, painedArea, getVisibleRect(),                  SwingUtil.clearAround(finalG, painedArea, getVisibleRect(),
2236                                  getMapBackgroundColor());                                  getMapBackgroundColor());
2237    
2238                  addGadgets(finalG, false);  //              addGadgets(finalG, false);
2239    
2240                  finalG.dispose();                  finalG.dispose();
2241    
# Line 2432  public class XMapPane extends JPanel { Line 2472  public class XMapPane extends JPanel {
2472                  return localRenderer;                  return localRenderer;
2473          }          }
2474    
   
   
2475          /**          /**
2476           * Setzt den Kartenausschnitt auf die Ausdehnung eines bestimmten Layers.           * Setzt den Kartenausschnitt auf die Ausdehnung eines bestimmten Layers.
2477           * Macht nichts, wenn {@code null} uebergeben wird.           * Macht nichts, wenn {@code null} uebergeben wird.
# Line 2563  public class XMapPane extends JPanel { Line 2601  public class XMapPane extends JPanel {
2601                  zoomToLayer(getMapContext().getLayerCount() - 1 - index);                  zoomToLayer(getMapContext().getLayerCount() - 1 - index);
2602          }          }
2603    
           
           
   
   
2604          /**          /**
2605           * Aktiviert oder deaktiviert das AntiAliasing for diese           * Aktiviert oder deaktiviert das AntiAliasing for diese
2606           * {@link SelectableXMapPane}. AntiALiasing ist besonders fuer           * {@link SelectableXMapPane}. AntiALiasing ist besonders fuer
# Line 2581  public class XMapPane extends JPanel { Line 2615  public class XMapPane extends JPanel {
2615                  if (java2DHints == null) {                  if (java2DHints == null) {
2616                          java2DHints = GeoTools.getDefaultHints();                          java2DHints = GeoTools.getDefaultHints();
2617                  }                  }
2618                    
2619                  java2DHints.put(RenderingHints.KEY_ANTIALIASING,                  java2DHints.put(RenderingHints.KEY_ANTIALIASING,
2620                                  aa ? RenderingHints.VALUE_ANTIALIAS_ON                                  aa ? RenderingHints.VALUE_ANTIALIAS_ON
2621                                                  : RenderingHints.VALUE_ANTIALIAS_OFF);                                                  : RenderingHints.VALUE_ANTIALIAS_OFF);
# Line 2591  public class XMapPane extends JPanel { Line 2625  public class XMapPane extends JPanel {
2625                  java2DHints.put(RenderingHints.KEY_RENDERING,                  java2DHints.put(RenderingHints.KEY_RENDERING,
2626                                  aa ? RenderingHints.VALUE_RENDER_QUALITY                                  aa ? RenderingHints.VALUE_RENDER_QUALITY
2627                                                  : RenderingHints.VALUE_RENDER_SPEED);                                                  : RenderingHints.VALUE_RENDER_SPEED);
2628                    
2629            }
2630    
2631            public Point getImageOrigin() {
2632                    return imageOrigin;
2633          }          }
2634    
2635  }  }

Legend:
Removed from v.615  
changed lines
  Added in v.651

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26