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

Method Index

 o delete(int, int)
This methid is implemented to be overridden.
 o element(int, int)
Non movable panels which have movable elements should override this method to return the element which should be moved when picked.
 o getElement(int, int)
 o getHead()
Head of the tree is not the same as root slot of the tree.
 o getSlot(int, int)
This method determines which slot of this panel is located in (x,y).
 o intersects(EditorObject, int, int, int, int)
 o move()
Shorthand notation for move(this, -1, -1)
 o move(EditorObject, int, int)
These methods (move()) are implemented to be overridden.
 o paint(Graphics)
This method draws the name of the tree to top of the area.
 o 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.
 o setHead(BSlot)
This methos is invoked when a new root slot is created for this tree and are set to newHead.
 o setLocation()
 o split(int, int)
This methid is implemented to be overridden.

Methods

 o 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
 o 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
 o delete
  public boolean delete(int x,
                        int y)
This methid is implemented to be overridden.
Overrides:
delete in class EditorObject
 o split
  public boolean split(int x,
                       int y)
This methid is implemented to be overridden.
Overrides:
split in class EditorObject
 o 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
 o move
  public void move(EditorObject object,
                   int x,
                   int y)
These methods (move()) are implemented to be overridden.
Overrides:
move in class EditorObject
 o move
  public void move()
Shorthand notation for move(this, -1, -1)
 o 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
 o getElement
  public EditorObject getElement(int x,
                                 int y)
 o intersects
  public boolean intersects(EditorObject p,
                            int x,
                            int y,
                            int width,
                            int height)
 o 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
 o 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
 o setLocation
  public void setLocation()

All Packages  Class Hierarchy  This Package  Previous  Next  Index