Perforce JViews Gantt Sample: Activity Chart (SDK)


Description

This sample shows a simple project scheduling application displayed as an activity-oriented Gantt Chart.

How to Use the Sample

How to Run the Sample as an Application

This sample can be run as an application. The installation directory contains an executable JAR file, gantt-chart.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

Detailed Description

This sample shows a simple project scheduling application displayed as an activity-oriented Gantt Chart.

Selecting Activities

Many operations on the Gantt Chart apply to selected activities. The activities can be selected either in the activity table or in the Gantt sheet.

Editing Activity Properties with the Activity Table

The activity table is fully editable. You can change the properties of an activity by editing the table cells from your keyboard. If you change the start time or the end time of an activity, the change is immediately reflected in the Gantt sheet.

Interacting with the Gantt Sheet

You can have the following interactions with the Gantt sheet:

Zooming and Scrolling in the Time Scale

You can zoom and scroll in the time scale:

Scrolling in the Table

You can use the up and down arrow keys, or the page up and page down keys, to scroll the table up and down.

Editing Activities

Creating and Deleting Activities

To create a new activity:

  1. Select an existing activity to indicate where the activity should be created.
  2. Choose "Insert activity" from the "Edit" menu.

To delete an existing activity:

  1. Select the activity to be deleted.
  2. Choose "Delete activity" from the "Edit" menu.

Moving an Activity in the Table

To change the hierarchical position of an activity:

  1. Select the activity.
  2. Choose "Indent activity", "Outdent activity", "Move up", or "Move down" from the "Edit" menu.

Creating and Deleting Constraints

To create a constraint:

  1. Select the "Create constraint" command from the "Edit" menu.
  2. Click in the Gantt sheet on the activity graphic from which you want to create a constraint (source, or From, activity).
  3. Click on the activity graphic to which you want to create a constraint (target, or To, activity).

You will notice that you can create different types of constraint depending on whether you click on the start or on the end of the From or To activity graphics.

Changing the Row Height of the Gantt Chart

The Gantt chart consists of activity rows. The height of the rows can be changed. The "Row" menu lists two commands that allow you to increase or decrease the row height of the Gantt chart.

Installation Directory

The Activity Chart (SDK) sample is installed here.

Classes Involved

Source Files

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All rights reserved. Legal terms.