|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AccordionDrawer.QuadTree
A class which implements a quadtree This class is a tree of GridCells; each GridCell has up to 4 children.
Field Summary | |
int[][] |
gridSize
|
QuadGridCell |
rootCell
|
int |
totalDepth
|
Constructor Summary | |
QuadTree(AccordionDrawer theowner)
Constructor. |
Method Summary | |
GridCell |
getChildAt(QuadGridCell cell,
int ddepth,
int x,
int y)
Gets a child at a specified x, y, depth location. |
GridCell |
getGridCell(int level,
int row,
int col)
Returns the GridCell at the specified row, column and level. |
void |
init(int depth)
Initializes a few variables. |
GridCell |
makeChildAt(QuadGridCell cell,
int ddepth,
int x,
int y)
Like getChildAt, but makes new cells whenever necessary. |
GridCell |
putChildAt(QuadGridCell cell,
int ddepth,
int x,
int y,
QuadGridCell insertCell)
Like makeChildAt, but the instead of creating a new cell at the specified location, puts the specified cell there. |
void |
setRootCell(QuadGridCell rootCell)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public QuadGridCell rootCell
public int totalDepth
public int[][] gridSize
Constructor Detail |
public QuadTree(AccordionDrawer theowner)
Method Detail |
public void init(int depth)
public void setRootCell(QuadGridCell rootCell)
public GridCell getGridCell(int level, int row, int col)
public GridCell getChildAt(QuadGridCell cell, int ddepth, int x, int y)
public GridCell makeChildAt(QuadGridCell cell, int ddepth, int x, int y)
public GridCell putChildAt(QuadGridCell cell, int ddepth, int x, int y, QuadGridCell insertCell)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |