|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.olduvai.accordiondrawer.AbstractRangeList
public abstract class AbstractRangeList
This class represents a list of ranges along ONE axis. A range is a set of indices min,max that represent cells in the SplitLine grid.
Field Summary | |
---|---|
protected java.awt.Color |
color
The drawing color for this range list, if appropriate. |
protected boolean |
enabled
True when this group is active, and will be drawn. |
protected int |
key
Unique integer key for this group |
protected java.util.Set |
ranges
Resizeable Set of RangeInTree objects. |
Constructor Summary | |
---|---|
AbstractRangeList()
|
Method Summary | |
---|---|
abstract AbstractRangeList |
flipRangeToShrink(int xy,
AccordionDrawer ad)
Reverses the ranges so we may grow the unselected ranges, performing a shrink on the selected ranges. |
java.awt.Color |
getColor()
Accessor for the range color, color |
int |
getKey()
Accessor for the key value, key |
abstract double[] |
getSizesOfAllRanges(SplitAxis splitAxis,
int frameNum)
For each range in ranges , store the size in world coordinates |
abstract int[] |
getSplitIndices(boolean horizontal)
Application-specific accessor for split line indices that surround this range. |
SplitLine[] |
getSplitLines(SplitAxis axis)
Analagous to getSplitIndices(boolean) but returns the list of lines instead. |
abstract double |
getUnshrinkableTotal(AccordionDrawer ad,
SplitAxis splitAxis,
int frameNum)
Return the quantity of world space that may not be shrunk by a stretching operation. |
boolean |
isEnabled()
Accessor for the value of enabled |
abstract AbstractRangeList |
onlyThisAD(AccordionDrawer d)
Cuts the ranges into a subset of only ranges in the given drawer. |
void |
setColor(java.awt.Color c)
Sets the color of the marked ranges. |
void |
setEnabled(boolean enabled)
Sets the value of enabled , turning on (true) or off (false) the rendering of the group defined by this abstract range list. |
void |
setKey(int key)
Sets the key to the given value. |
int |
size()
Accessor for the number of ranges in the set of ranges ranges . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.Color color
protected java.util.Set ranges
protected boolean enabled
protected int key
Constructor Detail |
---|
public AbstractRangeList()
Method Detail |
---|
public abstract int[] getSplitIndices(boolean horizontal)
horizontal
- For SJ, horizontal = true for nucleotide ranges, false for sequences
public SplitLine[] getSplitLines(SplitAxis axis)
getSplitIndices(boolean)
but returns the list of lines instead.
axis
- Axis that contains this list of ranges
public abstract double[] getSizesOfAllRanges(SplitAxis splitAxis, int frameNum)
ranges
, store the size in world coordinates
splitAxis
- The split axis that the range set representsframeNum
- The current frame number
public abstract double getUnshrinkableTotal(AccordionDrawer ad, SplitAxis splitAxis, int frameNum)
ad
- The accordion drawer to use for growing/shrinkingsplitAxis
- The axis (X or Y) for growing/shrinkingframeNum
- Current frame number
public abstract AbstractRangeList onlyThisAD(AccordionDrawer d)
d
- The drawer we wish to get the ranges in.
public abstract AbstractRangeList flipRangeToShrink(int xy, AccordionDrawer ad)
xy
- The axis direction for shrinking.ad
- The drawer for shrinking (contains the split axis)
public void setColor(java.awt.Color c)
c
- The color to set the ranges, color
.public java.awt.Color getColor()
color
color
public int getKey()
key
key
public void setKey(int key)
color
to key
, so we may later recover the depth of the current color, which we store in the alpha channel.
key
- The new value of key
, and the new value of the color
alpha channel.public int size()
ranges
.
ranges
, which are the selected ranges.public void setEnabled(boolean enabled)
enabled
, turning on (true) or off (false) the rendering of the group defined by this abstract range list.
enabled
- The new value of enabled
.public boolean isEnabled()
enabled
enabled
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |