/[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 556 by alfonx, Tue Nov 24 12:56:09 2009 UTC revision 557 by alfonx, Tue Nov 24 13:00:54 2009 UTC
# Line 616  public class XMapPane extends JPanel { Line 616  public class XMapPane extends JPanel {
616                                                  if (!isWellDefined())                                                  if (!isWellDefined())
617                                                          return;                                                          return;
618    
619                                                  LOGGER.info("resizeTimer performed");                                                  LOGGER.debug("resizeTimer performed");
620    
621                                                  final Rectangle bounds = getVisibleRect();                                                  final Rectangle bounds = getVisibleRect();
622                                                  //                                                  //
# Line 628  public class XMapPane extends JPanel { Line 628  public class XMapPane extends JPanel {
628                                                                  bounds.y + bounds.height);                                                                  bounds.y + bounds.height);
629    
630                                                  if (setMapArea(geoMapArea)) {                                                  if (setMapArea(geoMapArea)) {
631                                                          LOGGER.info("  maparea changed");                                                          LOGGER.debug("  maparea changed");
632                                                          paneResized = true;                                                          paneResized = true;
633                                                  } else                                                  } else
634                                                          LOGGER.info("  maparea NOT changed");                                                          LOGGER.debug("  maparea NOT changed");
635                                          }                                          }
636                                  });                                  });
637                  resizeTimer.setRepeats(false);                  resizeTimer.setRepeats(false);
# Line 646  public class XMapPane extends JPanel { Line 646  public class XMapPane extends JPanel {
646                                  // Seems to be called twice with the same size..                                  // Seems to be called twice with the same size..
647                                  if (oldVisibleRect != null                                  if (oldVisibleRect != null
648                                                  && oldVisibleRect.equals(getVisibleRect())) {                                                  && oldVisibleRect.equals(getVisibleRect())) {
649                                          LOGGER.info("skipping resize.");                                          LOGGER.debug("skipping resize.");
650                                          return;                                          return;
651                                  }                                  }
652    
653                                  LOGGER.info("resized: " + getVisibleRect());                                  LOGGER.debug("resized: " + getVisibleRect());
654                                  resizeTimer.restart();                                  resizeTimer.restart();
655                                  oldVisibleRect = getVisibleRect();                                  oldVisibleRect = getVisibleRect();
656                          }                          }
# Line 1146  public class XMapPane extends JPanel { Line 1146  public class XMapPane extends JPanel {
1146          }          }
1147    
1148          /**          /**
1149           * Returns the background {@link Color} of the map pane. Default is white.           * Returns the background {@link Color} of the map pane. If not set, the
1150             * methods looks for a parent component and will use its background color.
1151             * If no parent component is available, WHITE is returned.
1152           **/           **/
1153          public Color getMapBackgroundColor() {          public Color getMapBackgroundColor() {
1154                    if (mapBackgroundColor == null){
1155                            if (getParent() != null) return getParent().getBackground();
1156                            else return Color.WHITE;
1157                    }
1158                  return mapBackgroundColor;                  return mapBackgroundColor;
1159          }          }
1160    
# Line 1418  public class XMapPane extends JPanel { Line 1424  public class XMapPane extends JPanel {
1424           * completed.           * completed.
1425           */           */
1426          public void onRenderingCompleted() {          public void onRenderingCompleted() {
1427                  LOGGER.info("complete");                  LOGGER.debug("complete");
1428    
1429                  repaintTimer.stop();                  repaintTimer.stop();
1430    
# Line 1796  public class XMapPane extends JPanel { Line 1802  public class XMapPane extends JPanel {
1802           * @param if <code>null</code>, white is used.           * @param if <code>null</code>, white is used.
1803           */           */
1804          public void setMapBackgroundColor(Color bgColor) {          public void setMapBackgroundColor(Color bgColor) {
                 if (bgColor == null)  
                         bgColor = Color.WHITE;  
1805                  this.mapBackgroundColor = bgColor;                  this.mapBackgroundColor = bgColor;
1806          }          }
1807    

Legend:
Removed from v.556  
changed lines
  Added in v.557

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26