/[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 513 by alfonx, Mon Nov 9 11:17:34 2009 UTC revision 516 by alfonx, Wed Nov 11 21:17:33 2009 UTC
# Line 613  public class XMapPane extends JPanel imp Line 613  public class XMapPane extends JPanel imp
613          /**          /**
614           * Abhaengig von selState wird der Cursor gesetzt           * Abhaengig von selState wird der Cursor gesetzt
615           */           */
616          public void updateCursorAndRepaintTimer() {          public void updateCursor() {
617    
618                  if (bgExecuter != null && bgExecuter.isRunning()                  if (bgExecuter != null && bgExecuter.isRunning()
619                                  || localExecuter != null && localExecuter.isRunning()) {                                  || localExecuter != null && localExecuter.isRunning()) {
# Line 1061  public class XMapPane extends JPanel imp Line 1061  public class XMapPane extends JPanel imp
1061    
1062                  oldMapArea = mapArea;                  oldMapArea = mapArea;
1063    
                 System.out.println("requested setting to \\t" + newMapArea);  
1064                  this.mapArea = bestAllowedMapArea(newMapArea);                  this.mapArea = bestAllowedMapArea(newMapArea);
                 System.out.println("set to \\t\\ลง" + newMapArea);  
1065    
1066                  if (localContext != null) {                  if (localContext != null) {
1067                          localContext.setAreaOfInterest(mapArea, localContext                          localContext.setAreaOfInterest(mapArea, localContext
# Line 1078  public class XMapPane extends JPanel imp Line 1076  public class XMapPane extends JPanel imp
1076                  mapAreaChanged = true;                  mapAreaChanged = true;
1077                  repaint();                  repaint();
1078    
1079                  LOGGER.debug("New maparea = " + mapArea);  //              LOGGER.debug("New maparea = " + mapArea);
1080                  return true;                  return true;
1081          }          }
1082    
# Line 1099  public class XMapPane extends JPanel imp Line 1097  public class XMapPane extends JPanel imp
1097                                  || state == ZOOM_OUT || state == PAN));                                  || state == ZOOM_OUT || state == PAN));
1098    
1099                  // Je nach Aktion den Cursor umsetzen                  // Je nach Aktion den Cursor umsetzen
1100                  updateCursorAndRepaintTimer();                  updateCursor();
1101          }          }
1102    
1103          /** Cursor wenn kein Mausbutton gedrueckt wird. default oder SwingUtil.PAN **/          /** Cursor wenn kein Mausbutton gedrueckt wird. default oder SwingUtil.PAN **/
# Line 1131  public class XMapPane extends JPanel imp Line 1129  public class XMapPane extends JPanel imp
1129    
1130          protected void paintComponent(final Graphics g) {          protected void paintComponent(final Graphics g) {
1131                  // Maybe update the cursor                  // Maybe update the cursor
1132                  updateCursorAndRepaintTimer();                  updateCursor();
1133    
1134                  if (!acceptsRepaintCalls)                  if (!acceptsRepaintCalls)
1135                          return;                          return;
# Line 1508  public class XMapPane extends JPanel imp Line 1506  public class XMapPane extends JPanel imp
1506                                          createGTRenderer);                                          createGTRenderer);
1507                  }                  }
1508    
1509                  updateCursorAndRepaintTimer();                  updateCursor();
1510  //  //
1511  //              // start regular repaints until all renderers are done.  //              // start regular repaints until all renderers are done.
1512  //              repainterTimer.setRepeats(true);  //              repainterTimer.setRepeats(true);
# Line 1522  public class XMapPane extends JPanel imp Line 1520  public class XMapPane extends JPanel imp
1520          private BufferedImage getBgImage() {          private BufferedImage getBgImage() {
1521    
1522                  if (bgImage == null) {                  if (bgImage == null) {
1523                          LOGGER.debug("creating a new background image");  //                      LOGGER.debug("creating a new background image");
1524    
1525                          Rectangle curPaintArea = getVisibleRect();                          Rectangle curPaintArea = getVisibleRect();
1526                          // allow a single pixel margin at the right and bottom edges                          // allow a single pixel margin at the right and bottom edges
# Line 1568  public class XMapPane extends JPanel imp Line 1566  public class XMapPane extends JPanel imp
1566          private BufferedImage getLocalImage() {          private BufferedImage getLocalImage() {
1567    
1568                  if (localImage == null) {                  if (localImage == null) {
1569                          LOGGER.debug("creating a new local image");  //                      LOGGER.debug("creating a new local image");
1570    
1571                          Rectangle curPaintArea = getVisibleRect();                          Rectangle curPaintArea = getVisibleRect();
1572                          // allow a single pixel margin at the right and bottom edges                          // allow a single pixel margin at the right and bottom edges
# Line 1617  public class XMapPane extends JPanel imp Line 1615  public class XMapPane extends JPanel imp
1615           * @see MapPaneListener#onRenderingStopped(org.geotools.swing.event.MapPaneEvent)           * @see MapPaneListener#onRenderingStopped(org.geotools.swing.event.MapPaneEvent)
1616           */           */
1617          public void onRenderingCompleted() {          public void onRenderingCompleted() {
                 System.out.println("onRenderingCompleted");  
   
1618                  updateFinalImage();                  updateFinalImage();
   
1619                  repaint();                  repaint();
   
1620          }          }
1621    
1622          /**          /**
# Line 2033  public class XMapPane extends JPanel imp Line 2027  public class XMapPane extends JPanel imp
2027          public void dispose() {          public void dispose() {
2028                  if (isDisposed())                  if (isDisposed())
2029                          return;                          return;
2030                    
2031                    setPainting(false);
2032    
2033                  disposed = true;                  disposed = true;
2034    

Legend:
Removed from v.513  
changed lines
  Added in v.516

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26