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

Field Summary
protected  int[] bl
           
protected  int[] blbg
           
protected  int[] br
           
protected  int[] center
           
(package private)  double drawAngle
           
(package private)  int drawVertical
           
protected  int[] extent
           
protected  int frameNum
           
(package private)  int labelheight
           
(package private)  java.lang.String name
           
protected  int[] tl
           
protected  int[] tr
           
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bl

protected int[] bl

tr

protected int[] tr

blbg

protected int[] blbg

center

protected int[] center

extent

protected int[] extent

tl

protected int[] tl

br

protected int[] br

frameNum

protected int frameNum

name

java.lang.String name

labelheight

int labelheight

drawAngle

double drawAngle

drawVertical

int drawVertical
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)