<GANTT> : GANTT planning

Java class : leon.view.LyGantt

ROLE

A Gantt planning is a graphical component that generally allows representing the planning of a project by visualizing the different tasks that compose it. It is constituted by two distinct parts: a planning on the right and a tree view on the left. To each node of the tree corresponds a representation on the planning, horizontally aligned with this node (the node and its representation make what we will call a line). This representation may be a segment, a filled rectangle or a point.
A Gantt planning has a begin date and an end date that represent the limits of the visible part of the planning. The full size of the planning is automatically computed with the dates of the intervals. It also has a date format used to represent the dates of the intervals and a zoom factor indicating the steps of the vertical grid of the planning (months, weeks, days, hours or minutes).
The tree view allows visualizing the different lines with the capacity of hiding or showing the sub-lines. Each node of the tree has a label, an image, a background color, a foreground color and a font.
The planning allows visualizing the time intervals associated to the nodes of the tree. If a line contains intervals it is represented in the planning by points or filled rectangles (depending on the begin and end dates). If a line contains sub-lines it is represented by a segment starting from the minimum date of its sub-intervals and going to the maximum date of its sub-intervals.
It is also possible to indicate particular days that must appear with a color on the planning. Those days may be of three types: days of week (for example Saturday and Sunday), days of year (for example May the 1st) and special days (for example 24th December 2006).
Remark: a generic Application Engine action « _gantt » is added with its controller, builder and behavior.

ATTRIBUTES

<!ATTLIST GANTT
	  id ID #IMPLIED
	  template NMTOKEN #IMPLIED
	  controller CDATA #IMPLIED
	  beginDate CDATA #IMPLIED
	  endDate CDATA #IMPLIED
	  dateFormat CDATA #IMPLIED
	  timeFormat CDATA #IMPLIED
	  zoomFactor ( MONTH_DAY | WEEK_DAY | DAY_MIDDAY | DAY_2HOURS | DAY_HOUR | HOUR_15MINUTES | HOUR_5MINUTES) "MONTH_DAY"
	  currentDateRefreshPeriod NMTOKEN "1"
	  allowElementHiding ( true | false) "false"
	  allowIntervalDivision ( true | false) "false"
	  allowSplit ( true | false) "false"
	  displayTimeSelector ( true | false) "false"
	  hCenteredLine CDATA #IMPLIED
	  vCenteredLine CDATA #IMPLIED
	  dateSelectorBean CDATA #IMPLIED
	  backgroundColor CDATA #IMPLIED
	  treeBackgroundColor CDATA #IMPLIED
	  font CDATA #IMPLIED
	  fontColor CDATA #IMPLIED
	  toolTipFont CDATA #IMPLIED
	  toolTipFontColor CDATA #IMPLIED
	  toolTipBackgroundColor CDATA #IMPLIED
	  upperScaleFont CDATA #IMPLIED
	  planningBackgroundColor CDATA #IMPLIED
	  scaleBackgroundColor CDATA #IMPLIED
	  scaleLinesColor CDATA #IMPLIED
	  linesColor CDATA #IMPLIED
	  weekendColor CDATA #IMPLIED
	  inputFont CDATA #IMPLIED
	  inputBigDownArrowImage CDATA #IMPLIED
	  inputArrowUpImage CDATA #IMPLIED
	  inputArrowDownImage CDATA #IMPLIED>
Attribute Mand. Description Default
id no Identifier of the Gantt planning.  
template no GANTT.template  
controller no Reference of the controller that manages the Gantt planning (i.e. handles user demands and refresh content).  
beginDate no Begin date of the visible part of the planning (with the date format specified in the dateFormat attribute).  
endDate no End date of the visible part of the planning (with the date format specified in the dateFormat attribute).  
dateFormat no Date format used by the planning. This format will be used to parse the beginDate and endDate attributes and to display the dates on the planning. The syntax of the display format is the one specified by the java.text.SimpleDateFormat class (see the corresponding Java documentation). The default display format for US English is: MM/dd/yyyy hh:mm:ss.  
timeFormat no Time format used by the planning.  
zoomFactor no Zoom factor of the planning. Indicates the time interval used for the vertical grid steps. Managed factors are:
MONTH_DAY: up step of one month and down step of one day
WEEK_DAY : up step of one week and down step of one day
DAY_MIDDAY : up step of one day and down step of half a day
DAY_2HOURS : up step of one day and down step of two hours
DAY_HOUR: up step of one day and down step of one hour
HOUR_15MINUTES: up step of one hour and down step of 15 minutes
HOUR_5MINUTES: up step of one hour and down step of 5 minutes
MONTH_DAY
currentDateRefreshPeriod no Indicates the period for refreshing current date on the planning (in seconds). A negative or null value indicates that current date must not be displayed. 1
allowElementHiding no Indicates whether the elements of the planning may be hidden or not (presence of the ?Hide? button). false
allowIntervalDivision no Indicates whether the intervals of the planning may be divided or not (presence of the ?Divide? button). false
allowSplit no Indicates whether the planning may be splitted into four parts using splitter bars. false
displayTimeSelector no Indicates if the panning manages date and time or only dates. false
hCenteredLine no Indicates which line of the planning is horizontally centered.  
vCenteredLine no Indicates which line of the planning is vertically centered.  
dateSelectorBean no Allows specifying the name of a Java class that replaces the default calendar component.  
backgroundColor no GANTT.backgroundColor  
treeBackgroundColor no GANTT.treeBackgroundColor  
font no GANTT.font  
fontColor no GANTT.fontColor  
toolTipFont no GANTT.toolTipFont  
toolTipFontColor no GANTT.toolTipFontColor  
toolTipBackgroundColor no GANTT.toolTipBackgroundColor  
upperScaleFont no GANTT.upperScaleFont  
planningBackgroundColor no GANTT.planningBackgroundColor  
scaleBackgroundColor no GANTT.scaleBackgroundColor  
scaleLinesColor no GANTT.scaleLinesColor  
linesColor no GANTT.linesColor  
weekendColor no GANTT.weekendColor  
inputFont no GANTT.inputFont  
inputBigDownArrowImage no GANTT.inputBigDownArrowImage  
inputArrowUpImage no GANTT.inputArrowUpImage  
inputArrowDownImage no GANTT.inputArrowDownImage  

ELEMENTS

<!ELEMENT GANTT 
	  (LINE*,
	   DAY*,
	   CONSTRAINT?,
	   DATA*)>
Element Mand. Mult. Description
LINE no yes First level lines of the Gantt planning.
DAY no yes Special days of the Gantt planning.
CONSTRAINT no no Positioning constraint of the Gantt planning.
DATA no yes GANTT.DATA

SAMPLE

<!-- Gantt planning with two lines, the second one containing 2 sub-lines -->
<GANTT id="gantt1">
	<LINE id='line1' label='Activity 1' font='LY_DEFAULT_BOLD_FONT'>
		<INTERVAL id='interval1' beginDate='01/02/2004'
			endDate='05/02/2004' label='50%'
			dependencies='interval2'/>
	</LINE>
	<LINE id='line2' label='Activity 2' font='LY_DEFAULT_BOLD_FONT'>
		<!-- The following interval is represented as a point -->
		<INTERVAL id='interval2' beginDate='10/02/2004'
			drawVerticalLines='true' label='Meeting'
			dependencies='interval3'/>
	</LINE>
	<LINE id='line3' label='Activity 3' font='LY_DEFAULT_BOLD_FONT'
			open='true'>
		<LINE id='line31' label='Task 21'>
			<INTERVAL id='interval3' beginDate='12/02/2004'
				endDate='15/02/2004' dependencies='interval4'
				label='10%' color='Red'/>
		</LINE>
		<LINE id='line32' label='Task 22'>
		<INTERVAL id='interval4' beginDate='18/02/2004'
				endDate='28/02/2004'>
			<PERIOD beginDate='21/02/2004' endDate='23/02/2004'/>
		</INTERVAL>
		</LINE>
	</LINE>
	<DAY type='DAY_OF_WEEK' dayOfWeek='SATURDAY'/>
	<DAY type='DAY_OF_WEEK' dayOfWeek='SUNDAY'/>
</GANTT>