X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2FBox.java;h=bbfad254b465d6e0bb7e1e4f0f879291e2e97ba8;hp=49808b332be3806d35af070508477e3653419456;hb=c9c75398e998bd9d1dce22509c2b3dea9de63ec4;hpb=3e1c990ae2a4476b51aa3474163cbd81b22aed61 diff --git a/src/org/ibex/Box.java b/src/org/ibex/Box.java index 49808b3..bbfad25 100644 --- a/src/org/ibex/Box.java +++ b/src/org/ibex/Box.java @@ -54,11 +54,11 @@ public final class Box extends JSScope implements Scheduler.Task { //#define CHECKSET_INT(prop) int nu = toInt(value); if (nu == prop) break; prop = nu; //#define CHECKSET_FLAG(flag) boolean nu = toBoolean(value); if (nu == test(flag)) break; if (nu) set(flag); else clear(flag); //#define CHECKSET_BOOLEAN(prop) boolean nu = toBoolean(value); if (nu == prop) break; prop = nu; - //#define CHECKSET_STRING(prop) if ((value==null&&prop==null)||(value!=null&&value.equals(prop))) break; prop=(String)value; + //#define CHECKSET_STRING(prop) if ((value==null&&prop==null)||(value!=null&&JS.toString(value).equals(prop))) break; prop=JS.toString(value); protected Box() { super(null); } - static Hash boxToCursor = new Hash(500, 3); + static Hash boxToCursor = new Hash(500, 3); // FIXME memory leak public static final int MAX_LENGTH = Integer.MAX_VALUE; static final Font DEFAULT_FONT; @@ -85,11 +85,9 @@ public final class Box extends JSScope implements Scheduler.Task { "Release1", "Release2", "Release3", "Click1", "Click2", "Click3", "DoubleClick1", "DoubleClick2", "DoubleClick3", - "Enter", "Leave", "Move", - "KeyPressed", "KeyReleased", "PosChange", "SizeChange", - "childadded", "childremoved", - "Focused", "Maximized", "Minimized", "Close", - "icon", "titlebar", "toback", "tofront" + "Enter", "Leave", "Move", "ChildChange", + "KeyPressed", "KeyReleased", "SizeChange", + "Focused", "Maximized", "Minimized", "Close" }; // Flags ////////////////////////////////////////////////////////////////////// @@ -331,7 +329,7 @@ public final class Box extends JSScope implements Scheduler.Task { // priority 1: sum of columns as close to parent's width as possible for(int i=0; i treeSize()) return; Box b = getChild(i); removeChild(i); - putAndTriggerTrapsAndCatchExceptions("childremoved", b); + putAndTriggerTrapsAndCatchExceptions("ChildChange", b); } else { Box b = (Box)value; @@ -1000,7 +996,7 @@ public final class Box extends JSScope implements Scheduler.Task { MARK_REFLOW; b.dirty(); - putAndTriggerTrapsAndCatchExceptions("childadded", b); + putAndTriggerTrapsAndCatchExceptions("ChildChange", b); } }