NetCharts Pro

netcharts.pro.charts.heatmap
Class NFHeatmapGridBlockLayout

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

public class NFHeatmapGridBlockLayout
extends NFBaseClass
implements NFCDLGenerator

Grid block layout which specifies the number of rows and columns in the grid. If not specified, then the grid layout will automatically be configured based upon the number of data values that can fit into a square.


Field Summary
static int DEFAULT_NUM_COLUMNS
          Default value for the number of columns if not specified.
static int DEFAULT_NUM_ROWS
          Default value for the number of rows if not specified.
static int MAX_COLUMNS
          Maximum number of columns allowed in the grid
static int MAX_ROWS
          Maximum number of rows allowed in the grid
 
Constructor Summary
NFHeatmapGridBlockLayout()
          Constructs a grid block layout object with the number of rows and columns set to default values.
NFHeatmapGridBlockLayout(int numRows, int numColumns)
          Constructs a grid block layout object from the specified number of rows and columns.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this gridlayout
 void getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing this grid layout to the given StringBuffer.
 int getNumColumns()
          Returns the number of columns in the grid.
 int getNumRows()
          Returns the number of rows in the grid.
 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 setNumColumns(int numColumns)
          Sets the number of columns in the grid.
 void setNumRows(int numRows)
          Sets the number of rows in the grid.
 java.lang.String toString()
          Returns a String object representing the grid layout.
 
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

DEFAULT_NUM_ROWS

public static final int DEFAULT_NUM_ROWS
Default value for the number of rows if not specified.

See Also:
Constant Field Values

DEFAULT_NUM_COLUMNS

public static final int DEFAULT_NUM_COLUMNS
Default value for the number of columns if not specified.

See Also:
Constant Field Values

MAX_ROWS

public static final int MAX_ROWS
Maximum number of rows allowed in the grid

See Also:
Constant Field Values

MAX_COLUMNS

public static final int MAX_COLUMNS
Maximum number of columns allowed in the grid

See Also:
Constant Field Values
Constructor Detail

NFHeatmapGridBlockLayout

public NFHeatmapGridBlockLayout()
Constructs a grid block layout object with the number of rows and columns set to default values.


NFHeatmapGridBlockLayout

public NFHeatmapGridBlockLayout(int numRows,
                                int numColumns)
Constructs a grid block layout object from the specified number of rows and columns.

Method Detail

getNumRows

public int getNumRows()
Returns the number of rows in the grid.

Returns:
number of rows in the grid or DEFAULT_NUM_ROWS if not set

setNumRows

public void setNumRows(int numRows)
Sets the number of rows in the grid. If the number of rows is less than or equal to 0, then the default value DEFAULT_NUM_ROWS is used. The number of rows cannot exceed MAX_ROWS.

Parameters:
numRows - number of rows in the grid

getNumColumns

public int getNumColumns()
Returns the number of columns in the grid.

Returns:
number of columns in the grid or DEFAULT_NUM_COLUMNS if not set

setNumColumns

public void setNumColumns(int numColumns)
Sets the number of columns in the grid. If the number of columns is less than or equal to 0, then the default value DEFAULT_NUM_COLUMNS is used. The number of columns cannot exceed MAX_COLUMNS.

Parameters:
numColumns - number of columns in the grid

getCDL

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

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: (numRows, numColumns)

getCDL

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

toString

public java.lang.String toString()
Returns a String object representing the grid layout.

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

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: (numRows, numColumns)

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 numRows and numColumns 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