NetCharts Pro

netcharts.pro.charts.heatmap
Class NFHeatmapCellTextStyle

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.charts.heatmap.NFHeatmapCellTextStyle
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFHeatmapCellTextStyle
extends NFBaseClass
implements NFCDLGenerator

The NFHeatmapCellTextStyle class describes how cell text is to be rendered.


Constructor Summary
NFHeatmapCellTextStyle()
          Constructs a default cell text style.
NFHeatmapCellTextStyle(boolean state)
          Constructs a cell text style in the given state.
NFHeatmapCellTextStyle(boolean state, java.awt.Color color, java.awt.Font font)
          Constructs a cell text style with the given state, color and font.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this text style
 void getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing this text style to the given StringBuffer.
 java.awt.Color getColor()
          Returns the text color
 java.awt.Font getFont()
          Returns the text font
 boolean getState()
          Returns the state of this cell text style.
 void setCDL(java.lang.Object cdlObject)
          Configures this text style from a CDL parameter object.
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 int setCDL(java.lang.String[] elements, int offset)
          Configures this object from a CDL parameter representation.
 void setColor(java.awt.Color color)
          Sets the text color.
 void setFont(java.awt.Font font)
          Sets the text font.
 void setState(boolean state)
          Sets the state of this cell text style.
 java.lang.String toString()
          Returns a new String object representing this text style.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
clone, getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NFHeatmapCellTextStyle

public NFHeatmapCellTextStyle()
Constructs a default cell text style.


NFHeatmapCellTextStyle

public NFHeatmapCellTextStyle(boolean state)
Constructs a cell text style in the given state.

Parameters:
state - When true, the text should be shown.

NFHeatmapCellTextStyle

public NFHeatmapCellTextStyle(boolean state,
                              java.awt.Color color,
                              java.awt.Font font)
Constructs a cell text style with the given state, color and font.

Parameters:
state - When true, the text should be shown.
color - The text color.
font - The font the text will be rendered with.
Method Detail

getState

public boolean getState()
Returns the state of this cell text style.

Returns:
true if text is to be shown, false if not. Returns true if not set.

setState

public void setState(boolean state)
Sets the state of this cell text style.

Parameters:
state - When true, the text should be shown.

getColor

public java.awt.Color getColor()
Returns the text color

Returns:
text color or null if not set.

setColor

public void setColor(java.awt.Color color)
Sets the text color.

Parameters:
color - color of text.

getFont

public java.awt.Font getFont()
Returns the text font

Returns:
current font or null if not set.

setFont

public void setFont(java.awt.Font font)
Sets the text font.

Parameters:
font - text font.

setCDL

public void setCDL(java.lang.Object cdlObject)
Configures this text style from a CDL parameter object.

Parameters:
cdlObject - CDL in a String form or in a user object.

setCDL

public void setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation.

Specified by:
setCDL in interface NFCDLGenerator
Parameters:
cdl - CDL in the form: (state, color, "fontname", fontsize)

setCDL

public int setCDL(java.lang.String[] elements,
                  int offset)
Configures this object from a CDL parameter representation.

Parameters:
elements - Array of parameter elements. This array is expected to contain consecutive elements containing state, color, font name and font size.
offset - Offset into the elements array.

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this text style

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: (state, color, font name, font size)

toString

public java.lang.String toString()
Returns a new String object representing this text style.

Specified by:
toString in interface NFCDLGenerator
Overrides:
toString in class java.lang.Object
Returns:
A new String object in the same form as that given by getCDL().

getCDL

public void getCDL(java.lang.StringBuffer sb,
                   boolean includeParens)
Append CDL parameters representing this text style to the given StringBuffer.

Parameters:
sb - Target buffer to append the CDL parameters
includeParens - If true, this will cause the parameters to be delimited with parenthesis.

NetCharts Pro


Visual Mining, Inc.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Jun 28, 2011