Perforce JViews Charts Sample: Interactors
Description
This sample shows the interactors that are built-in in Perforce JViews Charts. It also contains their source code.
How to Use the Sample
- Choose an interactor from the combo box.
- Follow the instructions given in the status bar to exercise the interactor.
- Load a different JViews Charts project to observe how the interactors operate on your own data.
How to Run the Sample as an Application
This sample can
be run as an application.
The installation directory contains
an executable JAR file,
interactor.jar
,
that allows you to execute the sample with a double click from a
file browser. Note that if you are using Internet Explorer, you can
open the installation directory
and execute the JAR file from the browser. This
technique may not work in other Web browsers.
Alternatively, you
can run the sample application from the command line.
First check that the Ant utility is properly configured. If not, see the
instructions on how to configure Ant for Perforce JViews.
Then, go to the installation directory
of the sample and type:
ant run
Topics Covered
- Parametrizing interactors.
- Subclassing interactors.
Detailed Description
This sample shows how to customize and install interactors on a chart. An interactor is an object that reacts on particular input events (mouse or keyboard events) and performs some action depending on the events. For some interactors the input events can be specified, for example which mouse button is tracked. Some interactors perform hardcoded actions; others simply notify an event listener that is freely programmable.
Interactors often need to be customized by subclassing. For example, the
chartConnected
method needs to be overridden when you want
some actions to be performed when the interactor is being connected to
or detached from a chart. This sample shows some use cases.
This sample also contains the source code of the Perforce JViews Charts
built-in interactors. It allows you to better understand the information
flow inside an interactor and to significantly extend these interactors.
The source code in this sample belongs to the package
interactor
, while the Perforce JViews Charts interactors are in
the package ilog.views.chart.interactor
. This allows you to
make modifications to the interactors and test them immediately, without
risking to disturb the functioning of the Perforce products.
Installation Directory
The Interactors sample is installed here.
Classes Involved
- ilog.views.chart.IlvChartInteractor
- ilog.views.chart.interactor.IlvChart3DViewInteractor
- ilog.views.chart.interactor.IlvChartActionInteractor
- ilog.views.chart.interactor.IlvChartDataIndicatorInteractor
- ilog.views.chart.interactor.IlvChartDataInteractor
- ilog.views.chart.interactor.IlvChartEditPointInteractor
- ilog.views.chart.interactor.IlvChartHighlightInteractor
- ilog.views.chart.interactor.IlvChartInfoViewInteractor
- ilog.views.chart.interactor.IlvChartLocalPanInteractor
- ilog.views.chart.interactor.IlvChartLocalReshapeInteractor
- ilog.views.chart.interactor.IlvChartLocalZoomInteractor
- ilog.views.chart.interactor.IlvChartPanInteractor
- ilog.views.chart.interactor.IlvChartPickInteractor
- ilog.views.chart.interactor.IlvChartScrollInteractor
- ilog.views.chart.interactor.IlvChartXScrollInteractor
- ilog.views.chart.interactor.IlvChartYScrollInteractor
- ilog.views.chart.interactor.IlvChartZoomInteractor
- ilog.views.chart.interactor.IlvTreemapChartFocusInteractor
Source Files
- interactor.InteractorDemo
- interactor.IlvChart3DViewInteractor
- interactor.IlvChartActionInteractor
- interactor.IlvChartDataIndicatorInteractor
- interactor.IlvChartDataInteractor
- interactor.IlvChartEditPointInteractor
- interactor.IlvChartHighlightInteractor
- interactor.IlvChartInfoViewInteractor
- interactor.IlvChartLocalPanInteractor
- interactor.IlvChartLocalReshapeInteractor
- interactor.IlvChartLocalZoomInteractor
- interactor.IlvChartPanInteractor
- interactor.IlvChartPickInteractor
- interactor.IlvChartScrollInteractor
- interactor.IlvChartXScrollInteractor
- interactor.IlvChartYScrollInteractor
- interactor.IlvChartZoomInteractor
- interactor.IlvTreemapChartFocusInteractor