NetCharts Pro

netcharts.pro.common
Class NFModalLabel

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFTextStyle
          extended by netcharts.pro.common.NFModalLabel
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFModalLabel
extends NFTextStyle
implements NFCDLGenerator

The NFModalLabel object describes a element of text to include whether or not the text should be shown as well as the rendering attributes of the text. It is used to describe dynamically generated text elements like axis labels and active (popup) labels.


Field Summary
 
Fields inherited from class netcharts.pro.common.NFTextStyle
CENTER, LEFT, LINETHROUGH_DECORATION, NO_ASCENT, NO_DECORATION, NO_DESCENT, NO_LEADING, NO_MAXLINEADVANCE, OVERLINE_DECORATION, RIGHT, UNDERLINE_DECORATION
 
Constructor Summary
NFModalLabel()
          Constructs a default modal label.
NFModalLabel(boolean state)
          Constructs a text item in the given state.
NFModalLabel(boolean state, java.awt.Color color, java.awt.Font font)
          Constructs a text item with the given state, color, and font.
NFModalLabel(boolean state, java.awt.Color color, java.awt.Font font, int angle, int alignment)
          Constructs a text item with the given state, color, font, angle and alignment.
NFModalLabel(boolean state, java.awt.Color color, java.awt.Font font, int angle, int alignment, int decoration)
          Constructs a text item with the given state, color, font, angle, alignment and decoration.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this label
 java.lang.String getCDL(java.lang.String[] extra)
           
 void getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing this text label to the given StringBuffer.
 void getCDL(java.lang.StringBuffer sb, boolean includeParens, java.lang.String[] extra)
           
 boolean getState()
          Get the text item's state.
 void setCDL(java.lang.Object cdlObject)
          Configures this label from a CDL parameter object.
 void setCDL(java.lang.String cdl)
          Configures this label from a CDL parameter representation.
 void setCDL(java.lang.String[] elements, int offset)
          Configures this object from a CDL parameter representation.
 void setState(boolean state)
          Set the state of this text item.
 
Methods inherited from class netcharts.pro.common.NFTextStyle
getAlignment, getAngle, getAscent, getCDL, getColor, getDecoration, getDescent, getFont, getLeading, getMaxLineAdvance, setAlignment, setAngle, setAscent, setColor, setDecoration, setDescent, setFont, setLeading, setMaxLineAdvance, toString
 
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
 
Methods inherited from interface netcharts.pro.common.NFCDLGenerator
toString
 

Constructor Detail

NFModalLabel

public NFModalLabel()
Constructs a default modal label.


NFModalLabel

public NFModalLabel(boolean state)
Constructs a text item in the given state.

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

NFModalLabel

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

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

NFModalLabel

public NFModalLabel(boolean state,
                    java.awt.Color color,
                    java.awt.Font font,
                    int angle,
                    int alignment)
Constructs a text item with the given state, color, font, angle and alignment.

Parameters:
state - When true, the text should be shown.
color - Text color
font - Text font
angle - Font angle
alignment - The text alignment.

NFModalLabel

public NFModalLabel(boolean state,
                    java.awt.Color color,
                    java.awt.Font font,
                    int angle,
                    int alignment,
                    int decoration)
Constructs a text item with the given state, color, font, angle, alignment and decoration.

Parameters:
state - When true, the text should be shown.
color - Text color
font - Text font
angle - Font angle
alignment - The text alignment.
decoration - The text decoration.
Method Detail

getState

public boolean getState()
Get the text item's state.

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

setState

public void setState(boolean state)
Set the state of this text item.

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

setCDL

public void setCDL(java.lang.Object cdlObject)
Configures this label 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 label from a CDL parameter representation.

Specified by:
setCDL in interface NFCDLGenerator
Overrides:
setCDL in class NFTextStyle
Parameters:
cdl - CDL in the form: ("state", textcolor, "fontname", fontsize, angle, alignment)

setCDL

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

Overrides:
setCDL in class NFTextStyle
Parameters:
elements - Array of parameter elements. This array is expected to contain consecutive elements containing state, color, font, angle, and alignment information.
offset - Offset into the elements array.

getCDL

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

Specified by:
getCDL in interface NFCDLGenerator
Overrides:
getCDL in class NFTextStyle
Returns:
CDL in the form: ("state", textcolor, "fontname", fontsize, angle, alignment)

getCDL

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

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

getCDL

public void getCDL(java.lang.StringBuffer sb,
                   boolean includeParens,
                   java.lang.String[] extra)

getCDL

public java.lang.String getCDL(java.lang.String[] extra)

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