com.ge.research.acuity.ui
Class HighlightRegionDataseries

java.lang.Object
  extended bycom.ge.research.acuity.ui.PresentationObject
      extended bycom.ge.research.acuity.ui.Dataseries
          extended bycom.ge.research.acuity.ui.HighlightRegionDataseries
All Implemented Interfaces:
HighlightRegion

public class HighlightRegionDataseries
extends Dataseries
implements HighlightRegion

This class describes and encapsulates all the information about a region of a graph that should be decorated with an opaque colored area. The region can be defined as a single Datapoint, with values for the loThreshold and hiThreshold values along the axis of orientation, and the min and max values of the opposite axis. Then using a simple "bar" to represent the Datapoint, the region described should appear "highlighted". The HighlightRegionDataseries is produced as the last Dataseries of the GraphPO, so that it is rendered on top of all other Dataseries within the graph, and so that the min and max values for the graph axes are known.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:24 $
Author:
garbiras
Created on:
Feb 18, 2005

Field Summary
 
Fields inherited from interface com.ge.research.acuity.ui.HighlightRegion
DEFAULT_HIGHLIGHT_COLOR
 
Constructor Summary
HighlightRegionDataseries()
          The default constructor.
 
Method Summary
 void disableInvalidThresholds()
          A highlight region can have either range thresholds or a discrete value, but not both.
 java.lang.Object getAppliesTo()
          Gets the appliesTo reference for the highlight region.
 java.lang.String getHasDiscreteValue()
          Returns null.
 double getHiThreshold()
          Gets the upper threshold value for the highlight region on the axis of orientation.
 double getLoThreshold()
          Gets the lower threshold value for the highlight region on the axis of orientation.
 java.lang.String getName()
          Returns the highlight region identifier.
protected  boolean isXOrientation()
          Tells if the highlight region is oriented for the x axis or not.
protected  boolean isYOrientation()
          Tells if the highlight region is oriented for the y axis or not.
 void setAppliesTo(java.lang.Object appliesTo)
          Sets the appliesTo reference for the highlight region.
 void setDisplayPointInformation(boolean value)
          Overrides the setDisplayPointInformation method in Dataseries.
 void setHasDiscreteValue(java.lang.String discVal)
          This method does nothing, since only range value highlight regions can be rendered within a graph, single value regions are meaningless.
 void setHasPresentationNature(java.lang.String string)
          Overrides the setHasPresentationNature method in Dataseries.
 void setHiThreshold(double hiVal)
          Sets the upper threshold value for the highlight region on the axis of orientation.
 void setLoThreshold(double loVal)
          Sets the lower threshold value for the highlight region on the axis of orientation.
 void setName(java.lang.String name)
          Sets the highlight region identifier
protected  void setRegionMax(double maxVal)
          Sets the max value for the highlight region on the opposite axis of orientation.
protected  void setRegionMin(double minVal)
          Sets the min value for the highlight region on the opposite axis of orientation.
 void setTitle(java.lang.String title)
          Overrides the setTitle method in Dataseries.
protected  void setupDatapoint()
          Creates the Datapoint for the Dataseries.
 
Methods inherited from class com.ge.research.acuity.ui.Dataseries
addDatapoint, displayPointInformation, finalize, getAlpha, getBlueVal, getColor, getDatapoint, getDatapoints, getDatapointsCount, getDisplayOrder, getGreenVal, getMaxXValue, getMaxYValue, getMinXValue, getMinYValue, getParent, getRedVal, getTitle, removeDatapoint, removeDatapoints, removeParentReference, setAlpha, setBlueVal, setColor, setColor, setColor, setDatapoints, setDisplayOrder, setGreenVal, setParentReference, setRedVal
 
Methods inherited from class com.ge.research.acuity.ui.PresentationObject
addLookupInfo, getHasPresentationNature, getIdentifier, getLookupInfo, getSubject, hasSubject, isDisplayed, isEditable, setEditability, setIdentifier, setIsDisplayed
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ge.research.acuity.ui.HighlightRegion
getAlpha, getBlueVal, getColor, getGreenVal, getRedVal, isDisplayed, setAlpha, setBlueVal, setColor, setColor, setColor, setGreenVal, setIsDisplayed, setRedVal
 

Constructor Detail

HighlightRegionDataseries

public HighlightRegionDataseries()
The default constructor. Calls super(). Sets the presentation nature to PresentationNatureConstants.VBAR. Sets the default color to HighlightRegion.DEFAULT_HIGHLIGHT_COLOR. Sets the dataseries title to the class name. Sets the editability for presentation nature to false. Sets the editability for dataseries title to false. Sets the editability for dataseries display order to false.

See Also:
Dataseries.Dataseries(), Dataseries.setHasPresentationNature(java.lang.String), Dataseries.setColor(java.awt.Color), PresentationObject.setEditability(java.lang.String, boolean), HighlightRegion.DEFAULT_HIGHLIGHT_COLOR, PresentationNatureConstants.VBAR, PresentationParameterConstants.NATURE, PresentationParameterConstants.TITLE, PresentationParameterConstants.DISPLAYORDER, PresentationParameterConstants.DATASERIES_POINTS_DISPLAY_INFO
Method Detail

disableInvalidThresholds

public void disableInvalidThresholds()
Description copied from interface: HighlightRegion
A highlight region can have either range thresholds or a discrete value, but not both. This method is used to enforce this consistency by not allowing thresholds to be modified unless they were the original types declared when the highlight region was created. Sets the editability of either the range threshold parameters, or the discrete value parameter, to false depending on the information used from the ontology to construct it.

Specified by:
disableInvalidThresholds in interface HighlightRegion

getAppliesTo

public java.lang.Object getAppliesTo()
Gets the appliesTo reference for the highlight region. The highlight region is associated with either the x or y axis.

Specified by:
getAppliesTo in interface HighlightRegion
Returns:
The value of the appliesTo reference for the highlight region.

getHasDiscreteValue

public java.lang.String getHasDiscreteValue()
Returns null. Only range thresholds are valid for graph highlight regions.

Specified by:
getHasDiscreteValue in interface HighlightRegion
Returns:
null

getHiThreshold

public double getHiThreshold()
Gets the upper threshold value for the highlight region on the axis of orientation.

Specified by:
getHiThreshold in interface HighlightRegion
Returns:
The upper threshold value for the highlight region along the axis of orientation.

getLoThreshold

public double getLoThreshold()
Gets the lower threshold value for the highlight region on the axis of orientation.

Specified by:
getLoThreshold in interface HighlightRegion
Returns:
The lower threshold value for the highlight region along the axis of orientation.

getName

public java.lang.String getName()
Description copied from interface: HighlightRegion
Returns the highlight region identifier.

Specified by:
getName in interface HighlightRegion
Returns:
The highlight region identifier

setAppliesTo

public void setAppliesTo(java.lang.Object appliesTo)
Sets the appliesTo reference for the highlight region. Associates the highlight region with either the x or y axis. If the appliesTo argument is not a valid flag value, then the appliesTo flag is not changed.

Specified by:
setAppliesTo in interface HighlightRegion
Parameters:
appliesTo - the value of the appliesTo reference for the highlight region. Orients the highlight region with either the x or y axis
See Also:
PresentationParameterConstants.HIGHLIGHTREGION_APPLIESTO_XAXIS, PresentationParameterConstants.HIGHLIGHTREGION_APPLIESTO_YAXIS

setHasDiscreteValue

public void setHasDiscreteValue(java.lang.String discVal)
This method does nothing, since only range value highlight regions can be rendered within a graph, single value regions are meaningless.

Specified by:
setHasDiscreteValue in interface HighlightRegion
Parameters:
discVal - IGNORED

setHasPresentationNature

public final void setHasPresentationNature(java.lang.String string)
Overrides the setHasPresentationNature method in Dataseries. HighlightRegions can only have nature PresentationNatureConstants.VBAR, so this method does nothing.

Overrides:
setHasPresentationNature in class Dataseries
Parameters:
string - IGNORED
See Also:
PresentationNatureConstants.isDataseriesType(java.lang.String)

setHiThreshold

public void setHiThreshold(double hiVal)
Sets the upper threshold value for the highlight region on the axis of orientation.

Specified by:
setHiThreshold in interface HighlightRegion
Parameters:
hiVal - the upper threshold value for the highlight region along the axis of orientation.

setDisplayPointInformation

public final void setDisplayPointInformation(boolean value)
Overrides the setDisplayPointInformation method in Dataseries. HighlightRegions cannot display point information, so this method does nothing.

Overrides:
setDisplayPointInformation in class Dataseries
Parameters:
value - IGNORED

setLoThreshold

public void setLoThreshold(double loVal)
Sets the lower threshold value for the highlight region on the axis of orientation.

Specified by:
setLoThreshold in interface HighlightRegion
Parameters:
loVal - the lower threshold value for the highlight region along the axis of orientation.

setName

public void setName(java.lang.String name)
Description copied from interface: HighlightRegion
Sets the highlight region identifier

Specified by:
setName in interface HighlightRegion
Parameters:
name - the new identifier for the highlight region

setTitle

public final void setTitle(java.lang.String title)
Overrides the setTitle method in Dataseries. HighlightRegions cannot have titles, so this method does nothing.

Overrides:
setTitle in class Dataseries
Parameters:
title - IGNORED

isXOrientation

protected boolean isXOrientation()
Tells if the highlight region is oriented for the x axis or not.

Returns:
true if this highlight region is oriented for the x axis; false if this highlight region is oriented for the y axis.
See Also:
PresentationParameterConstants.HIGHLIGHTREGION_APPLIESTO_XAXIS

isYOrientation

protected boolean isYOrientation()
Tells if the highlight region is oriented for the y axis or not.

Returns:
true if this highlight region is oriented for the y axis; false if this highlight region is oriented for the x axis.
See Also:
PresentationParameterConstants.HIGHLIGHTREGION_APPLIESTO_YAXIS

setRegionMax

protected void setRegionMax(double maxVal)
Sets the max value for the highlight region on the opposite axis of orientation.

Parameters:
maxVal - the max value for the highlight region along the opposite axis of orientation.

setRegionMin

protected void setRegionMin(double minVal)
Sets the min value for the highlight region on the opposite axis of orientation.

Parameters:
minVal - the min value for the highlight region along the opposite axis of orientation.

setupDatapoint

protected void setupDatapoint()
Creates the Datapoint for the Dataseries.

See Also:
isXOrientation(), isYOrientation(), Datapoint.Datapoint(double, double, double, double), Dataseries.removeDatapoints(), Dataseries.addDatapoint(com.ge.research.acuity.ui.Datapoint)