com.jinsight.jetchart
Class ZoomEvent
java.lang.Object
|
+--java.util.EventObject
|
+--com.jinsight.jetchart.ZoomEvent
- All Implemented Interfaces:
- java.io.Serializable
- public class ZoomEvent
- extends java.util.EventObject
A zoom event takes place when chart is zoomed-in or zoomed-out. A zoom event object
is created whenever chart is zoomed, and is dispatched to objects that implement the
ZoomListener interface.
A ZoomEvent object encapsulates information about the chart context which generated the zoom
event, the value of the leftmost or topmost data point of the selected area(according
to chart orientation), the number of data points selected to be zoomed,
the maximum number of data points available and the zoom gesture type.
Zoom events are usually dispatched to listeners that implement chart scrolling. For
instance, the values fetched from a ZoomEvent object can be assigned to properties of a
scrolling bar component, allowing for chart scrolling after a zoom-in gesture.
- See Also:
ZoomListener
,
Graph.setDataSetRange(int, int)
, Serialized Form
Field Summary |
static int |
ZOOM_IN
Constant used to identify a zoom-in event. |
static int |
ZOOM_OUT
Constant used to identify a zoom-out event. |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
ZoomEvent(Graph graph,
int value,
int visibleAmount,
int maximum,
int zoomType)
ZoomEvent class constructor. |
Method Summary |
protected void |
finalize()
|
Graph |
getGraph()
Returns a reference to the chart context where the zoom event took place. |
int |
getMaximum()
Returns the maximum number of data points plotted across the chart area. |
int |
getValue()
Returns the value of the leftmost or topmost data point selected, in vertical
or horizontal charts, respectively. |
int |
getVisibleAmount()
Returns the number of data points selected. |
int |
getZoomType()
Returns the zoom gesture type. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ZOOM_IN
public static final int ZOOM_IN
- Constant used to identify a zoom-in event.
ZOOM_OUT
public static final int ZOOM_OUT
- Constant used to identify a zoom-out event.
ZoomEvent
public ZoomEvent(Graph graph,
int value,
int visibleAmount,
int maximum,
int zoomType)
- ZoomEvent class constructor.
- Parameters:
graph
- The chart context where the zoom event took place.value
- The value of the leftmost or topmost data point selected, in vertical
or horizontal charts, respectively.visibleAmount
- The number of data points selected to be zoomed.maximum
- The maximum number of data points plotted across the chart area.zoomType
- The zoom gesture type(zoom-in or zoom-out).- See Also:
Graph
,
ZOOM_IN
,
ZOOM_OUT
getGraph
public Graph getGraph()
- Returns a reference to the chart context where the zoom event took place.
- Returns:
- A Graph object.
- See Also:
Graph
getValue
public int getValue()
- Returns the value of the leftmost or topmost data point selected, in vertical
or horizontal charts, respectively.
- Returns:
- An integer value.
getVisibleAmount
public int getVisibleAmount()
- Returns the number of data points selected.
- Returns:
- An integer value.
getMaximum
public int getMaximum()
- Returns the maximum number of data points plotted across the chart area.
- Returns:
- An integer value.
getZoomType
public int getZoomType()
- Returns the zoom gesture type.
- Returns:
- An integer value.
- See Also:
ZOOM_IN
,
ZOOM_OUT
finalize
protected void finalize()
throws java.lang.Throwable
- Overrides:
finalize
in class java.lang.Object