void resize(LENGTH x, LENGTH y, LENGTH width, LENGTH height) {
if (x == this.x && y == this.y && width == this.width && height == this.height) return;
boolean sizechange = (this.width != width || this.height != height) && getTrap("SizeChange") != null;
- try {
- int thisx = parent == null ? 0 : this.x;
- int thisy = parent == null ? 0 : this.y;
- if (this.x != x || this.y != y) set(MOVED);
- if (texture == null && (text == null || text.equals("")) && !test(MOVED)) {
- if ((fillcolor & 0xff000000) != 0) {
- Box who = (parent == null ? this : parent);
- who.dirty(thisx+min(this.width,width), thisy, Math.abs(width-this.width), max(this.height, height));
- who.dirty(thisx, thisy+min(this.height,height), min(this.width, width), Math.abs(height-this.height));
- }
- //return;
+ int thisx = parent == null ? 0 : this.x;
+ int thisy = parent == null ? 0 : this.y;
+ Box who = (parent == null ? this : parent);
+ if (this.x != x || this.y != y) set(MOVED);
+ if (texture == null && (text == null || text.equals("")) && !test(MOVED)) {
+ if ((fillcolor & 0xff000000) != 0 || parent == null) {
+ who.dirty(thisx+min(this.width,width), thisy, Math.abs(width-this.width), max(this.height, height));
+ who.dirty(thisx, thisy+min(this.height,height), max(this.width, width), Math.abs(height-this.height));
}
- (parent == null ? this : parent).dirty(thisx, thisy, this.width, this.height);
this.width = width; this.height = height; this.x = x; this.y = y;
- DIRTY;
- } finally {
+ } else {
+ who.dirty(thisx, thisy, this.width, this.height);
this.width = width; this.height = height; this.x = x; this.y = y;
- if (sizechange) putAndTriggerTrapsAndCatchExceptions("SizeChange", T);
+ DIRTY;
}
+ if (sizechange) putAndTriggerTrapsAndCatchExceptions("SizeChange", T);
}
private float targetColumnSize = (float)0.0;