|
|||||||||||
| 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 | |
private static int |
ACTION_GET
|
private static int |
ACTION_MAKE
|
private static int |
ACTION_PUT
|
int[][] |
gridSize
|
private AccordionDrawer |
owner
|
QuadGridCell |
rootCell
|
int |
totalDepth
|
| Constructor Summary | |
QuadTree(AccordionDrawer theowner)
Constructor. |
|
| Method Summary | |
private GridCell |
actionChildAt(QuadGridCell cell,
int ddepth,
int x,
int y,
int action,
QuadGridCell insertCell)
Does the actual work for the xChildAt methods. |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private AccordionDrawer owner
public QuadGridCell rootCell
public int totalDepth
public int[][] gridSize
private static final int ACTION_GET
private static final int ACTION_MAKE
private static final int ACTION_PUT
| 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)
private GridCell actionChildAt(QuadGridCell cell,
int ddepth,
int x,
int y,
int action,
QuadGridCell insertCell)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||