com.ge.research.acuity.ui
Class HighlightRegionColumnInfo

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

public class HighlightRegionColumnInfo
extends PresentationObject
implements HighlightRegion

This class describes and encapsulates all the information about how to decorate the cells within a row of a table. Using the values of the column pointed to by the TableColumnInfo object containing this highlight information, if the values fall within the range described by the upper and lower threshold values for the highlight region, then the table row is "highlighted" by setting the table row color to the specified highlight region color.

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
HighlightRegionColumnInfo()
          Default constructor.
HighlightRegionColumnInfo(double hiVal, double loVal)
          Calls the default constructor, setting the default highlight color.
HighlightRegionColumnInfo(double hiVal, double loVal, java.awt.Color c)
          Calls the two argument constructor, setting the upper and lower threshold values for the highlighted elements Sets the highlight color to c
 
Method Summary
 void disableInvalidThresholds()
          A highlight region can have either range thresholds or a discrete value, but not both.
 int getAlpha()
          Returns the opaqueness component of the highlight region Color The component value is in the range 0-255
 java.lang.Object getAppliesTo()
          Returns the appliesTo reference for the highlight region.
 java.util.List getAppliesToChoices()
          Gets the list of columns belonging to the table to which this highlight region is associated.
 int getBlueVal()
          Returns the RGB blue value component of the highlight region Color The component value is in the range 0-255
 java.awt.Color getColor()
          Returns the color to be used when rendering this highlight region.
 int getGreenVal()
          Returns the RGB green value component of the highlight region Color The component value is in the range 0-255
 java.lang.String getHasDiscreteValue()
          Gets the discrete value threshold value for the highlight region.
 double getHiThreshold()
          Gets the upper threshold value for the highlight region.
 double getLoThreshold()
          Gets the lower threshold value for the highlight region.
 java.lang.String getName()
          Returns the highlight region identifier.
 int getRedVal()
          Returns the RGB red value component of the highlight region Color The component value is in the range 0-255
protected  void removeParentReference()
          Removes the reference to the parent column that this highlight belongs to.
 void setAlpha(int i)
          Sets the opaqueness component of the highlight region Color The component value must in the range 0-255.
 void setAppliesTo(java.lang.Object appliesTo)
          Sets the appliesTo reference for the highlight region.
 void setBlueVal(int i)
          Sets the RGB blue value component of the highlight region Color The component value must in the range 0-255.
 void setColor(java.awt.Color color)
          Sets the color component values, for the highlight region, from the argument color
 void setColor(int red, int green, int blue)
          Sets the RGB color component values, for the highlight region
 void setColor(int red, int green, int blue, int alpha)
          Sets the RGB color component values and opaqueness value, for the highlight region
 void setGreenVal(int i)
          Sets the RGB green value component of the highlight region Color The component value must in the range 0-255.
 void setHasDiscreteValue(java.lang.String discVal)
          Sets the discrete value threshold value for the highlight region.
 void setHiThreshold(double hiVal)
          Sets the upper threshold value for the highlight region.
 void setLoThreshold(double loVal)
          Sets the lower threshold value for the highlight region.
 void setName(java.lang.String name)
          Sets the highlight region identifier
protected  void setParentReference(TableColumnInfo parent)
          Sets the reference to the parent column that this highlight belongs to.
 void setRedVal(int i)
          Sets the RGB red value component of the highlight region Color The component value must in the range 0-255.
 
Methods inherited from class com.ge.research.acuity.ui.PresentationObject
addLookupInfo, getHasPresentationNature, getIdentifier, getLookupInfo, getSubject, hasSubject, isDisplayed, isEditable, setEditability, setHasPresentationNature, setIdentifier, setIsDisplayed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ge.research.acuity.ui.HighlightRegion
isDisplayed, setIsDisplayed
 

Constructor Detail

HighlightRegionColumnInfo

public HighlightRegionColumnInfo()
Default constructor. Sets the highlight color to HighlightRegion.DEFAULT_HIGHLIGHT_COLOR

See Also:
setColor(java.awt.Color), HighlightRegion.DEFAULT_HIGHLIGHT_COLOR

HighlightRegionColumnInfo

public HighlightRegionColumnInfo(double hiVal,
                                 double loVal)
Calls the default constructor, setting the default highlight color. Sets the upper and lower threshold values for the highlighted elements

See Also:
HighlightRegionColumnInfo(), setHiThreshold(double), setLoThreshold(double)

HighlightRegionColumnInfo

public HighlightRegionColumnInfo(double hiVal,
                                 double loVal,
                                 java.awt.Color c)
Calls the two argument constructor, setting the upper and lower threshold values for the highlighted elements Sets the highlight color to c

See Also:
HighlightRegionColumnInfo(double, double), setColor(java.awt.Color)
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

getAlpha

public int getAlpha()
Description copied from interface: HighlightRegion
Returns the opaqueness component of the highlight region Color The component value is in the range 0-255

Specified by:
getAlpha in interface HighlightRegion
Returns:
The opaqueness component of the highlight region color

getAppliesToChoices

public java.util.List getAppliesToChoices()
Gets the list of columns belonging to the table to which this highlight region is associated. This method is used to construct the options for the highlight's appliesTo attribute.

Returns:
The list of TableColumnInfo objects contained in the table to which this highlight region is associated.

getAppliesTo

public java.lang.Object getAppliesTo()
Description copied from interface: HighlightRegion
Returns the appliesTo reference for the highlight region. It is either the x or y axis, or table column number.

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

getBlueVal

public int getBlueVal()
Description copied from interface: HighlightRegion
Returns the RGB blue value component of the highlight region Color The component value is in the range 0-255

Specified by:
getBlueVal in interface HighlightRegion
Returns:
The RGB blue value component of the highlight region color

getColor

public java.awt.Color getColor()
Description copied from interface: HighlightRegion
Returns the color to be used when rendering this highlight region. The color is constructed from the component RGB values and opaque value of this highlight region.

Specified by:
getColor in interface HighlightRegion
Returns:
The display color for the highlight region

getGreenVal

public int getGreenVal()
Description copied from interface: HighlightRegion
Returns the RGB green value component of the highlight region Color The component value is in the range 0-255

Specified by:
getGreenVal in interface HighlightRegion
Returns:
The RGB green value component of the highlight region color

getHasDiscreteValue

public java.lang.String getHasDiscreteValue()
Description copied from interface: HighlightRegion
Gets the discrete value threshold value for the highlight region.

Specified by:
getHasDiscreteValue in interface HighlightRegion
Returns:
The discrete value threshold value for the highlight region

getHiThreshold

public double getHiThreshold()
Description copied from interface: HighlightRegion
Gets the upper threshold value for the highlight region.

Specified by:
getHiThreshold in interface HighlightRegion
Returns:
The upper threshold value for the highlight region

getLoThreshold

public double getLoThreshold()
Description copied from interface: HighlightRegion
Gets the lower threshold value for the highlight region.

Specified by:
getLoThreshold in interface HighlightRegion
Returns:
The lower threshold value for the highlight region

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

getRedVal

public int getRedVal()
Description copied from interface: HighlightRegion
Returns the RGB red value component of the highlight region Color The component value is in the range 0-255

Specified by:
getRedVal in interface HighlightRegion
Returns:
The RGB red value component of the highlight region color

setAlpha

public void setAlpha(int i)
Description copied from interface: HighlightRegion
Sets the opaqueness component of the highlight region Color The component value must in the range 0-255. Argument values less than zero should set the opaqueness to zero Argument values greater than 255 should set the opaqueness to 255

Specified by:
setAlpha in interface HighlightRegion
Parameters:
i - the opaqueness component of the highlight region color

setAppliesTo

public void setAppliesTo(java.lang.Object appliesTo)
Description copied from interface: HighlightRegion
Sets the appliesTo reference for the highlight region. Associates the highlight region with either the x or y axis, or table column number.

Specified by:
setAppliesTo in interface HighlightRegion
Parameters:
appliesTo - the value of the appliesTo reference for the highlight region

setBlueVal

public void setBlueVal(int i)
Description copied from interface: HighlightRegion
Sets the RGB blue value component of the highlight region Color The component value must in the range 0-255. Argument values less than zero should set the blue component value to zero Argument values greater than 255 should set the blue component value to 255

Specified by:
setBlueVal in interface HighlightRegion
Parameters:
i - the RGB blue value component of the highlight region color

setColor

public void setColor(java.awt.Color color)
Description copied from interface: HighlightRegion
Sets the color component values, for the highlight region, from the argument color

Specified by:
setColor in interface HighlightRegion
Parameters:
color - the new color for the highlight region

setColor

public void setColor(int red,
                     int green,
                     int blue)
Description copied from interface: HighlightRegion
Sets the RGB color component values, for the highlight region

Specified by:
setColor in interface HighlightRegion
Parameters:
red - the new RGB red value for the highlight region color
green - the new RGB green value for the highlight region color
blue - the new RGB blue value for the highlight region color

setColor

public void setColor(int red,
                     int green,
                     int blue,
                     int alpha)
Description copied from interface: HighlightRegion
Sets the RGB color component values and opaqueness value, for the highlight region

Specified by:
setColor in interface HighlightRegion
Parameters:
red - the new RGB red value for the highlight region color
green - the new RGB green value for the highlight region color
blue - the new RGB blue value for the highlight region color
alpha - the new opaqueness value for the highlight region color

setGreenVal

public void setGreenVal(int i)
Description copied from interface: HighlightRegion
Sets the RGB green value component of the highlight region Color The component value must in the range 0-255. Argument values less than zero should set the green component value to zero Argument values greater than 255 should set the green component value to 255

Specified by:
setGreenVal in interface HighlightRegion
Parameters:
i - the RGB green value component of the highlight region color

setHasDiscreteValue

public void setHasDiscreteValue(java.lang.String discVal)
Description copied from interface: HighlightRegion
Sets the discrete value threshold value for the highlight region.

Specified by:
setHasDiscreteValue in interface HighlightRegion
Parameters:
discVal - the discrete value threshold value for the highlight region

setHiThreshold

public void setHiThreshold(double hiVal)
Description copied from interface: HighlightRegion
Sets the upper threshold value for the highlight region.

Specified by:
setHiThreshold in interface HighlightRegion
Parameters:
hiVal - the upper threshold value for the highlight region

setLoThreshold

public void setLoThreshold(double loVal)
Description copied from interface: HighlightRegion
Sets the lower threshold value for the highlight region.

Specified by:
setLoThreshold in interface HighlightRegion
Parameters:
loVal - the lower threshold value for the highlight region

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

setRedVal

public void setRedVal(int i)
Description copied from interface: HighlightRegion
Sets the RGB red value component of the highlight region Color The component value must in the range 0-255. Argument values less than zero should set the red component value to zero Argument values greater than 255 should set the red component value to 255

Specified by:
setRedVal in interface HighlightRegion
Parameters:
i - the RGB red value component of the highlight region color

removeParentReference

protected final void removeParentReference()
Removes the reference to the parent column that this highlight belongs to.


setParentReference

protected final void setParentReference(TableColumnInfo parent)
Sets the reference to the parent column that this highlight belongs to.