// Copyright 2004 Adam Megacz, see the COPYING file for licensing [GPL]
package org.ibex;
+// FIXME: are traps on x/y meaningful?
+// FIXME: if we trap on cols, then set rows to 0 (forcing cols to 1), does the cols trap get triggered?
+// FIXME: if we change min{width/height}, thereby forcing a change to max{min/height}, does a trap on those get triggered?
+// FIXME: trap on numchildren? replaces ChildChanged?
+// FIXME: trap on visible, trigger when parent visibility changes
+
// FEATURE: mark to reflow starting with a certain child
// FEATURE: reintroduce surface.abort
}
// FIXME update these
- // box properties can not be trapped
- static final String[] props = new String[] {
- "shrink", "hshrink", "vshrink", "x", "y", "width", "height", "cols", "rows",
- "colspan", "rowspan", "align", "visible", "packed", "globalx", "globaly",
- "minwidth", "maxwidth", "minheight", "maxheight", "indexof", "thisbox", "clip",
- "numchildren", "redirect", "cursor", "mouse"
- };
-
- // FIXME update these
// events can have write traps, but not read traps
static final String[] events = new String[] {
"Press1", "Press2", "Press3",
return super.callMethod(method, a0, a1, a2, rest, nargs);
}
- protected boolean isTrappable(Object key, boolean isRead) {
- if (key == null) return false;
- else if (key instanceof String) {
- // not allowed to trap box properties, and no read traps on events
- String name = (String)key;
- for (int i=0; i < props.length; i++) if (name.equals(props[i])) return false;
- if (isRead) for (int i=0; i < events.length; i++) if (name.equals(events[i])) return false;
- }
-
- return true;
- }
-
public Object get(Object name) throws JSExn {
if (name instanceof Number)
return redirect == null ? null : redirect == this ? getChild(toInt(name)) : redirect.get(name);