com.gmail.thejcwk.semantics.topicmaps
Class SectionLayout
java.lang.Object
com.gmail.thejcwk.semantics.topicmaps.SectionLayout
public class SectionLayout
- extends java.lang.Object
A class detailing a the layout of a section on a topic map. Primarily for the use of the
TopicMapLayout class. The class is given the dimensions it has to fit into and a collection
of objects. The class will calculate a position for each object in the collection. Given
this same object, the class will return its position.
- Version:
- 2.0
- Author:
- Jan Kroeze
|
Constructor Summary |
SectionLayout(java.awt.geom.Rectangle2D.Double someBounds,
java.lang.Object[] someObjects)
Construct a new section. |
|
Method Summary |
java.awt.geom.Rectangle2D.Double |
getCellBounds(java.lang.Object index)
Returns the bounds for the cell associated with index. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CELL_HEIGHT
public final double DEFAULT_CELL_HEIGHT
- See Also:
- Constant Field Values
DEFAULT_Y_SPACER
public final double DEFAULT_Y_SPACER
- See Also:
- Constant Field Values
DEFAULT_X_SPACER
public final double DEFAULT_X_SPACER
- See Also:
- Constant Field Values
SectionLayout
public SectionLayout(java.awt.geom.Rectangle2D.Double someBounds,
java.lang.Object[] someObjects)
- Construct a new section.
- Parameters:
someBounds - The dimensions, and location of this section.aCellCount - The amount of cells in the section.aCellHeight - The height of cells contained in this section
getCellBounds
public java.awt.geom.Rectangle2D.Double getCellBounds(java.lang.Object index)
- Returns the bounds for the cell associated with index.
- Parameters:
index - Any object.
- Returns:
- A Rectangle2D.Double object or null if there is no cell associated with
index.