Perforce JViews Framework Code Example: Getting Started Step 4
Description
This is the fourth sample that helps getting started with the essential JViews Framework.
How to Use the Code Example
- This sample belongs to a sequence of samples that help getting started with the essential JViews Framework. The samples work as a mini tutorial. Each sample builds on the previous sample and extends it with new functionality.
- The sample allocates a manager, loads a file into the manager, and displays it in a manager view.
- It adds additional objects to the manager by code.
- It creates a toggle button that allows to enable the select interactor to select objects in the view.
- It creates toggle buttons that allow to enable interactors for zooming in and out. Once these interactors are enabled, they let you drag a rectangle over the view to zoom in our out on this rectangle.
- It creates a toggle button that allows to enable an interactor for moving previously selected objects.
- when moving an object on Linux, the drawing process generates an exception which is due to a known JDK 8+ Bug: JDK-8068291
How to Run the Code Example as an Application
This code example can
be run as an application.
The installation directory contains
an executable JAR file,
fwgetstart4.jar
,
that allows you to execute the code example 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 code example 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 code example and type:
ant run
Topics Covered
- Getting started with the essential JViews Framework
Installation Directory
The Getting Started Step 4 code example is installed here.
Classes Involved
- ilog.views.IlvManager
- ilog.views.IlvManagerView
- ilog.views.IlvManagerViewInteractor
- ilog.views.IlvGraphic
- ilog.views.IlvGraphicEnumeration
- ilog.views.interactor.IlvSelectInteractor
- ilog.views.interactor.IlvZoomViewInteractor
- ilog.views.interactor.IlvUnZoomViewInteractor
- ilog.views.event.InteractorListener
- ilog.views.graphic.IlvIcon