net.sourceforge.olduvai.accordiondrawer
Class SplitAxis.MovingSplitLine

java.lang.Object
  extended by net.sourceforge.olduvai.accordiondrawer.SplitAxis.MovingSplitLine
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
SplitAxis

protected class SplitAxis.MovingSplitLine
extends java.lang.Object
implements java.lang.Comparable

Wrapper class for storing end position and Split line state for a moving split line.

Author:
Peter McLachlan (spark343@cs.ubc.ca)

Field Summary
private  double finalAbsolutePos
          Final position of the split line in world-space coordinates.
private  SplitLine line
          Split line state variable.
 
Constructor Summary
SplitAxis.MovingSplitLine(SplitLine line, double finalAbsolutePos)
          Constructor for moving split lines.
 
Method Summary
 int compareTo(java.lang.Object arg0)
          Use the split line comparison function to compare two moving split lines for similarity.
 java.lang.String toString()
          Display function for moving split lines.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

line

private SplitLine line
Split line state variable.


finalAbsolutePos

private double finalAbsolutePos
Final position of the split line in world-space coordinates.

Constructor Detail

SplitAxis.MovingSplitLine

public SplitAxis.MovingSplitLine(SplitLine line,
                                 double finalAbsolutePos)
Constructor for moving split lines.

Parameters:
line - Line that is moving.
finalAbsolutePos - Final position in world-space coordinates for this line. The current position is always stored by the split line (cached) or may be computed with relative positions of a split line's ancestory.
Method Detail

compareTo

public int compareTo(java.lang.Object arg0)
Use the split line comparison function to compare two moving split lines for similarity.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
arg0 - Second split line to compare with.
Returns:
See SplitLine.compareTo(Object) for return values.

toString

public java.lang.String toString()
Display function for moving split lines.

Overrides:
toString in class java.lang.Object
Returns:
String representation of the moving split line.