X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fcore%2FBox.java;h=a587a55e2879d90dcf1a79e7513c82ce4784efd4;hp=053357a905394e90f984df20e80c7f7a9b8073a6;hb=85c640ef9709fd71d0f12d8918ce125dbcc58461;hpb=a19b897271a8ab6b25aba63e4b30223c2477c28d diff --git a/src/org/ibex/core/Box.java b/src/org/ibex/core/Box.java index 053357a..a587a55 100644 --- a/src/org/ibex/core/Box.java +++ b/src/org/ibex/core/Box.java @@ -99,6 +99,8 @@ public final class Box extends JSScope implements Task { 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; @@ -938,4 +940,15 @@ public final class Box extends JSScope implements Task { 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); } }