org.archive.wayback.util.graph
Class RegionData
java.lang.Object
org.archive.wayback.util.graph.RegionData
public class RegionData
- extends Object
Containing object for data associated with one region (month/year/etc) in the
graph, including the:
label
highlighted value index
int array of values to graph within this region
the global max int value across all values in the overall graph
- Author:
- brad
|
Constructor Summary |
RegionData(String label,
int highlightedValue,
int[] values)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegionData
public RegionData(String label,
int highlightedValue,
int[] values)
- Parameters:
label - the text label to draw for this regionhighlightedValue - the index of the value to "highlight" or -1, if
no values should be highlighted. Note that highlighting a value in a
region causes the entire region to get a background highlight, alsovalues - int array of raw values, each between 0 and 15.
getLabel
public String getLabel()
- Returns:
- the String label for this region
getHighlightedValue
public int getHighlightedValue()
- Returns:
- the index of the highlighted value in this region, or -1 if none
are highlighted
setHighlightedValue
public void setHighlightedValue(int highlightedValue)
- sets the highlighted value index, or removes highlight if -1 is used
- Parameters:
highlightedValue - the index of the bar to highlight.
getValues
public int[] getValues()
- Returns:
- the raw array of values for this region
getMaxValue
public int getMaxValue()
- Returns:
- the global graph maximum value, used for normalizing values to
ensure the values use the entire Y axis.
setMaxValue
public void setMaxValue(int maxValue)
- Parameters:
maxValue - the global graph maximum value, used for normalizing
values to ensure the values use the entire Y axis.
hasHighlightedValue
public boolean hasHighlightedValue()
- Returns:
- true if one of the values in this region is highlighted
Copyright © 2005-2011 Internet Archive. All Rights Reserved.