Perforce JViews Gantt Sample: Gantt Viewer
Description
This sample presents a Gantt project viewer developed with JViews Gantt and JViews Diagrammer components.
How to Use the Sample
-
The Calendar View shows the Monthly Calendar view,
IlvMonthView
component.- Use the vertical scrollbar or mouse wheel to change the month to be viewed.
- Drag an activity or a milestone in the calendar to update the start and end time. Durations cannot be updated in this view.
- Use the Control key to toggle selection and the Shift key to select multiple activities or milestones.
-
The Gantt View shows the activity-based Gantt chart,
IlvGanttChart
component.-
On the left, an
IlvJTable
object shows the activity properties. The first column of the table shows the hierarchy of activities in the form of a tree. If an activity has child activities, you can click the expand/collapse icon to expand or collapse it. The other columns are used to show more properties of the activities. -
On the right, the Gantt chart uses an
IlvGanttSheet
object to visualize the activities. Note that parent activities are rendered differently from child activities. - The time scale is displayed at the top of the Gantt sheet.
- 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.
-
On the left, an
-
The Resource Usage View shows the Schedule chart,
IlvScheduleChart
component synchronized with the Resource Data chart,IlvResourceDataChart
component.-
On the left, an
IlvJTable
object shows the resource properties (as the activities in the Gantt chart). -
On the right, the Gantt chart uses an
IlvGanttSheet
object to visualize the reservations. - The time scale is displayed at the top of the Gantt sheet.
-
The
IlvResourceDataChart
displays the workload for the selected resource below theIlvScheduleChart
. - Many operations on the Schedule chart apply to selected resources.
-
On the left, an
-
The Task Sheet shows only the
IlvJTable
object of theIlvGanttChart
component. -
The Resource Sheet shows only the
IlvJTable
object of theIlvScheduleChart
component. -
The PERT Diagram uses JViews Diagrammer to display the
activity graph of dependencies.
- Activities are represented as nodes and end-to-start constraints are represented as links.
- Three specific interactors are enabled when this view is displayed: the selection, the pan, and the magnify interactors.
- An overview is displayed during panning and scrolling when the sample is run as an application.
- There are two levels of detail: a low and a high. Switching between them is done automatically, depending on the current zoom level.
How to Run the Sample as an Application
This sample can
be run as an application.
The installation directory contains
an executable JAR file,
ganttviewer.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
-
Using the JViews Gantt Activity chart
IlvGanttChart
component. -
Using the JViews Gantt Schedule chart
IlvScheduleChart
and theIlvResourceDataChart
components. -
Visualizing the Gantt data model by using the Monthly Calendar view
IlvMonthView
component. - Using JViews Diagrammer symbols, graph layouts, and SDM.
Detailed Description
This sample presents different components in action, including the activity-based Gantt chart, the Resource Data chart, which displays the loading on resources selected in the Schedule chart, and the Monthly Calendar view. If JViews Diagrammer is installed, the sample also demonstrates a PERT chart.
Installation Directory
The Gantt Viewer sample is installed here.
Classes Involved
- ilog.views.gantt.IlvGanttChart
- ilog.views.gantt.IlvScheduleChart
- ilog.views.schedule.IlvResourceDataChart
- ilog.views.gantt.swing.calendarview.IlvMonthView
Source Files
-
ganttviewer.GanttViewer
The main class of the sample.
-
ganttviewer.viewer.Viewer
The viewer object developed in the frame of this sample.
-
ganttviewer.views.GanttView
The Gantt View.
-
ganttviewer.views.ResourceUsageView
The Resource Usage View.
-
ganttviewer.views.MonthlyCalendarView
The Calendar View.
-
ganttviewer.views.GanttTableView
The sheet used by the Task Sheet and the Resource Sheet views.
-
ganttviewer.views.PERTView
The PERT Diagram view.
-
ganttviewer.pert.PERTDiagramImpl
The PERT Diagram implementation. (JViews Diagrammer is required.)