NetCharts Pro

netcharts.pro.common.barset
Class NFBarSymbol

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

public class NFBarSymbol
extends NFBaseClass
implements NFCDLGenerator

The abstract NFSymbol class provides support for objects requiring drawing symbol properties.


Field Summary
static int BAR
          Bar style
static int CYLINDER
          Cylindrical bar style
static int DIAMONDBAR
          Diamond bar style
static int PIEHORIZONTAL
          Horizontal pie style - considers data to be a percentage value less than or equal to 100.
static int PIEVERTICAL
          Vertical pie style - considers data to be a percentage value less than or equal to 100.
static int TRIANGLEBAR
          Triangular bar style
static java.util.Hashtable typeMap
          The set of allowed bar symbol types.
 
Constructor Summary
NFBarSymbol()
          Constructs a default bar symbol object
NFBarSymbol(int type, java.awt.Color color)
          Constructs a symbol object with the specified symbol type, size, and style.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this symbol
 java.lang.String getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing this symbol to the given StringBuffer.
 java.awt.Color getColor()
          Gets the current data symbol color.
 int getType()
          Gets the current data symbol type.
 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 data symbol color.
 void setType(int type)
          Sets the symbol type to use for the data.
 java.lang.String toString()
          Returns a new String object representing this symbol.
 
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
 

Field Detail

BAR

public static final int BAR
Bar style


TRIANGLEBAR

public static final int TRIANGLEBAR
Triangular bar style


DIAMONDBAR

public static final int DIAMONDBAR
Diamond bar style


CYLINDER

public static final int CYLINDER
Cylindrical bar style


PIEVERTICAL

public static final int PIEVERTICAL
Vertical pie style - considers data to be a percentage value less than or equal to 100.


PIEHORIZONTAL

public static final int PIEHORIZONTAL
Horizontal pie style - considers data to be a percentage value less than or equal to 100.


typeMap

public static java.util.Hashtable typeMap
The set of allowed bar symbol types. Consists of BAR, TRIANGLEBAR, DIAMONDBAR, CYLINDER, PIEVERTICAL, PIEHORIZONTAL.

Constructor Detail

NFBarSymbol

public NFBarSymbol()
Constructs a default bar symbol object


NFBarSymbol

public NFBarSymbol(int type,
                   java.awt.Color color)
Constructs a symbol object with the specified symbol type, size, and style.

Parameters:
type - One of BAR, TRIANGLEBAR, DIAMONDBAR, CYLINDER, PIEVERTICAL, PIEHORIZONTAL
color - Symbol color
Method Detail

setType

public void setType(int type)
Sets the symbol type to use for the data.

If the value passed is not a valid style an IllegalArgumentException will be thrown.

Parameters:
type - One of BAR, TRIANGLEBAR, DIAMONDBAR, CYLINDER, PIEVERTICAL, PIEHORIZONTAL

getType

public int getType()
Gets the current data symbol type.

Returns:
the data symbol type or BAR if not defined.

setColor

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

Parameters:
color - Symbol color.

getColor

public java.awt.Color getColor()
Gets the current data symbol color.

Returns:
the data symbol color or null if not defined.

toString

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

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 java.lang.String getCDL()
Generate CDL parameters representing this symbol

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: (symbolType, symbolColor)

getCDL

public java.lang.String getCDL(java.lang.StringBuffer sb,
                               boolean includeParens)
Append CDL parameters representing this symbol 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.

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: (symbolType, symbolColor)

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 symbolType and symbolColor information.
offset - Offset into the elements array.

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