NetCharts Pro

netcharts.pro.event
Class NFChartActionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by netcharts.pro.event.NFChartActionEvent
All Implemented Interfaces:
java.io.Serializable

public class NFChartActionEvent
extends java.util.EventObject

NFChartActionEvents are dispatched to NFChartActionListeners as a result of a mouse dwell or mouse selection over a chart. The contents of an NFChartActionEvent describe the type of event and provide information on the chart item that was the target of the mouse activity.

See Also:
Serialized Form

Field Summary
static int DWELL
          The DWELL event type.
static int DWELLPRESS
          The DWELLPRESS event type.
static int GRAPHDRAWN
          The GRAPHDRAWN event type.
static int GRAPHTOOSMALL
          The GRAPHTOOSMALL event type.
static int POSTDRAG
          The POSTDRAG event type.
static int POSTSCROLL
          The POSTSCROLL event type.
static int PREDRAG
          The PREDRAG event type.
static int PRESCROLL
          The PRESCROLL event type.
 
Constructor Summary
NFChartActionEvent(java.lang.Object source, java.awt.Dimension size)
          Creates a NFChartActionEvent of type GRAPHTOOSMALL.
NFChartActionEvent(java.lang.Object source, double newX, double newY)
          Creates a NFChartActionEvent of type POSTDRAG.
NFChartActionEvent(java.lang.Object source, double scrollMin, double scrollMax, double curScaleMin, double curScaleMax, double newScaleMin, double newScaleMax)
          Creates a NFChartActionEvent of type PRESCROLL.
NFChartActionEvent(java.lang.Object source, java.awt.Graphics g)
          Creates a NFChartActionEvent of type GRAPHDRAWN.
NFChartActionEvent(java.lang.Object source, int et)
          Creates a base NFChartActionEvent.
NFChartActionEvent(java.lang.Object source, int et, double d1, double d2, double d3, double d4)
          Creates a NFChartActionEvent of type PREDRAG or POSTSCROLL.
NFChartActionEvent(java.lang.Object source, NFActiveLabel al, boolean onOff)
          Creates a NFChartActionEvent of type DWELL.
NFChartActionEvent(java.lang.Object source, NFActiveLabel al, java.awt.Event ge, int x, int y)
          Creates a NFChartActionEvent of type DWELLPRESS.
NFChartActionEvent(java.lang.Object source, NFActiveLabel al, int et)
          The constructor.
NFChartActionEvent(java.lang.Object source, NFActiveLabel al, int et, java.awt.Event ge)
          The constructor.
 
Method Summary
 NFActiveLabel getActiveLabelObject()
          Creates an active label object that contains the same information as that which generated this event.
 java.awt.Shape getBounds()
          Returns a Shape object that represents the area that was activated for this event.
 double getCurrentScaleMax()
          Returns the current maximum scale value.
 double getCurrentScaleMin()
          Returns the current minimum scale value.
 double getCurrentX()
          Returns the current X value of the drag operation.
 double getCurrentY()
          Returns the current Y value of the drag operation.
 java.awt.Graphics getGraphics()
          Returns the Graphics the graph was drawn on.
 java.awt.Event getGuiEvent()
          Gets the gui Event that triggered this chart action event.
 double getNewScaleMax()
          Returns the new maximum scale value.
 double getNewScaleMin()
          Returns the new minimum scale value.
 double getNewX()
          Returns the new X value of the drag operation.
 double getNewY()
          Returns the new Y value of the drag operation.
 boolean getOnOff()
          Returns whether the label is to be turned on or off.
 double getScaleMax()
          Returns the maximum scale value.
 double getScaleMin()
          Returns the minimum scale value.
 double getScrollMax()
          Returns the maximum scroll value.
 double getScrollMin()
          Returns the minimum scroll value.
 java.awt.Dimension getSize()
          Returns the size used to draw the chart if the size was too small.
 java.lang.String getTargetItem()
          Gets the name of the target item.
 int getTargetItemIndex()
          Gets the index of the item selected.
 int getType()
          Gets the event type.
 int getX()
          Returns the x coordinate of the event.
 int getY()
          Returns the y coordinate of the event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DWELL

public static int DWELL
The DWELL event type.


DWELLPRESS

public static int DWELLPRESS
The DWELLPRESS event type.


GRAPHDRAWN

public static int GRAPHDRAWN
The GRAPHDRAWN event type.


GRAPHTOOSMALL

public static int GRAPHTOOSMALL
The GRAPHTOOSMALL event type.


PREDRAG

public static int PREDRAG
The PREDRAG event type.


POSTDRAG

public static int POSTDRAG
The POSTDRAG event type.


PRESCROLL

public static int PRESCROLL
The PRESCROLL event type.


POSTSCROLL

public static int POSTSCROLL
The POSTSCROLL event type.

Constructor Detail

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          int et)
Creates a base NFChartActionEvent.

Parameters:
source - the object firing this event
et - the event type

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          NFActiveLabel al,
                          int et)
The constructor.

Parameters:
source - the object firing this event
al - the active labels
et - the event type

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          NFActiveLabel al,
                          int et,
                          java.awt.Event ge)
The constructor.

Parameters:
source - the object firing this event
al - the active labels
et - the event type
ge - the GUI event that triggered this event

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          NFActiveLabel al,
                          boolean onOff)
Creates a NFChartActionEvent of type DWELL.

Parameters:
source - the object firing this event
al - the active labels
onOff - whether the label is to be turned on or off.

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          NFActiveLabel al,
                          java.awt.Event ge,
                          int x,
                          int y)
Creates a NFChartActionEvent of type DWELLPRESS.

Parameters:
source - the object firing this event
al - the active labels
et - the event type
ge - the GUI event that triggered this event
x - the x coordinate of the event.
y - the y coordinate of the event.

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          java.awt.Dimension size)
Creates a NFChartActionEvent of type GRAPHTOOSMALL.

Parameters:
source - the object firing this event
size - the size used to draw the chart if the size was too small.

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          java.awt.Graphics g)
Creates a NFChartActionEvent of type GRAPHDRAWN.

Parameters:
source - the object firing this event
g - the Graphics the graph was drawn on.

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          int et,
                          double d1,
                          double d2,
                          double d3,
                          double d4)
Creates a NFChartActionEvent of type PREDRAG or POSTSCROLL.

Parameters:
source - the object firing this event
d1 - the current X value (PREDRAG) or scroll minimum (POSTSCROLL).
d2 - the current Y value (PREDRAG) or scroll maximum (POSTSCROLL).
d3 - the new X value (PREDRAG) or scale minimum (POSTSCROLL).
d4 - the new Y value (PREDRAG) or scale maximum (POSTSCROLL).

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          double newX,
                          double newY)
Creates a NFChartActionEvent of type POSTDRAG.

Parameters:
source - the object firing this event
newX - the new X value.
newY - the new Y value.

NFChartActionEvent

public NFChartActionEvent(java.lang.Object source,
                          double scrollMin,
                          double scrollMax,
                          double curScaleMin,
                          double curScaleMax,
                          double newScaleMin,
                          double newScaleMax)
Creates a NFChartActionEvent of type PRESCROLL.

Parameters:
source - the object firing this event
scrollMin - the scroll minimum.
scrollMax - the scroll maximum.
curScaleMin - the current minimum scroll value.
curScaleMax - the current maximum scroll value.
newScaleMin - the new minimum scroll value.
newScaleMax - the new maximum scroll value.
Method Detail

getType

public int getType()
Gets the event type.

Returns:
event type, either DWELL or DWELLPRESS

getGuiEvent

public java.awt.Event getGuiEvent()
Gets the gui Event that triggered this chart action event.


getTargetItemIndex

public int getTargetItemIndex()
Gets the index of the item selected. For example, this would return 3 when mouse activity ocurrs over the third slice of a piechart, the third bar on a bar chart, or the third element of a chart legend.

Returns:
the index of the item selected

getTargetItem

public java.lang.String getTargetItem()
Gets the name of the target item. For example, this would return "header" if the top title was selected, or "Slices" is a pie slice was selected.

Returns:
the index of the item selected

getActiveLabelObject

public NFActiveLabel getActiveLabelObject()
Creates an active label object that contains the same information as that which generated this event.

Returns:
the active label object or null if data was unavailable

getBounds

public java.awt.Shape getBounds()
Returns a Shape object that represents the area that was activated for this event.

Returns:
the bounds object or null if data was unavailable.

getSize

public java.awt.Dimension getSize()
Returns the size used to draw the chart if the size was too small. This object will be null unless a GRAPHTOOSMALL event is thrown.

Returns:
The size used in the attempt to draw the chart.

getGraphics

public java.awt.Graphics getGraphics()
Returns the Graphics the graph was drawn on. This object will be null unless a GRAPHDRAWN event is thrown.

Returns:
The Graphics the graph was drawn on.

getCurrentX

public double getCurrentX()
Returns the current X value of the drag operation. This object will be -1 unless a PREDRAG event is thrown.

Returns:
the current X value of the drag operation.

getCurrentY

public double getCurrentY()
Returns the current Y value of the drag operation. This object will be -1 unless a PREDRAG event is thrown.

Returns:
the current Y value of the drag operation.

getNewX

public double getNewX()
Returns the new X value of the drag operation. This object will be -1 unless a PREDRAG or POSTDRAG event is thrown.

Returns:
the new X value of the drag operation.

getNewY

public double getNewY()
Returns the new Y value of the drag operation. This object will be -1 unless a PREDRAG or POSTDRAG event is thrown.

Returns:
the new Y value of the drag operation.

getScrollMin

public double getScrollMin()
Returns the minimum scroll value. This object will be -1 unless a PRESCROLL or POSTSCROLL event is thrown.

Returns:
the minimum scroll value.

getScrollMax

public double getScrollMax()
Returns the maximum scroll value. This object will be -1 unless a PRESCROLL or POSTSCROLL event is thrown.

Returns:
the maximum scroll value.

getCurrentScaleMin

public double getCurrentScaleMin()
Returns the current minimum scale value. This object will be -1 unless a PRESCROLL event is thrown.

Returns:
the current minimum scale value.

getCurrentScaleMax

public double getCurrentScaleMax()
Returns the current maximum scale value. This object will be -1 unless a PRESCROLL event is thrown.

Returns:
the current maximum scale value.

getNewScaleMin

public double getNewScaleMin()
Returns the new minimum scale value. This object will be -1 unless a PRESCROLL event is thrown.

Returns:
the new minimum scale value.

getNewScaleMax

public double getNewScaleMax()
Returns the new maximum scale value. This object will be -1 unless a PRESCROLL event is thrown.

Returns:
the new maximum scale value.

getScaleMin

public double getScaleMin()
Returns the minimum scale value. This object will be -1 unless a POSTSCROLL event is thrown.

Returns:
the minimum scale value.

getScaleMax

public double getScaleMax()
Returns the maximum scale value. This object will be -1 unless a POSTSCROLL event is thrown.

Returns:
the maximum scale value.

getOnOff

public boolean getOnOff()
Returns whether the label is to be turned on or off. This object will be true unless a DWELL event is thrown.

Returns:
whether the label is to be turned on or off.

getX

public int getX()
Returns the x coordinate of the event. This value will be -1 unless a DWELLPRESS event is thrown.

Returns:
the x coordinate of the event.

getY

public int getY()
Returns the y coordinate of the event. This value will be -1 unless a DWELLPRESS event is thrown.

Returns:
the y coordinate of the event.

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