net.sourceforge.olduvai.accordiondrawer
Class DrawableRange

java.lang.Object
  extended by net.sourceforge.olduvai.accordiondrawer.DrawableRange
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
RangeInTree

public abstract class DrawableRange
extends java.lang.Object
implements java.lang.Comparable

A drawable range represents a range of objects on a given axis. (Could be X or Y.) The min and max are indices into the SplitLine array that represent the beginning and end of the range. AbstractRangeList stores multiple DrawableRanges.

See Also:
AbstractRangeList

Field Summary
protected  AccordionDrawer drawer
          The drawer for this range.
protected  AbstractRangeList group
          The group that this range is within, if applicable.
protected  int max
          The maximum split line index of all objects in the range.
protected  int min
          The minimum split line index of all objects in the range.
 
Constructor Summary
DrawableRange()
           
 
Method Summary
abstract  boolean equals(java.lang.Object o)
          Equals comparator for application-specific ranges.
 AccordionDrawer getAD()
          Drawer accessor.
 AbstractRangeList getGroup()
          Group accessor for the range.
 int getMax()
          Maximum split line accessor.
 int getMin()
          Minimum split line accessor.
 int rangeLength()
          Range length accessor.
 void setGroup(AbstractRangeList group)
          Mutator for group, the group for this range.
 void setMax(int max)
          Maximum split line mutator.
 void setMin(int min)
          Minimum split line mutator.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

min

protected int min
The minimum split line index of all objects in the range.


max

protected int max
The maximum split line index of all objects in the range.


drawer

protected AccordionDrawer drawer
The drawer for this range.


group

protected AbstractRangeList group
The group that this range is within, if applicable.

Constructor Detail

DrawableRange

public DrawableRange()
Method Detail

getAD

public AccordionDrawer getAD()
Drawer accessor.

Returns:
The drawer for this range, drawer.

getMin

public int getMin()
Minimum split line accessor.

Returns:
The minimum split line bound of the range (integer)

setMin

public void setMin(int min)
Minimum split line mutator.

Parameters:
min - The new minimum split line bound of the range min.

getMax

public int getMax()
Maximum split line accessor.

Returns:
The maximum split line bound of the range (integer)

setMax

public void setMax(int max)
Maximum split line mutator.

Parameters:
max - The new maximum split line bound of the range max.

rangeLength

public int rangeLength()
Range length accessor.

Returns:
The length of the range, inclusive of the min and max bounds.

equals

public abstract boolean equals(java.lang.Object o)
Equals comparator for application-specific ranges.

Overrides:
equals in class java.lang.Object
Parameters:
o - The other range for comparison.
Returns:
True when o = this, false otherwise.

getGroup

public AbstractRangeList getGroup()
Group accessor for the range.

Returns:
Returns the group this range is associated with.

setGroup

public void setGroup(AbstractRangeList group)
Mutator for group, the group for this range.

Parameters:
group - The group to set.