NetCharts Pro

netcharts.pro.charts.heatmap
Class NFHeatmapchart

java.lang.Object
  extended by netcharts.pro.common.NFGraph
      extended by netcharts.pro.charts.heatmap.NFHeatmapchart
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver

public class NFHeatmapchart
extends NFGraph

Represents a Heat Map chart. Provides the ability to configure the chart via object manipulation or directly from CDL.

See Also:
Serialized Form

Field Summary
static int BOTTOM_LABEL
          Grid block bottom label
static int COLOR_TABLE
           
static int EXPRESSIONS
           
static int GRID_BLOCK_ANIMATION_STYLE_FADE
          Grid block animation style fade
static int GRID_BLOCK_ANIMATION_STYLE_NONE
          No grid block animation style
static int GRID_BLOCK_ANIMATION_STYLE_SCALE
          Grid block animation style scale
static java.util.Hashtable gridBlockColorTypeMap
           
static int LEFT_LABEL
          Grid block left label
static int RIGHT_LABEL
          Grid block right label
static int SPECTRUM
           
static int TOP_LABEL
          Grid block top label
 
Fields inherited from class netcharts.pro.common.NFGraph
ANTIALIAS_OFF, ANTIALIAS_ON, ANTIALIAS_ONDRAW, ANTIALIAS_ONTEXT, antiAliasModeMap, BAR, BAR3D, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, DWELL_ANIMATION_STYLE_HIGHLIGHT, DWELL_ANIMATION_STYLE_NONE, FADE, HEATMAP, HIGHLIGHT, HISTOGRAM, LABEL_ANIMATION_STYLE_FADE, LABEL_ANIMATION_STYLE_NONE, LEGEND_ANIMATION_STYLE_FADE, LEGEND_ANIMATION_STYLE_NONE, LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHT, LEGEND_DWELL_ANIMATION_STYLE_NONE, LINE, MULTIPIE, PARETO, PIE, POLAR, RADAR, STOCK, STRIP, TIME, XY
 
Constructor Summary
NFHeatmapchart()
          Constructs a default chart object.
NFHeatmapchart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFHeatmapchart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel with the specified properties.
NFHeatmapchart(java.util.Properties initProperties)
          Constructs a default chart object with the specified properties.
 
Method Summary
 int getCellTextAutoColorThreshold()
          Get the cell text auto color threshold.
 NFVector getColorExpressions()
          Get the color expressions
 NFColorSpectrum getColorSpectrum()
          Get the color spectrum values.
 java.lang.String getDefaultData()
          Returns a string of default data
 NFVector getGridBlockActiveLabels()
          Get active labels for the cells within the grid.
 int getGridBlockAnimationStyle()
          Get the grid block animation style.
 java.awt.Color getGridBlockBackgroundColor()
          Get the grid block background color.
 NFVector getGridBlockCellLabels()
          Get the labels to display in the grid.
 NFHeatmapCellTextStyle getGridBlockCellLabelStyle()
          Get the text style to use for the grid cell labels.
 NFFormat getGridBlockCellValueFormat()
          Get the format for the data values displayed in the grid.
 NFVector getGridBlockCellValues()
          Get the values to display in the grid.
 NFHeatmapCellTextStyle getGridBlockCellValueStyle()
          Get the text style to use for the grid cell values.
 NFColorTable getGridBlockColorTable()
          Get the grid block color table.
 int getGridBlockColorType()
          Get the grid block cell color type.
 NFModalLabel getGridBlockLabel(int labelPosition)
          Get the grid label text style for the specified label position.
 NFVector getGridBlockLabels(int labelPosition)
          Get the grid labels for the specified label position.
 NFHeatmapGridBlockLayout getGridBlockLayout()
          Get the number of rows and columns in the grid.
 NFLine getGridBlockLine()
          Get the grid block line attributes (color, style and width).
 NFHeatmapGridBlockSort getGridBlockSort()
          Get the grid block sort attributes.
 NFLegend getLegend()
          Returns the chart legend.
 NFFillBorder getLegendDwellAnimationHighlight()
          The legend dwell animation highlight is not supported.
 int getLegendDwellAnimationStyle()
          Legend dwell animation style is not supported.
 boolean getToggleDataVisibility()
          Toggle data visibility is not supported.
 int getType()
          Gets the chart type.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setCellTextAutoColorThreshold(int cellTextAutoColorThreshold)
          Set the cell text auto color threshold.
 void setColorExpressions(NFVector colorExpressions)
          Set the color expressions.
 void setColorSpectrum(NFColorSpectrum colorSpectrum)
          Set the color spectrum values.
 void setGridBlockActiveLabels(NFVector activeLabels)
          Set active labels for the cells within the grid.
 void setGridBlockAnimationStyle(int style)
          Set the grid block animation style.
 void setGridBlockBackgroundColor(java.awt.Color gridBlockBackgroundColor)
          Set the grid block background color.
 void setGridBlockCellLabels(NFVector cellLabels)
          Set the labels to display in the grid.
 void setGridBlockCellLabelStyle(NFHeatmapCellTextStyle cellLabelStyle)
          Set the text style to use for the grid cell labels.
 void setGridBlockCellValueFormat(NFFormat cellValueFormat)
          Set the format for the data values displayed in the grid.
 void setGridBlockCellValues(NFVector cellValues)
          Set the values to display in the grid.
 void setGridBlockCellValueStyle(NFHeatmapCellTextStyle cellValueStyle)
          Set the text style to use for the grid cell values.
 void setGridBlockColorTable(NFColorTable gridBlockColors)
          Set the grid block cell colors from the specified color table.
 void setGridBlockColorType(int gridBlockColorType)
          Sets the default grid block cell color type to use.
 void setGridBlockLabel(int labelPosition, NFModalLabel labelStyle)
          Set the grid label text style for the specified label position.
 void setGridBlockLabels(int labelPosition, NFVector labels)
          Set the grid labels for the specified label position.
 void setGridBlockLayout(int numRows, int numColumns)
          Set the number of rows and columns in the grid.
 void setGridBlockLayout(NFHeatmapGridBlockLayout gridBlockLayout)
          Set the number of rows and columns in the grid from the specified grid block layout object.
 void setGridBlockLine(NFLine gridBlockLine)
          Set the grid block line attributes (color, style and width).
 void setGridBlockSort(NFHeatmapGridBlockSort gridBlockSort)
          Set the grid block sort attributes.
 void setLegendDwellAnimationHighlight(NFFillBorder fb)
          The legend dwell animation highlight is not supported.
 void setLegendDwellAnimationStyle(int style)
          Legend dwell animation style is not supported.
 void setToggleDataVisibility(boolean toggleDataVisibility)
          Toggle data visibility is not supported.
 void writeChart(java.lang.StringBuffer sb)
          Writes this chart into a string buffer
 void writeExternal(java.io.ObjectOutput out)
          Writes this chart into an object for serialization.
 
Methods inherited from class netcharts.pro.common.NFGraph
addChartActionListener, addGraphObserver, addNote, addPropertyChangeListener, display, dwellDisplay, dwellPress, finalize, getActiveClicks, getAlwaysUpdate, getAntiAlias, getAntiAliasMode, getBackgroundActiveLabel, getBackgroundFillPattern, getBackgroundRegion, getBuildAnimationEnabled, getCDL, getChartElementSpacing, getChartName, getChartSize, getColorTable, getDataActiveLabelsEnabled, getDwell, getDwellAnimation, getDwellAnimationHighlight, getDwellAnimationStyle, getDwellOffset, getErrors, getFooter, getGraph, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphGraphics, getHeader, getLabelAnimationStyle, getLeftTitle, getLegendAnimationStyle, getLegendDwellAnimation, getLicenseActivationKey, getMetaData, getMinimumSize, getNoteSeries, getNumberFormat, getNumErrors, getPanel, getPlotArea, getPreferredSize, getRightTitle, getRootPanel, getRubberband, getScaleFactor, getTitleSpacing, getVersion, graphDrawn, graphTooSmall, initializeFromFile, initializeFromString, initializeFromURL, loadFromTemplate, loadFromTemplate, loadFromTemplate, loadLicenseFile, paint, postDrag, postScroll, preDrag, preScroll, readExternal, removeChartActionListener, removeGraphObserver, removePropertyChangeListener, sendData, sendData, sendData, sendData, sendUpdate, set, set, set, set, set, set, setActiveClicks, setAlwaysUpdate, setAntiAlias, setAntiAliasMode, setBackgroundActiveLabel, setBackgroundFillPattern, setBackgroundRegion, setBuildAnimationEnabled, setChartElementSpacing, setChartName, setChartSize, setColorTable, setDataActiveLabelsEnabled, setDocumentBase, setDwell, setDwellAnimation, setDwellAnimationHighlight, setDwellAnimationStyle, setDwellOffset, setFooter, setHeader, setLabelAnimationStyle, setLeftTitle, setLegend, setLegendAnimationStyle, setLegendDwellAnimation, setLicenseKey, setLicenseKey, setLicenseLocation, setMetaData, setNoteSeries, setNumberFormat, setParentApplet, setPlotArea, setRightTitle, setRubberband, setScaleFactor, setSize, setSize, setTitleSpacing, start, stop, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOP_LABEL

public static final int TOP_LABEL
Grid block top label

See Also:
Constant Field Values

LEFT_LABEL

public static final int LEFT_LABEL
Grid block left label

See Also:
Constant Field Values

BOTTOM_LABEL

public static final int BOTTOM_LABEL
Grid block bottom label

See Also:
Constant Field Values

RIGHT_LABEL

public static final int RIGHT_LABEL
Grid block right label

See Also:
Constant Field Values

gridBlockColorTypeMap

public static java.util.Hashtable gridBlockColorTypeMap

COLOR_TABLE

public static final int COLOR_TABLE

EXPRESSIONS

public static final int EXPRESSIONS

SPECTRUM

public static final int SPECTRUM

GRID_BLOCK_ANIMATION_STYLE_NONE

public static final int GRID_BLOCK_ANIMATION_STYLE_NONE
No grid block animation style

See Also:
Constant Field Values

GRID_BLOCK_ANIMATION_STYLE_SCALE

public static final int GRID_BLOCK_ANIMATION_STYLE_SCALE
Grid block animation style scale

See Also:
Constant Field Values

GRID_BLOCK_ANIMATION_STYLE_FADE

public static final int GRID_BLOCK_ANIMATION_STYLE_FADE
Grid block animation style fade

See Also:
Constant Field Values
Constructor Detail

NFHeatmapchart

public NFHeatmapchart()
Constructs a default chart object.


NFHeatmapchart

public NFHeatmapchart(javax.swing.JPanel panel)
Constructs a chart object on the given JPanel.

Parameters:
panel - Panel to draw chart on.

NFHeatmapchart

public NFHeatmapchart(java.util.Properties initProperties)
Constructs a default chart object with the specified properties.

Parameters:
initProperties - A java.util.Properties object containing the set of runtime properties to use when generating the chart. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.

NFHeatmapchart

public NFHeatmapchart(javax.swing.JPanel panel,
                      java.util.Properties initProperties)
Constructs a chart object on the given JPanel with the specified properties.

Parameters:
panel - Panel to draw chart on.
initProperties - A java.util.Properties object containing the set of runtime properties to use when generating the chart. See the netcharts.pro.common.NFGraph(java.util.Properties) constructor for a list of valid Properties.
Method Detail

getDefaultData

public java.lang.String getDefaultData()
Returns a string of default data

Specified by:
getDefaultData in class NFGraph
Returns:
The default data used to initialize a chart.

getType

public int getType()
Gets the chart type.

Specified by:
getType in class NFGraph
Returns:
the type of this chart, always netcharts.pro.common.NFGraph.HEATMAP

getLegend

public NFLegend getLegend()
Returns the chart legend. Will create a new one from the state hashtable if the legend has not been set.

Overrides:
getLegend in class NFGraph
Returns:
legend

getGridBlockColorType

public int getGridBlockColorType()
Get the grid block cell color type.

Returns:
layout. -1 if not specified, else one of COLORTABLE_GRIDBLOCK_COLOR_TYPE, EXPRESSION_GRIDBLOCK_COLOR_TYPE, SPECTRUM_GRIDBLOCK_COLOR_TYPE

setGridBlockColorType

public void setGridBlockColorType(int gridBlockColorType)
Sets the default grid block cell color type to use.

If the value passed is not a valid grid block cell color type an IllegalArgumentException will be thrown.

Parameters:
layout - One of COLORTABLE_GRIDBLOCK_COLOR_TYPE, EXPRESSION_GRIDBLOCK_COLOR_TYPE, SPECTRUM_GRIDBLOCK_COLOR_TYPE

setGridBlockColorTable

public void setGridBlockColorTable(NFColorTable gridBlockColors)
Set the grid block cell colors from the specified color table. If there are fewer colors than the number of cells, the colors will wrap around and start over with the first color. NFColorTable contains a list of java.awt.Color objects. Takes precedence over color expressions and color spectrum.

Parameters:
gridBlockColors - NFColorTable containing a list of java.awt.Color objects

getGridBlockColorTable

public NFColorTable getGridBlockColorTable()
Get the grid block color table. Takes precedence over color expressions and color spectrum.

Returns:
NFColorTable containing a list of java.awt.Color objects

setGridBlockCellLabels

public void setGridBlockCellLabels(NFVector cellLabels)
Set the labels to display in the grid. NFVector contains a list of string values.

Parameters:
cellLabels - labels to display in the grid

getGridBlockCellLabels

public NFVector getGridBlockCellLabels()
Get the labels to display in the grid. NFVector contains a list of string values.

Returns:
list of grid cell labels

setGridBlockCellValues

public void setGridBlockCellValues(NFVector cellValues)
Set the values to display in the grid. NFVector contains a list of numeric values.

Parameters:
cellValues - values to display in the grid

getGridBlockCellValues

public NFVector getGridBlockCellValues()
Get the values to display in the grid. NFVector contains a list of numeric values.

Returns:
list of grid cell values

setGridBlockCellLabelStyle

public void setGridBlockCellLabelStyle(NFHeatmapCellTextStyle cellLabelStyle)
Set the text style to use for the grid cell labels.

Parameters:
cellLabelStyle - text style.

getGridBlockCellLabelStyle

public NFHeatmapCellTextStyle getGridBlockCellLabelStyle()
Get the text style to use for the grid cell labels.

Returns:
text style or null if not defined.

setGridBlockCellValueStyle

public void setGridBlockCellValueStyle(NFHeatmapCellTextStyle cellValueStyle)
Set the text style to use for the grid cell values.

Parameters:
cellValueStyle - text style.

getGridBlockCellValueStyle

public NFHeatmapCellTextStyle getGridBlockCellValueStyle()
Get the text style to use for the grid cell values.

Returns:
text style or null if not defined.

setGridBlockCellValueFormat

public void setGridBlockCellValueFormat(NFFormat cellValueFormat)
Set the format for the data values displayed in the grid. The supported format types are: NFFormat.NONE, NFFormat.INTEGER, NFFormat.FLOAT and NFFormat.DECIMAL

Parameters:
cellValueFormat - NFFormat object describing how cell values are to be formatted.

getGridBlockCellValueFormat

public NFFormat getGridBlockCellValueFormat()
Get the format for the data values displayed in the grid.


setGridBlockActiveLabels

public void setGridBlockActiveLabels(NFVector activeLabels)
Set active labels for the cells within the grid. NFVector contains a list of NFActiveLabels.

Parameters:
activeLabels - list of active labels for the cells within the grid

getGridBlockActiveLabels

public NFVector getGridBlockActiveLabels()
Get active labels for the cells within the grid.

Returns:
NFVector of active labels

setGridBlockLayout

public void setGridBlockLayout(int numRows,
                               int numColumns)
Set the number of rows and columns in the grid.

Parameters:
numRows - number of rows in the grid
numColumns - number of columns in the grid

setGridBlockLayout

public void setGridBlockLayout(NFHeatmapGridBlockLayout gridBlockLayout)
Set the number of rows and columns in the grid from the specified grid block layout object.

Parameters:
gridBlockLayout - represents the number of rows and columns in the grid

getGridBlockLayout

public NFHeatmapGridBlockLayout getGridBlockLayout()
Get the number of rows and columns in the grid.

Returns:
NFHeatmapGridBlockLayout object representing the number of rows and columns in the grid.

setGridBlockSort

public void setGridBlockSort(NFHeatmapGridBlockSort gridBlockSort)
Set the grid block sort attributes.

Parameters:
gridBlockSort - attributes

getGridBlockSort

public NFHeatmapGridBlockSort getGridBlockSort()
Get the grid block sort attributes.

Returns:
NFHeatmapGridBlockSort object representing the sort attributes

setGridBlockBackgroundColor

public void setGridBlockBackgroundColor(java.awt.Color gridBlockBackgroundColor)
Set the grid block background color.

Parameters:
gridBlockBackgroundColor - grid block background color

getGridBlockBackgroundColor

public java.awt.Color getGridBlockBackgroundColor()
Get the grid block background color.

Returns:
color of the grid block background line or null if not set.

setGridBlockLine

public void setGridBlockLine(NFLine gridBlockLine)
Set the grid block line attributes (color, style and width). A line style set of none (NFLine.NONE) is not supported and will default to NFLine.SOLID instead.

Parameters:
gridBlockline - NFLine object describing the grid line

getGridBlockLine

public NFLine getGridBlockLine()
Get the grid block line attributes (color, style and width).

Parameters:
NFLine - object describing the grid block line

setColorSpectrum

public void setColorSpectrum(NFColorSpectrum colorSpectrum)
Set the color spectrum values.

Parameters:
colorSpectrum - color spectrum values

getColorSpectrum

public NFColorSpectrum getColorSpectrum()
Get the color spectrum values.

Returns:
color spectrum values

setColorExpressions

public void setColorExpressions(NFVector colorExpressions)
Set the color expressions. NFVector contains a list of NFColorExpression objects.

Parameters:
colorExpressions - NFVector containing a list of NFColorExpression objects

getColorExpressions

public NFVector getColorExpressions()
Get the color expressions

Returns:
NFVector containing a list of NFColorExpression objects

setGridBlockLabels

public void setGridBlockLabels(int labelPosition,
                               NFVector labels)
Set the grid labels for the specified label position. NFVector contains a list of string values.

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

Parameters:
labelPosition - one of TOP_LABEL, LEFT_LABEL, BOTTOM_LABEL, RIGHT_LABEL
labels - grid block labels

getGridBlockLabels

public NFVector getGridBlockLabels(int labelPosition)
Get the grid labels for the specified label position.

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

Parameters:
labelPosition - one of TOP_LABEL, LEFT_LABEL, BOTTOM_LABEL, RIGHT_LABEL
Returns:
NFVector of label strings

setGridBlockLabel

public void setGridBlockLabel(int labelPosition,
                              NFModalLabel labelStyle)
Set the grid label text style for the specified label position.

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

Parameters:
labelPosition - one of TOP_LABEL, LEFT_LABEL, BOTTOM_LABEL, RIGHT_LABEL
labelStyle - text style for the label

getGridBlockLabel

public NFModalLabel getGridBlockLabel(int labelPosition)
Get the grid label text style for the specified label position.

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

Parameters:
labelPosition - one of TOP_LABEL, LEFT_LABEL, BOTTOM_LABEL, RIGHT_LABEL
Returns:
label text style

setCellTextAutoColorThreshold

public void setCellTextAutoColorThreshold(int cellTextAutoColorThreshold)
Set the cell text auto color threshold. This is the color distance threshold between the cell label or cell value foreground color and the cell background color. This value is a percentage ranging from 0 - 100 and determines whether the foreground color is inverted to make the text more readable. A value of 0 turns off this option. The default value is 25%.

Parameters:
cellTextAutoColorThreshold - cell text auto color threshold value

getCellTextAutoColorThreshold

public int getCellTextAutoColorThreshold()
Get the cell text auto color threshold. This is the color distance threshold between the cell label or cell value foreground color and the cell background color. This value is a percentage ranging from 0 - 100 and determines whether the foreground color is inverted to make the text more readable. A value of 0 turns off this option. The default value is 25%.

Returns:
cell text auto color threshold value

setGridBlockAnimationStyle

public void setGridBlockAnimationStyle(int style)
Set the grid block animation style.

If the value passed is not a valid grid block animation style, GRID_BLOCK_ANIMATION_STYLE_NONE will be used.

Parameters:
style - One of GRID_BLOCK_ANIMATION_STYLE_NONE (default), GRID_BLOCK_ANIMATION_STYLE_SCALE or GRID_BLOCK_ANIMATION_STYLE_FADE

getGridBlockAnimationStyle

public int getGridBlockAnimationStyle()
Get the grid block animation style.

Returns:
type One of GRID_BLOCK_ANIMATION_STYLE_NONE (default), GRID_BLOCK_ANIMATION_STYLE_SCALE or GRID_BLOCK_ANIMATION_STYLE_FADE

setLegendDwellAnimationStyle

public void setLegendDwellAnimationStyle(int style)
Legend dwell animation style is not supported. The style will be ignored.

Overrides:
setLegendDwellAnimationStyle in class NFGraph
Parameters:
style - One of LEGEND_DWELL_ANIMATION_STYLE_NONE (default) or LEGEND_DWELL_ANIMATION_STYLE_HIGHLIGHT

getLegendDwellAnimationStyle

public int getLegendDwellAnimationStyle()
Legend dwell animation style is not supported.

Overrides:
getLegendDwellAnimationStyle in class NFGraph
Returns:
LEGEND_DWELL_ANIMATION_STYLE_NONE

setLegendDwellAnimationHighlight

public void setLegendDwellAnimationHighlight(NFFillBorder fb)
The legend dwell animation highlight is not supported. The highlight will be ignored.

Overrides:
setLegendDwellAnimationHighlight in class NFGraph

getLegendDwellAnimationHighlight

public NFFillBorder getLegendDwellAnimationHighlight()
The legend dwell animation highlight is not supported.

Overrides:
getLegendDwellAnimationHighlight in class NFGraph
Returns:
null

setToggleDataVisibility

public void setToggleDataVisibility(boolean toggleDataVisibility)
Toggle data visibility is not supported. The toggleDataVisibility flag will be ignored.

Overrides:
setToggleDataVisibility in class NFGraph
Parameters:
toggleDataVisibility - true enable show/hide data false disable show/hide data

getToggleDataVisibility

public boolean getToggleDataVisibility()
Toggle data visibility is not supported. Returns false

Overrides:
getToggleDataVisibility in class NFGraph

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Writes this chart into an object for serialization.

Specified by:
writeExternal in interface java.io.Externalizable
Overrides:
writeExternal in class NFGraph
Throws:
java.io.IOException

writeChart

public void writeChart(java.lang.StringBuffer sb)
Writes this chart into a string buffer

Overrides:
writeChart in class NFGraph

resetState

public void resetState()
Resets all of the parameter values to their initial state.

Overrides:
resetState in class NFGraph

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