/[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 639 by alfonx, Thu Jan 28 16:07:22 2010 UTC revision 649 by alfonx, Thu Jan 28 17:24:15 2010 UTC
# Line 108  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          /** A flag indicating whether the {@link XMapPane} is accepting repaints from the EDT. @see {@link XMapPane#setPainting(boolean)) **/          /**
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 574  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          // * This {@link MouseListener} is managing all zoom related tasks
582  //       */          // */
583  //      private final ZoomXMapPaneMouseListener zoomMapPaneMouseListener = new ZoomXMapPaneMouseListener(          // private final ZoomXMapPaneMouseListener zoomMapPaneMouseListener = new
584  //                      this);          // 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          private final XMapPaneMouseListener xMapPaneMouseListener = new XMapPaneMouseListener(this);          private final XMapPaneMouseListener xMapPaneMouseListener = new XMapPaneMouseListener(
591                                    this);
592    
593          /** Is set if a renderer has an error **/          /** Is set if a renderer has an error **/
594          protected ArrayList<Exception> renderingErrors = new ArrayList<Exception>();          protected ArrayList<Exception> renderingErrors = new ArrayList<Exception>();
# Line 628  public class XMapPane extends JPanel { Line 632  public class XMapPane extends JPanel {
632                  this.addMouseListener(xMapPaneMouseListener);                  this.addMouseListener(xMapPaneMouseListener);
633                  this.addMouseMotionListener(xMapPaneMouseListener);                  this.addMouseMotionListener(xMapPaneMouseListener);
634                  this.addMouseWheelListener(xMapPaneMouseListener);                  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.ZOOM_OUT);
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 992  public class XMapPane extends JPanel { Line 1008  public class XMapPane extends JPanel {
1008    
1009                  removeAll();                  removeAll();
1010          }          }
1011            
1012          /**          /**
1013           * Draws a rectangle in XOR mode from the origin at {@link #startPos} to the           * Draws a rectangle in XOR mode from the origin at {@link #startPos} to the
1014           * given point. All in screen coordinates.           * given point. All in screen coordinates.
# Line 1686  public class XMapPane extends JPanel { Line 1702  public class XMapPane extends JPanel {
1702    
1703                  if (mapArea == null)                  if (mapArea == null)
1704                          return;                          return;
1705                    
1706                  final ReferencedEnvelope refMapEnv = new ReferencedEnvelope(mapArea,                  final ReferencedEnvelope refMapEnv = new ReferencedEnvelope(mapArea,
1707                                  getMapContext().getCoordinateReferenceSystem());                                  getMapContext().getCoordinateReferenceSystem());
1708    
# Line 1982  public class XMapPane extends JPanel { Line 1998  public class XMapPane extends JPanel {
1998          @Deprecated          @Deprecated
1999          public void setState(final int state) {          public void setState(final int state) {
2000                  this.state = state;                  this.state = state;
                   
                 throw new RuntimeException("Old concept.. migrate to new concept!");  
2001    
2002  //              xMapPaneMouseListener.setEnabled((state == ZOOM_IN                  // throw new RuntimeException("Old concept.. migrate to new concept!");
2003  //                              || state == ZOOM_OUT || state == PAN));  
2004                    // xMapPaneMouseListener.setEnabled((state == ZOOM_IN
2005                    // || state == ZOOM_OUT || state == PAN));
2006    
2007                  // Je nach Aktion den Cursor umsetzen                  // Je nach Aktion den Cursor umsetzen
2008  //              updateCursor();                  updateCursor();
2009          }          }
2010            
2011          public void configureMouse(MouseInputType type, XMapPaneAction action){          public void configureMouse(MouseInputType type, XMapPaneAction action) {
2012                                    xMapPaneMouseListener.actions.put(type, action);
2013          }          }
2014    
2015          /**          /**

Legend:
Removed from v.639  
changed lines
  Added in v.649

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26