* WE STRONGLY RECOMMEND THAT YOU DO NOT OVERRIDE THIS METHOD. This method
* marks the layer buffer so that it will be refreshed. If you override this
* method, and don't call super.repaint(), the layers will not be repainted.
*/
public void repaint(long tm, int x, int y, int width, int height) {
Component p = getParent();
if (p instanceof MapBean) {
((MapBean) p).setBufferDirty(true);
if (Debug.debugging("basic")) {
Debug.output(getName() + "|Layer: repaint(tm=" + tm + ", x="
+ x + ", y=" + y + ", width=" + width + ", height="
+ height + ")");
}
// How dangerous is this? Let the MapBean manage the
// repaint call? Seems to work OK, and lets the buffered
// MapBeans work better when they are embedded in other
// components. It's this call here that makes the
// BufferedLayer work right.
// This repaint request has been changed to call a
// specific
// method on the MapBean, which includes the layer making
// the request. This is a hook for a policy object in the
// MapBean to make a decision on whether to honor the
// request, or to handle it in a different way if the
// environment dictates that should happen.
// ((MapBean)p).repaint(); to ->
((MapBean) p).repaint(this);
} else if (p != null) {
p.repaint(tm, x, y, width, height);
} else {
super.repaint(tm, x, y, width, height);
}
}