net.sourceforge.olduvai.accordiondrawer
Interface CellGeom

All Known Implementing Classes:
TreeNode

public interface CellGeom

This interface represents an object that goes inside of a single cell defined by four split Lines (left, right, top, bottom) which are available in the GridCell for this object. Objects implementing this interface must implement the method to draw itself, as well as the method to pick within itself.


Method Summary
 void drawInCell(java.awt.Color c, double plane)
          Draws the object contained in its cell object, in the given color and depth.
 GridCell getCell()
          Accessor for the cell that this object is contained in.
 int getKey()
          Accessor for the key value of an object.
 SplitLine getMaxLine(int xy)
          Returns the maximum split line in the given direction for this object.
 SplitLine getMinLine(int xy)
          Returns the minimum split line in the given direction for this object.
 java.lang.String getName()
          Accessor for the name of this object.
 

Method Detail

getKey

int getKey()
Accessor for the key value of an object.

Returns:
The value of this object's key.

getName

java.lang.String getName()
Accessor for the name of this object.

Returns:
The string name of this object.

drawInCell

void drawInCell(java.awt.Color c,
                double plane)
Draws the object contained in its cell object, in the given color and depth.

Parameters:
c - The color to draw the object.
plane - The plane in which to draw the object.

getCell

GridCell getCell()
Accessor for the cell that this object is contained in. This cell may be a single cell wide/tall, or several cells in width/height.

Returns:
A grid cell that surrounds this object.

getMinLine

SplitLine getMinLine(int xy)
Returns the minimum split line in the given direction for this object.

Parameters:
xy - AccordionDrawer.X for horizontal, AccordionDrawer.Y for vertical direction.
Returns:
The minimum split line in the given direction.

getMaxLine

SplitLine getMaxLine(int xy)
Returns the maximum split line in the given direction for this object.

Parameters:
xy - AccordionDrawer.X for horizontal, AccordionDrawer.Y for vertical direction.
Returns:
The maximum split line in the given direction.