NetCharts Pro

netcharts.pro.common.rectangular
Class NFGridLine

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFLine
          extended by netcharts.pro.common.rectangular.NFGridLine
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFGridLine
extends NFLine
implements NFCDLGenerator

This object is used to define a grid's line style. Note that a chart can support multiple grids.


Field Summary
static int BAR
          Bar line
static int BOTH
          Vertical and horizontal lines layout
static int HORIZONTAL
          Horizontal lines only layout
static java.util.Hashtable lineLayoutMap
          lineLayoutMap hashtable
static int NONE
          No grid lines layout
static int VERTICAL
          Vertical lines only layout
 
Fields inherited from class netcharts.pro.common.NFLine
DASHED, DOTDASH, DOTTED, lineTypeMap, SOLID
 
Constructor Summary
NFGridLine()
          Constructs a default grid line
NFGridLine(int style, int thickness, java.awt.Color color, int layout)
          Constructs a grid line with the given line color, type, layout, and width.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this line.
 int getLayout()
          Get the layout style for this grid line.
 void setCDL(java.lang.Object cdlObject)
          Configures this object from a CDL parameter object.
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setLayout(int layout)
          Set the layout style for this grid line.
 java.lang.String toString()
          Returns a new String object representing this grid line.
 
Methods inherited from class netcharts.pro.common.NFLine
getCDL, getColor, getStyle, getThickness, setCDL, setColor, setStyle, setThickness
 
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 line


NONE

public static final int NONE
No grid lines layout


VERTICAL

public static final int VERTICAL
Vertical lines only layout


HORIZONTAL

public static final int HORIZONTAL
Horizontal lines only layout


BOTH

public static final int BOTH
Vertical and horizontal lines layout


lineLayoutMap

public static java.util.Hashtable lineLayoutMap
lineLayoutMap hashtable

Constructor Detail

NFGridLine

public NFGridLine()
Constructs a default grid line


NFGridLine

public NFGridLine(int style,
                  int thickness,
                  java.awt.Color color,
                  int layout)
Constructs a grid line with the given line color, type, layout, and width.

Parameters:
style - One of NONE, SOLID, DOTTED, DASHED, DOTDASH, BAR.
thickness - Line thickness (in pixels)
color - Line color
layout - One of NONE, HORIZONTAL, VERTICAL, BOTH
Method Detail

setLayout

public void setLayout(int layout)
Set the layout style for this grid line.

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

Parameters:
layout - One of HORIZONTAL, VERTICAL, BOTH, NONE

getLayout

public int getLayout()
Get the layout style for this grid line.

Returns:
layout. One of HORIZONTAL, VERTICAL, BOTH, NONE

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this line. Note that in current version, NetCharts4.0, this does not include line color.

Specified by:
getCDL in interface NFCDLGenerator
Overrides:
getCDL in class NFLine
Returns:
CDL in the form: (layout, style, thickness)

toString

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

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

setCDL

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

Overrides:
setCDL in class NFLine
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. Note that in current version, NetCharts4.0, this does not include line color.

Specified by:
setCDL in interface NFCDLGenerator
Overrides:
setCDL in class NFLine
Parameters:
cdl - CDL in the form: (layout, style, thickness)

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