Chapter 2.
Start-Up


REQUIRED FILES

 

In order to use the Perspective for Java Editor, you will need the following files:

 

A full Perspective for Java .JAR file (i.e., PFJFULL.JAR)

 

PFJ_GIFS.ZIP

 

PFJ_TILES.ZIP

 

TDGSecurity.class

 

NOTE: The TDGSecurity.class file contains your personal registration number for using Perspective for Java. This file is not necessary if you are using Perspective for Java for demonstration/evaluation purposes. It is only necessary to eliminate the license-warning screen when you execute the compiled application.

 

These files are available via the 3D web page at http://www.threedgraphics.com. See the Perspective for Java Programmer's Manual for the procedures required to download the files and to include the TDGSecurity.Class file in your .JAR file (if necessary).

FILE LOCATIONS

 

To create a full system on a local machine, install the files as follows:

 

1.

Create a directory on your hard disk.

 

2.

Copy the Perspective for Java .JAR file into the directory.

 

3.

Unzip the PFJ_GIFS.ZIP files into the same directory. The extracted files must reside in the same directory as the .JAR file.

 

4.

Create a "tiles" subdirectory. Unzip the PFJ_TILE.ZIP file into the "tiles" subdirectory.

START-UP

 

The start-up procedures for running the Perspective for Java Editor are slightly different depending on the operating environment in which the editor is being used.

For DOS/Windows 95

 

To run the editor as its own application with the JVIEW program, do the following:

 

1.

Open an MS DOS Prompt window.

 

2.

Change the directory to the directory where the Perspective .JAR file and .GIF files are stored.

 

3.

Use the following command to activate the editor:

 

JVIEW /cp:p "PFJFULL.JAR" TDGLoadSave<Enter>

 

The editor start-up screen will be displayed in the format shown below. (See "Start-Up Screen".

 

To run the editor as its own application with the JAVA program, do the following:

 

1.

Open an MS DOS Prompt window.

 

2.

Change the directory to the directory where the Perspective .JAR file and .GIF files are stored.

 

3.

Extract the individual class files from the .JAR file using the following command:

 

JAR XVF PFJFULL.JAR<Enter>

 

4.

When all class file have been extracted, execute the TDGLoadSave application with the following command:

 

JAVA TDGLoadSave<Enter>

 

The editor start-up screen will be displayed in the format shown below. (See "Start-Up Screen".

 

To run the editor as an applet, include the following statement in your HTML:

 

<APPLET CODE="TDGChartEditorApplet.class" width="700" height="500" archive="PFJFULL.jar">

 

Note that "width" and "height" values shown here are typical and may be different for your application.

 

Use the <PARAM name....> string to define a starting chart type and any values you want to initially apply to the chart. Example:

 

<PARAM name=TDGSCRIPT value='
setGraphType(21); /* set graph type */
setTitleString("Wilde Java Jon!");/* set title string */
setSeriesLabelArray("Retail Cost", "Dealer Cost",
"Seats"); /* set series labels */
setDataSeries(45319.00, 5610.00, 51065.00, 6478.00,
64732.00); /* Set Data Series 0 */
setDataSeries(37853.00, 4631.00, 41235.00, 5512.00,
54563.00); /* Set Data Series 1 */
setDataSeries(15.00, 5.00, 10.00, 8.00,
34.00); /* Set Data Series 2 */
setGroupLabelArray("England", "France", "Italy",
"Japan", "W Germany"); /*set group labels*/
setFootnoteString("A Very Good Footnote");
setAxisAssignment(0, 0); /* put series 0 on Y1 */
setAxisAssignment(1, 0); /* put series 1 on Y1 */
setAxisAssignment(2, 1); /* put series 2 on Y2 */
'>

 

If this information is not included, the chart editing area of the screen will be blank.

For UNIX

 

To run the editor in a UNIX environment, do the following:

 

1.

Use any UNIX application, such as JAR.EXE from Sun, to extract the .CLASS files that are archived in the Perspective for Java .JAR file. Make sure you extract them from the .JAR file in the same directory/path where the .JAR file resides.

 

2.

At the command prompt in the directory/path where the .CLASS and .JAR files resides, type the following:

 

java TDGLoadSave.class

 

Because UNIX is case-sensative, the upper/lower case combination of letters in "TDGLoadSave" is very important. The application will not be found if this exact sequence is not used.

START-UP SCREEN

 

Following successful start-up using the Windows 95 or Unix procedures described above, the following message is displayed if the TDGSecurity.Class file is not included in the .JAR file:

 

Select the "Click Here to Continue" button to display the Editor main window.

MAIN WINDOW

 

This is the editor main window. It is the area in which the editor menu is displayed and where the chart is modified to reflect the chart properties that you select in the editor menu:

 

This window contains two menus: 1) a File menu at the upper left corner of the window and 2) the Editor menu that is displayed by selecting the tab in the upper right corner of the window.

 

Click the arrow button in the upper right corner of the window to display the Editor Menu. The editor window will be adjusted to include the chart and the editor menu as shown in the following illustration.

 

In addition to the chart that is being created/edited, the editor window consists of these sections:

 

The Editor Menu

 

The File Menu

 

Message Area

Editor Menu

 

When you click the arrow button in the upper right corner of the window, the Editor Menu is displayed.

 

 

The content of the editing menu will be different depending on the graph type that is selected in the Graph Type menu dialogs.

 

Chapter 3 describes the menu items that are available for all graph types.

 

Chapter 4 describes the menu items that are specific to certain graph types (i.e., 3D, Scatter, Stock, Pie, etc.)

 

When you select an item in the menu, a dialog box displays a list of parameters that you can apply to the chart. For example, the following dialog box is displayed when the Bar, Line, Area Chart Settings menu item is displayed.

 

 

Select chart parameters in the dialog box. Some parameters such as graph types are automatically applied when you select the chart parameters. Most dialog boxes include the Apply button. After you select chart parameters, the Apply button is required to assign the selected parameters to the chart.

Scroll Bars

 

Some menu selections may cause the dialog box to extend beyond the available display space. When this is the case up-arrow and down-arrow scroll bars will be displayed at the upper and lower edge of the menu.

 

Up Arrow Scroll Bar

 

 

Down Arrow Scroll Bar

 

 

Use your mouse pointer and the primary mouse button to reposition the dialog box up or down within the available display space.

File Menu

 

When you want to load or save a chart in the editor window. Select the File Menu in the menu bar at the top of the editor window. The File Menu is displayed in the following format:

 

 

See Chapter 5 for additional information about loading and saving files in the various formats that are supported by the Perspective for Java Editor.

Message Area

 

The message area is located just below the chart display as shown in the following illustration:

 

The following information may be displayed in this area of the window:

 

Error messages

 

Selected Properties that are different from default values

 

Chart editing strings

 

If you select chart parameters in the editor dialogs that are outside the range of valid values for a particular setting, the message area will display a message indicating the error condition.

 

When the "Output Properties as Different from Defaults..." option is selected in the File Menu, the message area will display any chart property that is selected in the editor dialogs that are different from the chart default settings.

 

You may also type chart properties and methods in the message area and assign them to the chart that is being edited. Simply clear (highlight and delete) any information that is currently displayed in the window, type any new parameters that you want to assign to the chart, and select the "Input Param Strings from Message Window" in the File menu. See Chapter 5 for details.