Basic steps for using the Gantt chart and Schedule chart beans

The Gantt chart and Schedule chart beans provide two different views of a Gantt data model.

The basic steps needed to incorporate either chart into the code of your application are very similar:

  1. Stage 1 – Importing the Gantt chart packages: Import the necessary Gantt packages.

  2. Stage 2 – Creating the Gantt data model: Create a Gantt data model object by instantiating the interface IlvGanttModel and fill it with activities, constraints, resources, and reservations.

  3. Stage 3 – Creating the Gantt chart bean instance: Instantiate a Gantt chart bean from the IlvGanttChart class or a Schedule chart bean from the IlvScheduleChart class.

  4. Stage 4 – Binding the Gantt chart to the data model: Attach the data model to the chart instance.

  5. Stage 5 – Customizing the chart: Customize the default settings and appearance of the chart, if necessary.

  6. Stage 6 – Adding the Gantt chart to the user interface: Add the chart instance to the user interface of your application.

Two basic sample Java™ applications are provided to illustrate these steps. The first example demonstrates how to use the activity-oriented Gantt chart:

<installdir>/jviews-gantt/samples/ganttChart/src/ganttChart/GanttExample.java

The second example demonstrates how to use the resource-oriented Schedule chart:

<installdir>/jviews-gantt/samples/scheduleChart/src/scheduleChart/ScheduleExample.java.

Running the samples describes the common steps that are necessary to compile and run both applications and provides the sample code. You can use either of these applications as a starting point for your own work with JViews Gantt. In fact, these basic chart applications are used as the basis for many of the other examples supplied with JViews Gantt.