/[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 621 by alfonx, Thu Jan 28 10:06:05 2010 UTC revision 632 by alfonx, Thu Jan 28 14:35:45 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            /** A flag indicating whether the {@link XMapPane} is accepting repaints from the EDT. @see {@link XMapPane#setPainting(boolean)) **/
112          private boolean acceptsRepaintCalls = true;          private boolean acceptsRepaintCalls = true;
113    
114          /**          /**
# Line 560  public class XMapPane extends JPanel { Line 562  public class XMapPane extends JPanel {
562    
563          /**          /**
564           * The default state is ZOOM_IN, hence by default the           * The default state is ZOOM_IN, hence by default the
565           * {@link #zoomMapPaneMouseListener} is also enabled.           * {@link #xMapPaneMouseListener} is also enabled.
566           **/           **/
567          private int state = ZOOM_IN;          private int state = ZOOM_IN;
568    
# Line 572  public class XMapPane extends JPanel { Line 574  public class XMapPane extends JPanel {
574    
575          private AffineTransform worldToScreen;          private AffineTransform worldToScreen;
576    
577    //      /**
578    //       * This {@link MouseListener} is managing all zoom related tasks
579    //       */
580    //      private final ZoomXMapPaneMouseListener zoomMapPaneMouseListener = new ZoomXMapPaneMouseListener(
581    //                      this);
582            
583          /**          /**
584           * This {@link MouseListener} is managing all zoom related tasks           * This {@link MouseListener} is managing all zoom related tasks
585           */           */
586          public final ZoomXMapPaneMouseListener zoomMapPaneMouseListener = new ZoomXMapPaneMouseListener(          private final XMapPaneMouseListener xMapPaneMouseListener = new XMapPaneMouseListener(this);
587                          this);          
588    
589          /** Is set if a renderer has an error **/          /** Is set if a renderer has an error **/
590          protected ArrayList<Exception> renderingErrors = new ArrayList<Exception>();          protected ArrayList<Exception> renderingErrors = new ArrayList<Exception>();
# Line 617  public class XMapPane extends JPanel { Line 625  public class XMapPane extends JPanel {
625                  /**                  /**
626                   * Adding the #zoomMapPaneMouseListener                   * Adding the #zoomMapPaneMouseListener
627                   */                   */
628                  this.addMouseListener(zoomMapPaneMouseListener);                  this.addMouseListener(xMapPaneMouseListener);
629                  this.addMouseMotionListener(zoomMapPaneMouseListener);                  this.addMouseMotionListener(xMapPaneMouseListener);
630                  this.addMouseWheelListener(zoomMapPaneMouseListener);                  this.addMouseWheelListener(xMapPaneMouseListener);
631    
632                  /*                  /*
633                   * 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 974  public class XMapPane extends JPanel { Line 982  public class XMapPane extends JPanel {
982                  // Remove all mapPaneListeners that have registered with us                  // Remove all mapPaneListeners that have registered with us
983                  mapPaneListeners.clear();                  mapPaneListeners.clear();
984    
985                  removeMouseMotionListener(zoomMapPaneMouseListener);                  removeMouseMotionListener(xMapPaneMouseListener);
986                  removeMouseListener(zoomMapPaneMouseListener);                  removeMouseListener(xMapPaneMouseListener);
987    
988                  if (localContext != null)                  if (localContext != null)
989                          getMapContext().clearLayerList();                          getMapContext().clearLayerList();
# Line 1962  public class XMapPane extends JPanel { Line 1970  public class XMapPane extends JPanel {
1970           *           *
1971           * @param state           * @param state
1972           */           */
1973            @Deprecated
1974          public void setState(final int state) {          public void setState(final int state) {
1975                  this.state = state;                  this.state = state;
1976                    
1977                    throw new RuntimeException("Old concept.. migrate to new concept!");
1978    
1979                  zoomMapPaneMouseListener.setEnabled((state == ZOOM_IN  //              xMapPaneMouseListener.setEnabled((state == ZOOM_IN
1980                                  || state == ZOOM_OUT || state == PAN));  //                              || state == ZOOM_OUT || state == PAN));
1981    
1982                  // Je nach Aktion den Cursor umsetzen                  // Je nach Aktion den Cursor umsetzen
1983                  updateCursor();  //              updateCursor();
1984            }
1985            
1986            public void configureMouse(MouseInputType type, XMapPaneAction action){
1987                    
1988          }          }
1989    
1990          /**          /**

Legend:
Removed from v.621  
changed lines
  Added in v.632

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26