NetCharts Pro

netcharts.pro.charts.heatmap
Class NFHeatmapchart

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

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 LEFT_LABEL
          Grid block left label
static int RIGHT_LABEL
          Grid block right label
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, BOX, BUBBLE, COMBO, DIAGRAM, DIAL, HEATMAP, 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.
 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.
 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.
 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 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 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 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, getBackgroundFillPattern, getBackgroundRegion, getCDL, getChartElementSpacing, getChartName, getChartSize, getColorTable, getDataActiveLabelsEnabled, getDwell, getDwellOffset, getErrors, getFooter, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphGraphics, getHeader, getLeftTitle, getLegend, getMetaData, getMinimumSize, getNoteSeries, getNumberFormat, getNumErrors, getPanel, getPlotArea, getPreferredSize, getRightTitle, getRootPanel, getScaleFactor, 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, setBackgroundFillPattern, setBackgroundRegion, setChartElementSpacing, setChartName, setChartSize, setColorTable, setDataActiveLabelsEnabled, setDocumentBase, setDwell, setDwellOffset, setFooter, setHeader, setLeftTitle, setLegend, setLicenseKey, setMetaData, setNoteSeries, setNumberFormat, setParentApplet, setPlotArea, setRightTitle, setScaleFactor, setSize, setSize, 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

LEFT_LABEL

public static final int LEFT_LABEL
Grid block left label

BOTTOM_LABEL

public static final int BOTTOM_LABEL
Grid block bottom label

RIGHT_LABEL

public static final int RIGHT_LABEL
Grid block right label
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
Overrides:
getDefaultData in class NFGraph
Following copied from class: netcharts.pro.common.NFGraph
Returns:
The default data used to initialize a chart.

getType

public int getType()
Gets the chart type.
Overrides:
getType in class NFGraph
Returns:
the type of this chart, always netcharts.pro.common.NFGraph.HEATMAP

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

writeExternal

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

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.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2006
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: Apr 14, 2006