NetCharts Pro

netcharts.pro.common.zoomable
Class NFZoomableChart

java.lang.Object
  extended by netcharts.pro.common.NFGraph
      extended by netcharts.pro.common.zoomable.NFZoomableChart
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, NFDragObserver, NFDwellObserver, NFGraphObserver, NFScrollObserver
Direct Known Subclasses:
NFDataChart

public abstract class NFZoomableChart
extends NFGraph

Represents a chart that supports zomming.

See Also:
Serialized Form

Field Summary
static int NOZOOM
          No zooming action.
static java.util.Hashtable zoomActionsMap
          zoomActionsMap hashtable
static int ZOOMIN
          Zoom in action.
static int ZOOMOUT
          Zoom out action.
 
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
NFZoomableChart()
          Constructs a default chart object.
NFZoomableChart(javax.swing.JPanel panel)
          Constructs a chart object on the given JPanel.
NFZoomableChart(javax.swing.JPanel panel, java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
NFZoomableChart(java.util.Properties initProperties)
          Constructs a chart object on the given JPanel.
 
Method Summary
 int getMouseControlDown()
          Get the zoom action for the mouse down event with Control depressed.
 int getMouseMetaDown()
          Get the zoom action for the mouse down event.
 int getMouseShiftDown()
          Get the zoom action for the mouse down event with Shift depressed.
 boolean getZoomingEnabled()
          Get whether zooming is enabled to not.
 void resetState()
          Resets all of the parameter values to their initial state.
 void setMouseControlDown(int zoomAction)
          Set the zoom action for the mouse down event with Control depressed.
 void setMouseMetaDown(int zoomAction)
          Set the zoom action for the mouse down event.
 void setMouseShiftDown(int zoomAction)
          Set the zoom action for the mouse down event with Shift depressed.
 void setZoomingEnabled(boolean enabled)
          Enable or disable zooming.
 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.
 void zoom(int x, int y, int w, int h)
          Zoom into the graph using a given rectangle.
 
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, getDefaultData, getDwell, getDwellAnimation, getDwellAnimationHighlight, getDwellAnimationStyle, getDwellOffset, getErrors, getFooter, getGraph, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphFromTemplate, getGraphGraphics, getHeader, getLabelAnimationStyle, getLeftTitle, getLegend, getLegendAnimationStyle, getLegendDwellAnimation, getLegendDwellAnimationHighlight, getLegendDwellAnimationStyle, getLicenseActivationKey, getMetaData, getMinimumSize, getNoteSeries, getNumberFormat, getNumErrors, getPanel, getPlotArea, getPreferredSize, getRightTitle, getRootPanel, getRubberband, getScaleFactor, getTitleSpacing, getToggleDataVisibility, getType, 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, setLegendDwellAnimationHighlight, setLegendDwellAnimationStyle, setLicenseKey, setLicenseKey, setLicenseLocation, setMetaData, setNoteSeries, setNumberFormat, setParentApplet, setPlotArea, setRightTitle, setRubberband, setScaleFactor, setSize, setSize, setTitleSpacing, setToggleDataVisibility, start, stop, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOZOOM

public static final int NOZOOM
No zooming action.


ZOOMIN

public static final int ZOOMIN
Zoom in action.


ZOOMOUT

public static final int ZOOMOUT
Zoom out action.


zoomActionsMap

public static java.util.Hashtable zoomActionsMap
zoomActionsMap hashtable

Constructor Detail

NFZoomableChart

public NFZoomableChart()
Constructs a default chart object.


NFZoomableChart

public NFZoomableChart(java.util.Properties initProperties)
Constructs a chart object on the given JPanel.

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.

NFZoomableChart

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

Parameters:
panel - Panel to draw graph on.

NFZoomableChart

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

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

setMouseMetaDown

public void setMouseMetaDown(int zoomAction)
Set the zoom action for the mouse down event.

If the value passed is not a valid zoom action an IllegalArgumentException will be thrown.

Parameters:
layout - One of ZOOMIN, ZOOMOUT, NOZOOM

getMouseMetaDown

public int getMouseMetaDown()
Get the zoom action for the mouse down event.

Returns:
layout. One of ZOOMIN, ZOOMOUT, NOZOOM

setMouseShiftDown

public void setMouseShiftDown(int zoomAction)
Set the zoom action for the mouse down event with Shift depressed.

If the value passed is not a valid zoom action an IllegalArgumentException will be thrown.

Parameters:
layout - One of ZOOMIN, ZOOMOUT, NOZOOM

getMouseShiftDown

public int getMouseShiftDown()
Get the zoom action for the mouse down event with Shift depressed.

Returns:
layout. One of ZOOMIN, ZOOMOUT, NOZOOM

setMouseControlDown

public void setMouseControlDown(int zoomAction)
Set the zoom action for the mouse down event with Control depressed.

If the value passed is not a valid zoom action an IllegalArgumentException will be thrown.

Parameters:
layout - One of ZOOMIN, ZOOMOUT, NOZOOM

getMouseControlDown

public int getMouseControlDown()
Get the zoom action for the mouse down event with Control depressed.

Returns:
layout. One of ZOOMIN, ZOOMOUT, NOZOOM

setZoomingEnabled

public void setZoomingEnabled(boolean enabled)
Enable or disable zooming.

Parameters:
enabled - True to allow zooming, false to disable it.

getZoomingEnabled

public boolean getZoomingEnabled()
Get whether zooming is enabled to not.

Returns:
True if zooming is enabled, false otherwise.

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

zoom

public void zoom(int x,
                 int y,
                 int w,
                 int h)
Zoom into the graph using a given rectangle.

Parameters:
x - The x coordinate
y - The y coordinate
width - The width
height - The height

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