AccordionDrawer
Class SortedCell

java.lang.Object
  |
  +--AccordionDrawer.SortedCell
All Implemented Interfaces:
java.lang.Comparable

class SortedCell
extends java.lang.Object
implements java.lang.Comparable

SortedCell is a helper class for AccordionDrawer. It's used in a sortedSet in conjunction with the splitCells data structure, to which it contains indices. The difference is that this one is sorted (separately in X and Y), so that it can be used for binary search. We use the values of the cell positions at initialization time for the sorting. Although we can never use these again as actual positions, because those change with user interaction, the *relative* placement can never change.

Author:
Tamara Munzner
See Also:
AccordionDrawer

Field Summary
(package private)  int origindex
          Index of cell in original splitCells array
private  double value
          Value of cell position at initialization time.
 
Constructor Summary
(package private) SortedCell(int oindex, double val)
           
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
(package private)  void print()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

private double value
Value of cell position at initialization time. Only used for sorting. Should never be accessed externally.


origindex

int origindex
Index of cell in original splitCells array

Constructor Detail

SortedCell

SortedCell(int oindex,
           double val)
Method Detail

print

void print()

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object