* trigger a Surface.abort; if rendering were done in the same pass,
* rendering work done prior to the Surface.abort would be wasted.
*/
-public final class Box extends JSScope implements Task {
+public final class Box extends JS.O implements Task {
// Macros //////////////////////////////////////////////////////////////////////
//#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&&JS.toString(value).equals(prop))) break; prop=JS.toString(value);
- public Box() { super(null); }
-
// FIXME memory leak
static Hash boxToCursor = new Hash(500, 3);
Box redirect = this;
int flags = VISIBLE | PACKED | REPACK | RECONSTRAIN | REPLACE | FIXED | STOP_UPWARD_PROPAGATION | CLIP | MOVED;
+ private BalancedTree bt;
+
private String text = null;
private Font font = DEFAULT_FONT;
private Picture texture = null;
JS.log(e);
}
}
+
+ // BalancedTree functions
+ private void insertNode(int p, Box b) {
+ if(bt == null) bt = new BalancedTree();
+ bt.insertNode(p,b);
+ }
+
+ private int treeSize() { return bt == null ? 0 : bt.treeSize(); }
+ private int indexNode(Box b) { return bt == null ? -1 : bt.indexNode(b); }
+ private void deleteNode(int p) { bt.deleteNode(p); }
+ private Box getNode(int p) { return (Box)bt.getNode(p); }
}