org.archive.wayback.util.graph
Class ValueGraphElements

java.lang.Object
  extended by org.archive.wayback.util.graph.RectangularGraphElement
      extended by org.archive.wayback.util.graph.ValueGraphElements
All Implemented Interfaces:
GraphElement

public class ValueGraphElements
extends RectangularGraphElement

Author:
brad

Field Summary
 
Fields inherited from class org.archive.wayback.util.graph.RectangularGraphElement
height, width, x, y
 
Constructor Summary
ValueGraphElements(int x, int y, int width, int height, int hightlightValue, int[] values, int maxValue, GraphConfiguration config)
           
 
Method Summary
 void draw(Graphics2D g2d)
          Draw the element onto a Graphics2D.
 ValueGraphElement getElement(int i)
          return the i'th ValueGraphElement
 int getHighlightValue()
           
 int[] getRawValues()
           
 
Methods inherited from class org.archive.wayback.util.graph.RectangularGraphElement
getBoundingRectangle, getHeight, getWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueGraphElements

public ValueGraphElements(int x,
                          int y,
                          int width,
                          int height,
                          int hightlightValue,
                          int[] values,
                          int maxValue,
                          GraphConfiguration config)
Parameters:
x - the rectangles x in the global coordinate space
y - the rectangles y in the global coordinate space
width - the rectangles width
height - the rectangles height
hightlightValue - the index of the value to highlight
values - array of int values, each must be 0-15
maxValue - the global maximum value across all elements in the Graph
config - the configuration for the Graph
Method Detail

getElement

public ValueGraphElement getElement(int i)
return the i'th ValueGraphElement

Parameters:
i - the index of the element to return
Returns:
the ValueGraphElement at index i

draw

public void draw(Graphics2D g2d)
Description copied from interface: GraphElement
Draw the element onto a Graphics2D.

Parameters:
g2d - the Graphics2D onto which the element should be drawn.

getHighlightValue

public int getHighlightValue()
Returns:
the index of the highlighted value

getRawValues

public int[] getRawValues()
Returns:
the raw int values for the graph


Copyright © 2005-2011 Internet Archive. All Rights Reserved.