Class tred.BPlus
All Packages Class Hierarchy This Package Previous Next Index
Class tred.BPlus
java.lang.Object
|
+----tred.EditorObject
|
+----tred.EditorPanel
|
+----tred.NodePanel
|
+----tred.Tree
|
+----tred.BPlus
- public class BPlus
- extends Tree
implementation to BPlus
-
delete(int, int)
- This methid is implemented to be overridden.
-
element(int, int)
- Non movable panels which have movable elements should override
this method to return the element which should be moved when picked.
-
getElement(int, int)
-
-
getHead()
-
Head of the tree is not the same as root slot of the tree.
-
getSlot(int, int)
-
This method determines which slot of this panel is located in (x,y).
-
intersects(EditorObject, int, int, int, int)
-
-
move()
- Shorthand notation for move(this, -1, -1)
-
move(EditorObject, int, int)
-
These methods (move()) are implemented to be overridden.
-
paint(Graphics)
-
This method draws the name of the tree to top of the area.
-
paint(Graphics, Rectangle)
-
For speeding up the update procedure one might override this
method in order to update only the given area of the object.
-
setHead(BSlot)
- This methos is invoked when a new root slot is created for this tree and
are set to newHead.
-
setLocation()
-
-
split(int, int)
- This methid is implemented to be overridden.
getHead
public BSlot getHead()
- Head of the tree is not the same as root slot of the tree.
A tree has a head slot which is treated as a "pointer to the root slot"
of the given tree.
- Returns:
- BSlot head - head pointer (slot) of the tree
setHead
public void setHead(BSlot newHead)
- This methos is invoked when a new root slot is created for this tree and
are set to newHead.
Note: this method do not take care of the old root and it's children!
The calling method should take care of setting the old root as a
child of new root or what else is correct.
- Parameters:
- newHead - - the new root slot of this tree
delete
public boolean delete(int x,
int y)
- This methid is implemented to be overridden.
- Overrides:
- delete in class EditorObject
split
public boolean split(int x,
int y)
- This methid is implemented to be overridden.
- Overrides:
- split in class EditorObject
element
public EditorObject element(int x,
int y)
- Non movable panels which have movable elements should override
this method to return the element which should be moved when picked.
- Overrides:
- element in class EditorObject
move
public void move(EditorObject object,
int x,
int y)
- These methods (move()) are implemented to be overridden.
- Overrides:
- move in class EditorObject
move
public void move()
- Shorthand notation for move(this, -1, -1)
getSlot
public Slot getSlot(int x,
int y)
- This method determines which slot of this panel is located in (x,y).
- Returns:
- the slot in coordinates (x,y). If there is no slot in the (x,y)
return null.
- Overrides:
- getSlot in class EditorPanel
getElement
public EditorObject getElement(int x,
int y)
intersects
public boolean intersects(EditorObject p,
int x,
int y,
int width,
int height)
paint
public boolean paint(Graphics g)
- This method draws the name of the tree to top of the area.
After that all the slots are drawed as tree-like style by
invoking the paint method for slots and then drawing the connecting
lines between parent slot and target slot.
- Overrides:
- paint in class Tree
paint
public boolean paint(Graphics g,
Rectangle rect)
- For speeding up the update procedure one might override this
method in order to update only the given area of the object.
- Overrides:
- paint in class EditorObject
setLocation
public void setLocation()
All Packages Class Hierarchy This Package Previous Next Index