com.ge.research.acuity.ui
Class CellDecorator

java.lang.Object
  extended bycom.ge.research.acuity.ui.PresentationObject
      extended bycom.ge.research.acuity.ui.CellDecorator
All Implemented Interfaces:
Decorator

public class CellDecorator
extends PresentationObject
implements Decorator

This class describes and encapsulates all the information about how to decorate cells of a table whose contents meet a predefined criteria.

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

Constructor Summary
CellDecorator()
          Default constructor.
 
Method Summary
 int getAlpha()
          Returns the opaqueness component of the background Color The component value is in the range 0-255
 java.awt.Color getBackgroundColor()
          Returns the color to be used for the background of the cell.
 int getBlueVal()
          Returns the RGB blue value component of the background Color The component value is in the range 0-255
 CellFontDecorator getFontDecorator()
          Returns the font decorator to apply to the cell.
 int getGreenVal()
          Returns the RGB green value component of the background Color The component value is in the range 0-255
 java.lang.String getHtmlStyle()
          Returns the HTML style class to be applied to the cell, if rendered by an HTML client.
 java.lang.String getIcon()
          Returns the URL of an image file, to be displayed in place of the original cell contents.
 int getRedVal()
          Returns the RGB red value component of the background Color The component value is in the range 0-255
 java.lang.Object getReplacement()
          Returns the object to render in place of the original cell contents.
 void setAlpha(int alpha)
          Sets the opaqueness component of the background Color The component value must in the range 0-255.
 void setBackgroundColor(java.awt.Color color)
          Sets the color component values, for the cell background, from the argument color
 void setBackgroundColor(int red, int green, int blue)
          Sets the RGB color component values, for the cell background
 void setBackgroundColor(int red, int green, int blue, int alpha)
          Sets the RGB color component values and opaqueness value, for the cell background
 void setBlueVal(int blueVal)
          Sets the RGB blue value component of the background Color The component value must in the range 0-255.
 void setFontDecorator(CellFontDecorator font)
          Sets the font decorator to apply to the cell.
 void setGreenVal(int greenVal)
          Sets the RGB green value component of the background Color The component value must in the range 0-255.
 void setHtmlStyle(java.lang.String htmlStyle)
          Sets the HTML style class to be applied to the cell, if rendered by an HTML client.
 void setIcon(java.lang.String icon)
          Sets the URL of an image file, to be displayed in place of the original cell contents.
 void setIsDisplayed(boolean b)
          Overrides the setIsDisplayed method in PresentationObject.
 void setRedVal(int redVal)
          Sets the RGB red value component of the background Color The component value must in the range 0-255.
 void setReplacement(java.lang.Object replacement)
          Sets the object to render in place of the original cell contents.
 
Methods inherited from class com.ge.research.acuity.ui.PresentationObject
addLookupInfo, getHasPresentationNature, getIdentifier, getLookupInfo, getSubject, hasSubject, isDisplayed, isEditable, setEditability, setHasPresentationNature, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellDecorator

public CellDecorator()
Default constructor. Sets the editability of the isDisplayed attribute to false, since decorations are always displayed when they apply.

See Also:
PresentationObject.setEditability(java.lang.String, boolean), PresentationParameterConstants.ISDISPLAYED
Method Detail

getAlpha

public int getAlpha()
Returns the opaqueness component of the background Color The component value is in the range 0-255

Returns:
The opaqueness component of the background color

getBackgroundColor

public java.awt.Color getBackgroundColor()
Returns the color to be used for the background of the cell. The color is constructed from the component RGB values and opaque value of this decorator.

Returns:
The cell background color, or null if no background color decoration is to be applied

getBlueVal

public int getBlueVal()
Returns the RGB blue value component of the background Color The component value is in the range 0-255

Returns:
The RGB blue value component of the background color

getFontDecorator

public CellFontDecorator getFontDecorator()
Returns the font decorator to apply to the cell.

Returns:
The font decorator to apply to the cell.

getGreenVal

public int getGreenVal()
Returns the RGB green value component of the background Color The component value is in the range 0-255

Returns:
The RGB green value component of the background color

getHtmlStyle

public java.lang.String getHtmlStyle()
Returns the HTML style class to be applied to the cell, if rendered by an HTML client.

Returns:
The HTML style class to apply to an HTML table cell.

getIcon

public java.lang.String getIcon()
Returns the URL of an image file, to be displayed in place of the original cell contents.

Returns:
The URL of an image to display as the contents of the cell.

getRedVal

public int getRedVal()
Returns the RGB red value component of the background Color The component value is in the range 0-255

Returns:
The RGB red value component of the background color

getReplacement

public java.lang.Object getReplacement()
Returns the object to render in place of the original cell contents.

Returns:
The object to render in place of the original cell contents.

setAlpha

public void setAlpha(int alpha)
Sets the opaqueness component of the background Color The component value must in the range 0-255. Argument values less than zero will set the opaqueness to zero Argument values greater than 255 will set the opaqueness to 255

Parameters:
alpha - the opaqueness component of the background color

setBackgroundColor

public void setBackgroundColor(java.awt.Color color)
Sets the color component values, for the cell background, from the argument color

Parameters:
color - the new color for the cell background
See Also:
setBackgroundColor(int, int, int, int)

setBackgroundColor

public void setBackgroundColor(int red,
                               int green,
                               int blue)
Sets the RGB color component values, for the cell background

Parameters:
red - the new RGB red value for the cell background color
green - the new RGB green value for the cell background color
blue - the new RGB blue value for the cell background color
See Also:
setRedVal(int), setGreenVal(int), setBlueVal(int)

setBackgroundColor

public void setBackgroundColor(int red,
                               int green,
                               int blue,
                               int alpha)
Sets the RGB color component values and opaqueness value, for the cell background

Parameters:
red - the new RGB red value for the cell background color
green - the new RGB green value for the cell background color
blue - the new RGB blue value for the cell background color
alpha - the new opaqueness value for the cell background color
See Also:
setBackgroundColor(int, int, int), setAlpha(int)

setBlueVal

public void setBlueVal(int blueVal)
Sets the RGB blue value component of the background Color The component value must in the range 0-255. Argument values less than zero will set the blue component value to zero Argument values greater than 255 will set the blue component value to 255

Parameters:
blueVal - the RGB blue value component of the background color

setFontDecorator

public void setFontDecorator(CellFontDecorator font)
Sets the font decorator to apply to the cell.

Parameters:
font - the font decorator to apply to the cell contents.

setGreenVal

public void setGreenVal(int greenVal)
Sets the RGB green value component of the background Color The component value must in the range 0-255. Argument values less than zero will set the green component value to zero Argument values greater than 255 will set the green component value to 255

Parameters:
greenVal - the RGB green value component of the background color

setHtmlStyle

public void setHtmlStyle(java.lang.String htmlStyle)
Sets the HTML style class to be applied to the cell, if rendered by an HTML client.

Parameters:
htmlStyle - the HTML style class to apply to an HTML table cell.

setIcon

public void setIcon(java.lang.String icon)
Sets the URL of an image file, to be displayed in place of the original cell contents. param icon the URL of an image to display as the contents of the cell.


setIsDisplayed

public final void setIsDisplayed(boolean b)
Overrides the setIsDisplayed method in PresentationObject. Decorators are always displayed, so this method does nothing.

Overrides:
setIsDisplayed in class PresentationObject
Parameters:
b - IGNORED

setRedVal

public void setRedVal(int redVal)
Sets the RGB red value component of the background Color The component value must in the range 0-255. Argument values less than zero will set the red component value to zero Argument values greater than 255 will set the red component value to 255

Parameters:
redVal - the RGB red value component of the background color

setReplacement

public void setReplacement(java.lang.Object replacement)
Sets the object to render in place of the original cell contents.

Parameters:
replacement - the object to render in place of the original cell contents.