AccordionDrawer
Class LabelBox

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

public class LabelBox
extends java.lang.Object
implements java.lang.Comparable

Axis-aligned bounding box class for label drawing. Stores information in screen coordintes, checks for overlap with other bounding boxes.

Author:
Tamara Munzner

Constructor Summary
LabelBox(int[] bottomLeft, int[] bottomRight, int[] topLeft, int[] topRight, int[] bottomLeftBG, int computedFrame, java.lang.String name, int labelheight, double angle, int drawVert)
           
LabelBox(int[] bottomLeft, int[] topRight, int[] bottomLeftBG, int computedFrame, java.lang.String name)
           
 
Method Summary
 boolean bottomBiggerThanTop(LabelBox target)
           
 boolean compareBtoT(LabelBox target, int low, int high)
           
 int compareTo(java.lang.Object o)
          implement Comparable interface - sort on y values
 java.lang.String getName()
           
 boolean intersectBoxes(LabelBox b)
           
 int pos(int xy)
           
 int size(int xy)
           
 int topRightPos(int xy)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelBox

public LabelBox(int[] bottomLeft,
                int[] topRight,
                int[] bottomLeftBG,
                int computedFrame,
                java.lang.String name)

LabelBox

public LabelBox(int[] bottomLeft,
                int[] bottomRight,
                int[] topLeft,
                int[] topRight,
                int[] bottomLeftBG,
                int computedFrame,
                java.lang.String name,
                int labelheight,
                double angle,
                int drawVert)
Method Detail

intersectBoxes

public boolean intersectBoxes(LabelBox b)

compareTo

public int compareTo(java.lang.Object o)
implement Comparable interface - sort on y values

Specified by:
compareTo in interface java.lang.Comparable

compareBtoT

public boolean compareBtoT(LabelBox target,
                           int low,
                           int high)

bottomBiggerThanTop

public boolean bottomBiggerThanTop(LabelBox target)

pos

public int pos(int xy)

topRightPos

public int topRightPos(int xy)

getName

public java.lang.String getName()
Returns:

size

public int size(int xy)