boolean newshrink = stob(value);
if (b.hshrink == newshrink && b.vshrink == newshrink) return;
b.hshrink = b.vshrink = newshrink;
- b.mark_for_prerender();
+ b.mark_for_prerender();
} });
specialBoxProperties.put("hshrink", new SpecialBoxProperty() {
boolean newshrink = stob(value);
if (b.hshrink == newshrink) return;
b.hshrink = newshrink;
- b.mark_for_prerender();
+ b.mark_for_prerender();
}
});
boolean newshrink = stob(value);
if (b.vshrink == newshrink) return;
b.vshrink = newshrink;
- b.mark_for_prerender();
+ b.mark_for_prerender();
}
});
specialBoxProperties.put("invisible", new SpecialBoxProperty() {
public Object get(Box b) {
- for (Box cur = b; cur != null; cur = cur.getParent()) { if (cur.invisible) return Boolean.TRUE; }
- return Boolean.FALSE;
- }
+ for (Box cur = b; cur != null; cur = cur.getParent()) { if (cur.invisible) return Boolean.TRUE; }
+ return Boolean.FALSE;
+ }
public void put(Box b, Object value) {
boolean newinvisible = stob(value);
if (newinvisible == b.invisible) return;
SpecialBoxProperty mouseEventHandler = new SpecialBoxProperty() {
public void put(String name, Box b, Object value) {
if (b.surface == null) return;
- for(Box c = b.prevSibling(); c != null; c = c.prevSibling())
- if (c.inside(c.surface.mousex, c.surface.mousey)) {
- c.put(name, c, value);
- return;
- }
- if (b.getParent() != null)
- b.getParent().put(name, b.getParent(), value);
+ for(Box c = b.prevSibling(); c != null; c = c.prevSibling()) {
+ Box siblingChild = c.whoIs(c.surface.mousex, c.surface.mousey);
+ if (siblingChild != null) {
+ siblingChild.put(name, c, value);
+ return;
+ }
+ }
+ if (b.getParent() != null)
+ b.getParent().put(name, b.getParent(), value);
}};
specialBoxProperties.put("Press1", mouseEventHandler);
public void put(Box b, Object value) { }
public Object get(Box b) { return new Apply(b); }
});
+
+ specialBoxProperties.put("id", new SpecialBoxProperty() {
+ public void put(Box b, Object value) { }
+ public Object get(Box b) { return b.id; }
+ });
}