com.ge.research.acuity.ui
Class CellFontDecorator

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

public class CellFontDecorator
extends PresentationObject
implements Decorator

This class describes and encapsulates all the information about how to decorate the font property of 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
CellFontDecorator()
          Default constructor.
 
Method Summary
 boolean fontBlink()
          Returns the value of the flag indicating whether or not the contents should blink
 boolean fontBold()
          Returns the value of the flag indicating whether or not the font should be bold type
 boolean fontEmphasis()
          Returns the value of the flag indicating whether or not the font should be of an emphasized type
 boolean fontItalic()
          Returns the value of the flag indicating whether or not the font should be italic type
 boolean fontStrikethrough()
          Returns the value of the flag indicating whether or not the font should be strikethrough type
 boolean fontSubscript()
          Returns the value of the flag indicating whether or not the font should be subscript type
 boolean fontSuperscript()
          Returns the value of the flag indicating whether or not the font should be superscript type
 boolean fontUnderline()
          Returns the value of the flag indicating whether or not the font should be underline type
 int getAlpha()
          Returns the opaqueness component of the font Color The component value is in the range 0-255
 int getBlueVal()
          Returns the RGB blue value component of the font Color The component value is in the range 0-255
 java.lang.String getFont()
          Returns the name of the font type to use.
 java.awt.Color getFontColor()
          Returns the color to be used for the font.
 int getFontSize()
          Returns the font size specification.
 int getGreenVal()
          Returns the RGB green value component of the font Color The component value is in the range 0-255
 int getRedVal()
          Returns the RGB red value component of the font Color The component value is in the range 0-255
 void setAlpha(int alpha)
          Sets the opaqueness component of the font Color The component value must in the range 0-255.
 void setBlueVal(int blueVal)
          Sets the RGB blue value component of the font Color The component value must in the range 0-255.
 void setFont(java.lang.String fontName)
          Sets the name of the font type to use
 void setFontBlink(boolean fontBlink)
          Sets the value of the flag indicating whether or not the contents should blink
 void setFontBold(boolean fontBold)
          Sets the value of the flag indicating whether or not the font should be bold type
 void setFontColor(java.awt.Color color)
          Sets the color component values, for the cell font, from the argument color
 void setFontColor(int red, int green, int blue)
          Sets the RGB color component values, for the cell font
 void setFontColor(int red, int green, int blue, int alpha)
          Sets the RGB color component values and opaqueness value, for the cell font
 void setFontEmphasis(boolean fontEmphasis)
          Sets the value of the flag indicating whether or not the font should be of an emphasized type
 void setFontItalic(boolean fontItalic)
          Sets the value of the flag indicating whether or not the font should be italic type
 void setFontSize(int fontSize)
          Sets the font size specification
 void setFontStrikethrough(boolean fontStrikethrough)
          Sets the value of the flag indicating whether or not the font should be strikethrough type
 void setFontSubscript(boolean fontSubscript)
          Sets the value of the flag indicating whether or not the font should be subscript type
 void setFontSuperscript(boolean fontSuperscript)
          Sets the value of the flag indicating whether or not the font should be superscript type
 void setFontUnderline(boolean fontUnderline)
          Sets the value of the flag indicating whether or not the font should be underline type
 void setGreenVal(int greenVal)
          Sets the RGB green value component of the font Color The component value must in the range 0-255.
 void setIsDisplayed(boolean b)
          Overrides the setIsDisplayed method in PresentationObject.
 void setRedVal(int redVal)
          Sets the RGB red value component of the font 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellFontDecorator

public CellFontDecorator()
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

fontBlink

public boolean fontBlink()
Returns the value of the flag indicating whether or not the contents should blink

Returns:
true if the cell contents should blink; false otherwise.

fontBold

public boolean fontBold()
Returns the value of the flag indicating whether or not the font should be bold type

Returns:
true if the font should be bold type; false otherwise.

fontEmphasis

public boolean fontEmphasis()
Returns the value of the flag indicating whether or not the font should be of an emphasized type

Returns:
true if the font should be of an emphasized type; false otherwise.

fontItalic

public boolean fontItalic()
Returns the value of the flag indicating whether or not the font should be italic type

Returns:
true if the font should be italic type; false otherwise.

fontStrikethrough

public boolean fontStrikethrough()
Returns the value of the flag indicating whether or not the font should be strikethrough type

Returns:
true if the font should be strikethrough type; false otherwise.

fontSubscript

public boolean fontSubscript()
Returns the value of the flag indicating whether or not the font should be subscript type

Returns:
true if the font should be subscript type; false otherwise.

fontSuperscript

public boolean fontSuperscript()
Returns the value of the flag indicating whether or not the font should be superscript type

Returns:
true if the font should be superscript type; false otherwise.

fontUnderline

public boolean fontUnderline()
Returns the value of the flag indicating whether or not the font should be underline type

Returns:
true if the font should be underline type; false otherwise.

getAlpha

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

Returns:
The opaqueness component of the font color

getBlueVal

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

Returns:
The RGB blue value component of the font color

getFont

public java.lang.String getFont()
Returns the name of the font type to use.

Returns:
The name of the font type to use.

getFontColor

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

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

getFontSize

public int getFontSize()
Returns the font size specification.

Returns:
The font size specification.

getGreenVal

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

Returns:
The RGB green value component of the font color

getRedVal

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

Returns:
The RGB red value component of the font color

setAlpha

public void setAlpha(int alpha)
Sets the opaqueness component of the font 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 font color

setBlueVal

public void setBlueVal(int blueVal)
Sets the RGB blue value component of the font 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 font color

setFont

public void setFont(java.lang.String fontName)
Sets the name of the font type to use

Parameters:
fontName - the name of the font type to use

setFontBlink

public void setFontBlink(boolean fontBlink)
Sets the value of the flag indicating whether or not the contents should blink

Parameters:
fontBlink - true if the cell contents should blink; false otherwise

setFontBold

public void setFontBold(boolean fontBold)
Sets the value of the flag indicating whether or not the font should be bold type

Parameters:
fontBold - true if the font should be bold type; false otherwise

setFontColor

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

Parameters:
color - the new color for the cell font
See Also:
setFontColor(int, int, int, int)

setFontColor

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

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

setFontColor

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

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

setFontEmphasis

public void setFontEmphasis(boolean fontEmphasis)
Sets the value of the flag indicating whether or not the font should be of an emphasized type

Parameters:
fontEmphasis - true if the font should be of an emphasized type; false otherwise

setFontItalic

public void setFontItalic(boolean fontItalic)
Sets the value of the flag indicating whether or not the font should be italic type

Parameters:
fontItalic - true if the font should be italic type; false otherwise

setFontSize

public void setFontSize(int fontSize)
Sets the font size specification

Parameters:
fontSize - the size at which to render the font

setFontStrikethrough

public void setFontStrikethrough(boolean fontStrikethrough)
Sets the value of the flag indicating whether or not the font should be strikethrough type

Parameters:
fontStrikethrough - true if the font should be strikethrough type; false otherwise

setFontSubscript

public void setFontSubscript(boolean fontSubscript)
Sets the value of the flag indicating whether or not the font should be subscript type

Parameters:
fontSubscript - true if the font should be subscript type; false otherwise

setFontSuperscript

public void setFontSuperscript(boolean fontSuperscript)
Sets the value of the flag indicating whether or not the font should be superscript type

Parameters:
fontSuperscript - true if the font should be superscript type; false otherwise

setFontUnderline

public void setFontUnderline(boolean fontUnderline)
Sets the value of the flag indicating whether or not the font should be underline type

Parameters:
fontUnderline - true if the font should be underline type; false otherwise

setGreenVal

public void setGreenVal(int greenVal)
Sets the RGB green value component of the font 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 font color

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 font 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 font color