NetCharts Pro

netcharts.pro.charts.heatmap
Class NFHeatmapGridBlockSort

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

public class NFHeatmapGridBlockSort
extends NFBaseClass
implements NFCDLGenerator

The NFHeatmapGridBlockSort class defines the grid sort criteria. The sort type specifies which data in the grid to sort (cell labels, cell values or none). The sort order specifies ascending or descending sort order. The grid data (cell values, cell labels and active labels) must be re-sent if going from a sorted list back to a non-sorted list.


Field Summary
static int ASCENDING
          Ascending sort
static int DEFAULT_SORT_ORDER
          Default value for the sort order if not set.
static int DEFAULT_SORT_TYPE
          Default value for the sort type if not set.
static int DESCENDING
          Descending sort
static int LABEL
          Sort by label
static int NONE
          No sorting
static java.util.Hashtable sortOrderMap
          Sort order hashtable
static java.util.Hashtable sortTypeMap
          Sort type hashtable
static int VALUE
          Sort by value
 
Constructor Summary
NFHeatmapGridBlockSort()
          Constructs a grid block sort object with default values.
NFHeatmapGridBlockSort(int sortType, int sortOrder)
          Constructs a grid block sort object from the specified sort type and sort order.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing the grid sort criteria.
 void getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing the grid sort criteria to the given StringBuffer.
 int getSortOrder()
          Returns the sort order (ASCENDING or DESCENDING)
 int getSortType()
          Returns the sort type (LABEL, VALUE or NONE)
 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 setSortOrder(int sortOrder)
          Sets the sort order (ASCENDING or DESCENDING)
 void setSortType(int sortType)
          Sets the sort type (LABEL, VALUE or NONE)
 java.lang.String toString()
          Returns a String object representing the grid sort criteria..
 
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

LABEL

public static final int LABEL
Sort by label

See Also:
Constant Field Values

VALUE

public static final int VALUE
Sort by value

See Also:
Constant Field Values

NONE

public static final int NONE
No sorting

See Also:
Constant Field Values

DEFAULT_SORT_TYPE

public static final int DEFAULT_SORT_TYPE
Default value for the sort type if not set.

See Also:
Constant Field Values

ASCENDING

public static final int ASCENDING
Ascending sort

See Also:
Constant Field Values

DESCENDING

public static final int DESCENDING
Descending sort

See Also:
Constant Field Values

DEFAULT_SORT_ORDER

public static final int DEFAULT_SORT_ORDER
Default value for the sort order if not set.

See Also:
Constant Field Values

sortTypeMap

public static java.util.Hashtable sortTypeMap
Sort type hashtable


sortOrderMap

public static java.util.Hashtable sortOrderMap
Sort order hashtable

Constructor Detail

NFHeatmapGridBlockSort

public NFHeatmapGridBlockSort()
Constructs a grid block sort object with default values.


NFHeatmapGridBlockSort

public NFHeatmapGridBlockSort(int sortType,
                              int sortOrder)
Constructs a grid block sort object from the specified sort type and sort order.

Method Detail

setSortType

public void setSortType(int sortType)
Sets the sort type (LABEL, VALUE or NONE)

If the specified sort type is not valid then an IllegalArgumentException will be thrown.

Parameters:
sortType - sort type

getSortType

public int getSortType()
Returns the sort type (LABEL, VALUE or NONE)

Returns:
the sort type or DEFAULT_SORT_TYPE if not set.

setSortOrder

public void setSortOrder(int sortOrder)
Sets the sort order (ASCENDING or DESCENDING)

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

Parameters:
sortOrder - sort order

getSortOrder

public int getSortOrder()
Returns the sort order (ASCENDING or DESCENDING)

Returns:
the sort order or DEFAULT_SORT_ORDER if not set.

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing the grid sort criteria.

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: (sortType, sortOrder)

getCDL

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

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: (sortType, sortOrder)

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 sort type and sort order 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