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 |
// |
// |
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); |
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 |
} |
} |
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 |
|
|
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 |
|
|
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 |
|
|