An interactive chart which provides the following abilities. More...
Public Member Functions | |
InteractiveChart (Composite parent, int style) | |
Constructor. | |
void | paintControl (PaintEvent e) |
void | handleEvent (Event event) |
void | dispose () |
Protected Member Functions | |
void | resetSelection () |
Protected Attributes | |
SelectionRectangle | selection |
the selection rectangle for zoom in/out | |
Private Member Functions | |
void | init () |
Initializes. | |
void | createMenuItems () |
Creates menu items. | |
void | handleMouseMoveEvent (Event event) |
Handles mouse move event. | |
void | handleMouseDownEvent (Event event) |
Handles the mouse down event. | |
void | handleMouseUpEvent (Event event) |
Handles the mouse up event. | |
void | handleMouseWheel (Event event) |
Handles mouse wheel event. | |
void | handleKeyDownEvent (Event event) |
Handles the key down event. | |
IAxis[] | getAxes (int orientation) |
Gets the axes for given orientation. | |
void | handleSelectionEvent (Event event) |
Handles the selection event. | |
void | openSaveAsDialog () |
Opens the Save As dialog. | |
void | openPropertiesDialog () |
Opens the properties dialog. | |
void | setRange (Point range, IAxis axis) |
Sets the axis range. | |
Private Attributes | |
long | clickedTime |
the clicked time in milliseconds | |
PropertiesResources | resources |
the resources created with properties dialog | |
Static Private Attributes | |
static final String[] | EXTENSIONS |
the filter extensions |
An interactive chart which provides the following abilities.
Definition at line 39 of file InteractiveChart.java.
org.swtchart.ext.InteractiveChart.InteractiveChart | ( | Composite | parent, | |
int | style | |||
) |
Constructor.
parent | the parent composite | |
style | the style |
Definition at line 62 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.init().
void org.swtchart.ext.InteractiveChart.createMenuItems | ( | ) | [private] |
Creates menu items.
Definition at line 94 of file InteractiveChart.java.
References org.swtchart.Chart.getPlotArea().
Referenced by org.swtchart.ext.InteractiveChart.init().
void org.swtchart.ext.InteractiveChart.dispose | ( | ) |
Reimplemented from org.swtchart.Chart.
Definition at line 220 of file InteractiveChart.java.
References org.swtchart.ext.internal.properties.PropertiesResources.dispose(), and org.swtchart.ext.InteractiveChart.resources.
IAxis [] org.swtchart.ext.InteractiveChart.getAxes | ( | int | orientation | ) | [private] |
Gets the axes for given orientation.
orientation | the orientation |
Definition at line 350 of file InteractiveChart.java.
References org.swtchart.Chart.getAxisSet(), org.swtchart.Chart.getOrientation(), org.swtchart.IAxisSet.getXAxes(), and org.swtchart.IAxisSet.getYAxes().
Referenced by org.swtchart.ext.InteractiveChart.handleKeyDownEvent(), and org.swtchart.ext.InteractiveChart.handleMouseWheel().
void org.swtchart.ext.InteractiveChart.handleEvent | ( | Event | event | ) |
Reimplemented from org.swtchart.Chart.
Definition at line 189 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.handleKeyDownEvent(), org.swtchart.ext.InteractiveChart.handleMouseDownEvent(), org.swtchart.ext.InteractiveChart.handleMouseMoveEvent(), org.swtchart.ext.InteractiveChart.handleMouseUpEvent(), org.swtchart.ext.InteractiveChart.handleMouseWheel(), and org.swtchart.ext.InteractiveChart.handleSelectionEvent().
void org.swtchart.ext.InteractiveChart.handleKeyDownEvent | ( | Event | event | ) | [private] |
Handles the key down event.
event | the key down event |
Definition at line 311 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.getAxes(), org.swtchart.Chart.getAxisSet(), org.swtchart.Chart.redraw(), org.swtchart.IAxisSet.zoomIn(), and org.swtchart.IAxisSet.zoomOut().
Referenced by org.swtchart.ext.InteractiveChart.handleEvent().
void org.swtchart.ext.InteractiveChart.handleMouseDownEvent | ( | Event | event | ) | [private] |
Handles the mouse down event.
event | the mouse down event |
Definition at line 244 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.clickedTime, org.swtchart.ext.InteractiveChart.selection, and org.swtchart.ext.internal.SelectionRectangle.setStartPoint().
Referenced by org.swtchart.ext.InteractiveChart.handleEvent().
void org.swtchart.ext.InteractiveChart.handleMouseMoveEvent | ( | Event | event | ) | [private] |
Handles mouse move event.
event | the mouse move event |
Definition at line 231 of file InteractiveChart.java.
References org.swtchart.ext.internal.SelectionRectangle.isDisposed(), org.swtchart.Chart.redraw(), org.swtchart.ext.InteractiveChart.selection, and org.swtchart.ext.internal.SelectionRectangle.setEndPoint().
Referenced by org.swtchart.ext.InteractiveChart.handleEvent().
void org.swtchart.ext.InteractiveChart.handleMouseUpEvent | ( | Event | event | ) | [private] |
Handles the mouse up event.
event | the mouse up event |
Definition at line 257 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.clickedTime, org.swtchart.ext.internal.SelectionRectangle.dispose(), org.swtchart.IAxisSet.getAxes(), org.swtchart.Chart.getAxisSet(), org.swtchart.ext.internal.SelectionRectangle.getHorizontalRange(), org.swtchart.Chart.getOrientation(), org.swtchart.ext.internal.SelectionRectangle.getVerticalRange(), org.swtchart.Chart.redraw(), org.swtchart.ext.InteractiveChart.selection, and org.swtchart.ext.InteractiveChart.setRange().
Referenced by org.swtchart.ext.InteractiveChart.handleEvent().
void org.swtchart.ext.InteractiveChart.handleMouseWheel | ( | Event | event | ) | [private] |
Handles mouse wheel event.
event | the mouse wheel event |
Definition at line 284 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.getAxes(), and org.swtchart.Chart.redraw().
Referenced by org.swtchart.ext.InteractiveChart.handleEvent().
void org.swtchart.ext.InteractiveChart.handleSelectionEvent | ( | Event | event | ) | [private] |
Handles the selection event.
event | the event |
Definition at line 366 of file InteractiveChart.java.
References org.swtchart.IAxisSet.adjustRange(), org.swtchart.Chart.getAxisSet(), org.swtchart.IAxisSet.getXAxes(), org.swtchart.IAxisSet.getYAxes(), org.swtchart.ext.InteractiveChart.openPropertiesDialog(), org.swtchart.ext.InteractiveChart.openSaveAsDialog(), org.swtchart.Chart.redraw(), org.swtchart.IAxisSet.zoomIn(), and org.swtchart.IAxisSet.zoomOut().
Referenced by org.swtchart.ext.InteractiveChart.handleEvent().
void org.swtchart.ext.InteractiveChart.init | ( | ) | [private] |
Initializes.
Definition at line 74 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.createMenuItems(), org.swtchart.Chart.getPlotArea(), org.swtchart.ext.InteractiveChart.resources, and org.swtchart.ext.InteractiveChart.selection.
Referenced by org.swtchart.ext.InteractiveChart.InteractiveChart().
void org.swtchart.ext.InteractiveChart.openPropertiesDialog | ( | ) | [private] |
Opens the properties dialog.
Definition at line 441 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.resources.
Referenced by org.swtchart.ext.InteractiveChart.handleSelectionEvent().
void org.swtchart.ext.InteractiveChart.openSaveAsDialog | ( | ) | [private] |
Opens the Save As dialog.
Definition at line 414 of file InteractiveChart.java.
References org.swtchart.ext.InteractiveChart.EXTENSIONS, and org.swtchart.Chart.save().
Referenced by org.swtchart.ext.InteractiveChart.handleSelectionEvent().
void org.swtchart.ext.InteractiveChart.paintControl | ( | PaintEvent | e | ) |
Definition at line 181 of file InteractiveChart.java.
References org.swtchart.ext.internal.SelectionRectangle.draw(), and org.swtchart.ext.InteractiveChart.selection.
void org.swtchart.ext.InteractiveChart.resetSelection | ( | ) | [protected] |
Definition at line 67 of file InteractiveChart.java.
References org.swtchart.ext.internal.SelectionRectangle.dispose(), and org.swtchart.ext.InteractiveChart.selection.
void org.swtchart.ext.InteractiveChart.setRange | ( | Point | range, | |
IAxis | axis | |||
) | [private] |
Sets the axis range.
range | the axis range in pixels | |
axis | the axis to set range |
Definition at line 513 of file InteractiveChart.java.
References org.swtchart.IAxis.getDataCoordinate(), and org.swtchart.IAxis.setRange().
Referenced by org.swtchart.ext.InteractiveChart.handleMouseUpEvent().
long org.swtchart.ext.InteractiveChart.clickedTime [private] |
the clicked time in milliseconds
Definition at line 49 of file InteractiveChart.java.
Referenced by org.swtchart.ext.InteractiveChart.handleMouseDownEvent(), and org.swtchart.ext.InteractiveChart.handleMouseUpEvent().
final String [] org.swtchart.ext.InteractiveChart.EXTENSIONS [static, private] |
new String[] { "*.jpeg", "*.jpg", "*.png" }
the filter extensions
Definition at line 42 of file InteractiveChart.java.
Referenced by org.swtchart.ext.InteractiveChart.openSaveAsDialog().
the resources created with properties dialog
Definition at line 52 of file InteractiveChart.java.
Referenced by org.swtchart.ext.InteractiveChart.dispose(), org.swtchart.ext.InteractiveChart.init(), and org.swtchart.ext.InteractiveChart.openPropertiesDialog().
the selection rectangle for zoom in/out
Definition at line 46 of file InteractiveChart.java.
Referenced by org.swtchart.ext.InteractiveChart.handleMouseDownEvent(), org.swtchart.ext.InteractiveChart.handleMouseMoveEvent(), org.swtchart.ext.InteractiveChart.handleMouseUpEvent(), org.swtchart.ext.InteractiveChart.init(), org.swtchart.ext.InteractiveChart.paintControl(), and org.swtchart.ext.InteractiveChart.resetSelection().