skip to main content
Gantt > Getting started > Introducing JViews Gantt > Basic concepts > Data
 
Data
Describes the JViews Gantt data model.
*Overview
*Describes how a model-view architecture is used to define JViews Gantt.
*Activities
*Defines activities in the data model.
*Resources
*Defines resources in the data model.
*Constraints
*Defines constraints in the data model.
*Reservations
*Defines reservations in the data model.
Overview
JViews Gantt is based on a model-view architecture that cleanly separates the data, the display, and the interaction facets of the component. It follows the Swing architecture where the developer takes care of populating the data model and the component takes care of displaying the data and enabling interactions like selection and editing.
The following figure shows the model-view architecture of JViews Gantt.
In JViews Gantt, the data model is an interface that manages activities, resources, constraints, and reservations. These objects have a set of generic properties and user-defined properties can be added to store application-dependent information. Based on this data model, JViews Gantt knows how to display the chart and how to manage end-user interactions.
The data model needs to be populated with application data. To do this, you have the choice between using a prebuilt implementation such as the in-memory data model or connecting the chart directly to your data by implementing the data model interface. The latter solution avoids data duplication and enables finer synchronization between the chart and the data.
JViews Gantt provides data sources to populate your diagram from XML files, JDBC connections, or flat files in formats like CSV (comma-separated values).
The objects that make it possible to integrate your data into the time and activity bar charts provided by JViews Gantt are activities and resources. Dependencies between activities are shown through constraints. Resources are assigned to activities through reservations.
Activities
Defines activities in the data model.
An activity is a task to be completed. Activities are hierarchical in nature. This means that a main activity, called parent activity, can be broken down into subactivities. A subactivity, or child activity, can in turn be a parent activity of other subactivities or, if it is at the very end of a branch of the hierarchy, it is a leaf activity. A leaf activity is an activity that has no child activity.
In addition to its name and identifier, an activity is defined by its start time and end time, which determine an interval called the duration of the activity. If the start and end times are identical, the duration is equal to 0. A zero-duration activity is commonly called a milestone. Typically, milestones are not rendered by the same renderer as activities with a non-zero duration.
Resources
A resource is a means by which an activity can be completed. Resources can be persons, premises, equipment, and so forth. Like activities, resources are also hierarchical in nature.
If resources are people, the parent resource is a department while the child resources are the individual employees. Likewise, you may want to group resources by physical location or by type of machinery.
Constraints
A constraint is a type of condition set between two activities. Constraints are represented by arrowed polyline links.
Constraints can have one of the following types:
*start to start
*start to end
*end to start
*end to end
The source activity—that is, the activity whose start or end controls the start or end of another activity—is called the From activity. Conversely, the target activity—that is, the activity whose start or end depends on the start or end of another activity—is called the To activity.
Reservations
When a resource is assigned to an activity, this assignment is called a reservation. In the terminology of JViews Gantt, a reservation represents the assignment of one resource to one activity.
An activity can have multiple resources reserved and similarly, a resource can be reserved for more than one activity. The activity that reserves the resource cannot be changed after the reservation is created.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.