<?xml version="1.0" encoding="utf-8"?>
<!-- generator="Joomla! 1.5 - Open Source Content Management" -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gantt4Flex - Gantt Diagram Library for Flex - Documentation</title>
		<description>Interactive and flexible Gantt diagram library for Flex. Easily customize how to view data and how to interact with data.</description>
		<link>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex.html</link>
		<lastBuildDate>Thu, 05 Feb 2015 13:30:35 +0000</lastBuildDate>
		<generator>Joomla! 1.5 - Open Source Content Management</generator>
		<language>en-gb</language>
		<item>
			<title>Gantt4Flex Roadmap</title>
			<link>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/41-gantt4flex-roadmap.html</link>
			<guid>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/41-gantt4flex-roadmap.html</guid>
			<description><![CDATA[<p>The milestones from the {jumi [gantt4flex.inc]} roadmap contain the main planned  features. The release notes for each version will contain the detailed  list of features/bug fixes included.</p>
<h1>Gantt4Flex 1.0.0.M1</h1>
<p>First public release of {jumi [gantt4flex.inc]}.</p>
<h1>Gantt4Flex 1.0.0</h1>
<ul>
<li>Export Gantt diagram as image</li>
<li>Print Gantt diagram</li>
<li>Context menu for Gantt segments</li>
<li>Z-index for Gantt segments</li>
<li>Graphical tool for easy creation of Gantt segments</li>
<li>Pan scrolling (moving the diagram with a "hand" tool)</li>
</ul>
<h1>Gantt4Flex 1.1.0</h1>
<ul>
<li>Improved (vector) printing</li>
<li>Export as PDF</li>
<li>Customize snap to grid units</li>
<li>Customize status bar text</li>
<li>Drag & drop segments on vertical axis</li>
</ul>
<h1>Gantt4Flex 2.0 (release planned for summer 2012)</h1>
<p style="padding-left: 30px;">Performance improvement</p>
<p style="padding-left: 30px;">Dependencies between segments (lines)</p>
<p style="padding-left: 30px;">Additional styling options</p>
<p style="padding-left: 30px;">Additional API extension points</p>]]></description>
			<author>contact@crispico.com (Admin Admin)</author>
			<category>Documentation</category>
			<pubDate>Fri, 25 Mar 2011 14:37:57 +0000</pubDate>
		</item>
		<item>
			<title>Gantt4Flex Release Notes</title>
			<link>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/43-gantt4flex-release-notes.html</link>
			<guid>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/43-gantt4flex-release-notes.html</guid>
			<description><![CDATA[<h1>Gantt4Flex version 1.1.2 (2011-07-01)</h1>
<ul>
<li>API improvements for Timeline customization (see <strong><a href="http://www.uml4as.com/forum/index.php?topic=443.0" class="nav">Timeline colours</a></strong>, <strong><a href="http://www.uml4as.com/forum/index.php?topic=448.0" class="nav">Multiple timelines</a></strong>)</li>
<li>Added time zone offset to the Timeline</li>
</ul>
<h1>Gantt4Flex version 1.1.1 (2011-06-16)</h1>
<ul>
<li><strong><a href="http://www.gantt4flex.com/flower-platform/../forum/index.php?topic=381.0">#4351-FI: (FDG-CORE) Problem: displayIntervalStart == displayIntervalEnd</a></strong></li>
<li><strong><a href="http://www.gantt4flex.com/flower-platform/../forum/index.php?topic=389.0" class="nav">#4350-FI: (FDG-VSCROLL) Error when no data provider</a></strong></li>
</ul>
<h1>Gantt4Flex version 1.1.0 (2011-05-26)</h1>
<ul>
<li>Improved (vector) printing</li>
<li>Export as PDF</li>
<li>Customize snap to grid units independently of timelines</li>
<li>Customize status bar text</li>
<li>Drag &amp; drop segments on vertical axis</li>
<li>Many API improvements</li>
<li>Various bug fixes</li>
</ul>
<h1>Gantt4Flex version 1.0.0 (2011-04-22)</h1>
<ul>
<li>Export Gantt diagram as image</li>
<li>Print Gantt diagram</li>
<li>Context menu for Gantt segments</li>
<li>Z-index for Gantt segments</li>
<li>Graphical tool for easy creation of Gantt segments</li>
<li>Pan scrolling (moving the diagram with a "hand" tool)</li>
<li>Various small problems reported by users </li>
</ul>
<h1>Gantt4Flex version 1.0.0.M1u1 (2011-03-30)</h1>
<ul>
<li><strong><a href="http://www.gantt4flex.com/flower-platform/../forum/index.php?topic=228.0" class="nav">#3640-FI: (FD-CM) Problems when application is a Spark component</a></strong></li>
</ul>
<h1>Gantt4Flex version 1.0.0.M1 (2010-12-29)</h1>
<p>First public release of the library.</p>]]></description>
			<author>contact@crispico.com (Admin Admin)</author>
			<category>Documentation</category>
			<pubDate>Wed, 30 Mar 2011 13:14:59 +0000</pubDate>
		</item>
		<item>
			<title>Gantt4Flex Developer's Documentation</title>
			<link>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/31-gantt4flex-developers-documentation.html</link>
			<guid>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/31-gantt4flex-developers-documentation.html</guid>
			<description><![CDATA[<h1>Introduction</h1>
<p>Thank you for your interest in {jumi[gantt4flex.inc]} library. {jumi[gantt4flex.inc]} is a powerful and flexible library that allows you to include in your application Gantt diagrams. Gantt diagrams built with {jumi[gantt4flex.inc]} support "2-way" or "read-write" operations:</p>
<ul>
<li>users view data (based on your application's model and customizations)</li>
<li>users interact with data (and trigger client-side or server-side behavior, specific to your application's needs)</li>
</ul>
<p>This guide will walk you through the majority of the features. Each paragraph contains links to working examples, sample source code and ASDoc documentation of the library.</p>
<p>{jumi[gantt4flex.inc]} is built on the powerful diagramming library that is used in the products from the Flower Modeling Platform family (e.g. UML4AS). If your needs go beyond what is described in this document and in the ASDoc documentation, please don't hesitate to contact us (via support or forums), as there might already be a solution for what you are looking for.</p>
<p>When we designed {jumi[gantt4flex.inc]} (or when we add new features), we have the following (slightly funny) image in mind:</p>
<ul>
<li>{jumi[gantt4flex.inc]} <strong>is not</strong> a component that displays just a "classic" Gantt chart by default. And then...<br />"<img style="margin: 0px;" alt="question" src="http://www.gantt4flex.com/flower-platform/images/stories/content/icons_gantt_frontpage/question.png" height="32" width="32" />I need to adapt. Can I do it? How?"<br />"<img style="margin: 0px;" alt="sad1" src="http://www.gantt4flex.com/flower-platform/images/stories/content/icons_gantt_frontpage/sad1.png" height="32" width="32" />"Euhh... Well... <img style="margin: 0px;" alt="sad2" src="http://www.gantt4flex.com/flower-platform/images/stories/content/icons_gantt_frontpage/sad2.png" height="32" width="32" />This might be possible... <img style="margin: 0px;" alt="sad3" src="http://www.gantt4flex.com/flower-platform/images/stories/content/icons_gantt_frontpage/sad3.png" height="32" width="32" />But you need to do a trick... Etc." <br />{jumi[gantt4flex.inc]} <strong>is not</strong> this kind of product.</li>
<li>{jumi[gantt4flex.inc]} <strong>is</strong> a library that <strong>has been designed</strong> to be customized to match every small detail.<br />"<img style="margin: 0px;" alt="question" src="http://www.gantt4flex.com/flower-platform/images/stories/content/icons_gantt_frontpage/question.png" height="32" width="32" />I need to adapt. Can I do it? How?" <br />"<img style="margin: 0px;" alt="happy1" src="http://www.gantt4flex.com/flower-platform/images/stories/content/icons_gantt_frontpage/happy1.png" height="32" width="32" />Easily. You have just the API you need."</li>
</ul>
<h1><a name="model-configuration"></a>Model Configuration</h1>
<p>The first step when using {jumi[gantt4flex.inc]} is to configure the model that holds the data to display. Any ActionScript class can be used as model. The model can be:</p>
<ul>
<li>flat or hierarchical. If it is hierarchical, an element can have child elements, and it is displayed as a tree within the Gantt diagram's associated <span style="font-family: courier new,courier;">DataGrid</span>.</li>
<li>single or multi segment. If multi segment, an element (a row) can have several segments.</li>
</ul>
<h2>Single Segment Model</h2>
<p>If the model that is used is single segment, only 2 details  need to be configured (if it is flat): the names of the 2 properties of the model  (attributes or properties with getters/setters) that point to the start  date and end date of the segment ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#startDateProperty]}  and {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#endDateProperty]}).</p>
<p><strong>NOTE:</strong> The above properties need to dispatch a <code>PropertyChangeEvent</code> when they change. In the majority of the cases, a <code>Bindable</code> annotation will be used, either on property or class level.</p>
<p><strong>Example:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Scientists">Scientists Sample</a></li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/scientists/ScientistsSample.mxml.html">Scientists Sample source code</a></li>
</ul>
<h2>Multi Segment Model</h2>
<p>An element (a row) may have more than one segment. In this case, the start and end dates are not taken from the model element. Instead, the model should provide an <code>ArrayCollection</code> of segments; {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#segmentsProperty]} needs to be set accordingly. Each segment should provide a start date ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#startDateProperty]}), an end date ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#endDateProperty]}) and a pointer to the parent model element ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#segmentParentProperty]}), and the corresponding property names should be set as well.</p>
<p><strong>NOTE 1:</strong> Notice that the property names for getting the start/end dates are the same as in the case of a single segment model. The difference is that for a single segment configuration, they are applied directly on the model element (e.g. <code>model.start</code>) and for a multi segment configuration, they are applied on segments belonging to a model element (i.e. <code>model.segments[i].start</code>).</p>
<p><strong>NOTE 2:</strong> For a multi segment configuration, the property that contains the segments should always be not-null (i.e. including when there are no segments), and should not change at runtime.</p>
<p><strong>Example:</strong></p>
<ul>
</ul>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=TaskManager">Task Manager Sample</a> - the model is also hierarchical but flat/multi segment model is supported as well.</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/taskmanager/TaskManagerSample.mxml.html">Task Manager Sample source code</a></li>
</ul>
<h2>Hierarchical Model</h2>
<p>The model can be hierarchical. In this case, each model elements needs to provide an <code>ArrayCollection</code> of child model elements ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#childrenProperty]}) and a pointer towards the element's parent ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#parentProperty]}); the corresponding properties need to be configured accordingly.</p>
<p><strong>NOTE:</strong> For a hierarchical configuration, the property that contains the children should always be not-null (i.e. including when there are no children), and should not change at runtime.</p>
<p>For a hierarchical model, the {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#dataProvider]} can be an <code>ArrayCollection</code> or a single root model element (which is not displayed on the diagram / DataGrid).</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Conference">Conference Sample</a> - the model is heterogeneous; there is a limited depth on 2, and the parent/child have different classes (i.e. <code>Conference</code> and <code>Topic</code>) </li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/conference/ConferenceSample.mxml.html">Conference Sample source code</a></li>
</ul>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=TaskManager">Task Manager Sample</a> - the model is homogeneous; there is an unlimited depth, and the parent/child have the same class (i.e. <code>Task</code>)</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/taskmanager/TaskManagerSample.mxml.html">Task Manager Sample source code</a></li>
</ul>
<h2><a name="advanced-model-configuration"></a>Advanced Model Configuration: Model Elements of Different Types</h2>
<p>You might have a model that is more complex. I.e. there is an hierarchy but different hierarchical levels are represented by different classes; e.g. instead of having a Task that has subtasks that have subtasks, etc., you have a first level: authors (that have a birth date) and a second level: books (that have a publish date). In this case a "static" model configuration is limiting.</p>
<p>Instead of using the properties discussed above, in {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure]} you can define callback functions that have the same role, but can return different results, based on the instance type. For the above example, we can define a callback function for {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#startDatePropertyFunction]} that returns "birthDate" for "Author" model elements and "publishingStartDate" for "Book".</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=SupermarketResources">Supermarket Resources Sample</a> - there are multiple model classes that have different fields that access start/end dates, hierarchy, etc.</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/supermarket/SupermarketResourcesSample.mxml.html">Supermarket Resources Sample source code</a></li>
</ul>
<h1><a name="datagrid"></a>Associating a <code>DataGrid</code></h1>
<p>The Gantt diagram usually has a<strong> DataGrid </strong>associated  to it. The {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#dataGrid]}  property (gantt4flex:dataGrid  from MXML) is used for this purpose. A couple of remarks about it  (necessary because of the close integration/synchronization of the Gantt diagram  and the DataGrid):</p>
<ul>
<li>the dataProvider of the DataGrid shouldn't be set/modified from within the application. It is controlled by the Gantt diagram.</li>
<li>some visual properties of the DataGrid shouldn't be modified directly. They should be set through the Gantt diagram (headerHeight, rowHeight, the alternatingItemColors style). </li>
</ul>
<p>Besides the above remarks, there are no additional constraints regarding the DataGrid. You can even have a customized DataGrid (e.g. renderers, custom columns classes, custom DataGrid class, etc.).</p>
<p>If a hierarchical model is used, the first column needs to have a special item renderer. {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.datagrid.GanttDataGridItemRenderer]} or {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.datagrid.GanttDataGridColumn]} need to be used.</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Scientists">Scientists Sample</a> - flat model </li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/scientists/ScientistsSample.mxml.html">Scientists Sample source code</a></li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Conference">Conference Sample</a> - hierarchical model</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/conference/ConferenceSample.mxml.html">Conference Sample source code</a></li>
</ul>
<ul>
</ul>
<h1><a name="segment-figures"></a>Segment Figures (Renderers)</h1>
<p>The default figure (renderer) for a Gantt segment is {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.BasicGanttSegmentFigure]}. Another figure can be configured in one of the following ways, by setting the {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#segmentFigure]} property.</p>
<p><strong>"Bar"-like figure</strong>; all visual components are <span style="text-decoration: underline;">within</span> the Gantt segment/bar</p>
<ul>
<li>extend {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.BasicGanttSegmentFigure]}. It can be extended in order customize the drawing of the bar and/or to add children (e.g. labels; this can be done easily through MXML; this class descends (indirectly) from <code>VBox</code>);</li>
<li>or, use another graphical component that implements the {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.IGanttSegmentFigure]} interface. This should be straight forward. Besides implementing the methods (cf. the interface doc), nothing else needs to be done.</li>
</ul>
<p><strong>Figure with leading and/or trailing</strong> graphical components</p>
<p>If additional components need to be displayed before and/or after the bar component,</p>
<ul>
<li>use {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.HBoxGanttSegmentFigure]}. It needs to have a child that draws the actual bar (+ the reference {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.HBoxGanttSegmentFigure#segmentBarComponent]} pointing towards it);</li>
<li>or, use another graphical component that implements the {jumi  [g4f_doc.php]   [com.crispico.flower.flexdiagram.gantt.figure.IGanttSegmentFigure]}  interface. The interface doc describes what are the responsibilities to fulfill in this case. This is not so straight forward, and it is recommended to use {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.HBoxGanttSegmentFigure]}.</li>
</ul>
<strong>NOTE:</strong> the sub-graphical components <span style="text-decoration: underline;">shouldn't</span> implement {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.IFigure]}. Only the main component should implement this interface. E.g. {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.BasicGanttSegmentComponent]} (and <span style="text-decoration: underline;">not</span> {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.BasicGanttSegmentFigure]}) can be used together with {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.HBoxGanttSegmentFigure]}.
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Conference">Conference Sample</a> - custom figure, configured from MXML; keeps the original drawing logic</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/conference/ConferenceSample.mxml.html">Conference Sample source code</a></li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=TaskManager">Task Manager Sample</a> - custom figure, configured partly from AS, partly MXML; customizes the original drawing logic</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/taskmanager/TaskManagerSample.mxml.html">Task Manager Sample source code</a></li>
</ul>
<h2><a name="advanced-figure-configuration"></a>Advanced Figure Configuration: Different Types of Figures</h2>
<p>As in the case of model configuration, a callback function can be defined ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#segmentFigureClassFunction]} in {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure]}) that can return different figure classes (renderers) for different types of segments.</p>
<p>It's recommended (from the performance point of vies) to have several different (and light-weight) figure classes, instead of having a single, heavier, figure, that shows/hides subcomponents or modifies appearance using data binding.</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=SupermarketResources">Supermarket Resources Sample</a> - there are multiple figure classes.</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/supermarket/SupermarketResourcesSample.mxml.html">Supermarket Resources Sample source code</a></li>
</ul>
<h2><a name="z-index"></a>Z Index</h2>
<p>If your segments are likely to overlap, you might define a callback function ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#zIndexFunction]}) that controls the sorting of the figure on the Z Axis.</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=SupermarketResources">Supermarket Resources Sample</a> - defines a function that controls the Z index.</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/supermarket/SupermarketResourcesSample.mxml.html">Supermarket Resources Sample source code</a></li>
</ul>
<h1><a name="timelines"></a>Timelines</h1>
<p>A Gantt diagram may have timelines associated to it (0, 1 or more) by setting the {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#timelines]} property. A {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.Timeline]} is configured with various {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.TimeUnit]}s by setting the {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.Timeline#timeUnits]} property.</p>
<p>A {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.TimeUnit]} represents a predefined interval that will be used for dividing the current display interval of the diagram. {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.Timeline]}'s documentation describes the logic used to determine the current time unit (chosen from the configured time units).</p>
<p>The {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.Timeline]} has a default time units configuration, and it can be customized by using o mix of provided time units. The {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.TimeUnit]}s can be used as-is or they can be further configured (e.g. changing the date format). Some units allow using {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.TimeUnit#multiple]}s. E.g. a {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.YearTimeUnit]} with <code>multiple = 5</code> is in fact a time unit that represents 5 years.</p>
<p>If there are several timelines, {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.Timeline#smallerTimeline]} is usually used to "chain" them. This ensures that the smaller timeline (below the current one) always has smaller time units (i.e. they split the display interval differently, even if they have the same time units configuration).</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Scientists">Scientists Sample</a> - one timeline, with custom configuration (using <code>multiple</code> as well)</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/scientists/ScientistsSample.mxml.html">Scientists Sample source code</a></li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Conference">Conference Sample</a> - 2 timelines with default configurations</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/conference/ConferenceSample.mxml.html">Conference Sample source code</a></li>
</ul>
<h1><a name="grids"></a>Grids</h1>
<p>A Gantt diagram can have one or several grids, displayed as background for the diagram. They are configured using {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#grids]}. The library provides 2 implementations:</p>
<ul>
<li>{jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.grid.HorizontalGrid]} that draws horizontal lines, according to diagrams {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#rowHeight]} (i.e. they are aligned with the rows of the associated <code>DataGrid</code>, if existent).</li>
<li>{jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.grid.VerticalGrid]} that draws vertical lines, according to the intervals defined by the smallest {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.Timeline]}</li>
</ul>
<p>Although not a grid, let's mention {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.ui.NowIndicatorLine]}. It's an horizontal line that indicates the current time.</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Scientists">Scientists Sample</a> - uses 2 grids</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/scientists/ScientistsSample.mxml.html">Scientists Sample source code</a></li>
</ul>
<h1>Context Menu</h1>
<p>The Flash platform is quite limiting regarding right click context menus. {jumi[gantt4flex.inc]} has its own context menu framework that is meant to overcome the Flash imposed limitations, while being as less intrusive as possible (from the user experience perspective).</p>
<p>The context menu is displayed next to an element when it is selected (it works for multiple selection as well). There are some timers involved in the context menu logic, which you can adjust if you want: {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#contextMenuExpandMenuDelay]}, {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#contextMenuAcceleratedExpandMenuDelay]}, {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#contextMenuCloseMenuDelay]}.</p>
<p>Please note that the top application object needs to have an absolute layout, in order for the context menu to function correctly. If you are using a Spark application (Flex SDK 4 and above), this is the case by default. If you are using a MX application, you need to set <code>layout="absolute"</code>.</p>
<h2><a name="context-menu-actions"></a>Actions</h2>
<p>{jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.contextmenu.FlowerContextMenu]} lets you define entries that are shown and executed against the current selection of the diagram (when a single element is selected, multiple elements or even no element => the "general" context menu of the diagram).</p>
<p><strong>The first step</strong> is to define some actions. You need to extend the {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.action.BaseAction]} class.</p>
<ul>
<li>Within the constructor you may define a title and an icon for the action.</li>
<li>{jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.action.BaseAction#isVisible()]} needs to be overridden with code that decides if the action should be displayed or not (based on the current selection).</li>
<li>{jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.action.BaseAction#run()]} needs to be overridden with code that does the work.</li>
</ul>
<p>Please note the following items when writing actions</p>
<ul>
<li>The selection contains <code>EditPart</code>s which wrap the model elements. To access a model element use <code>selection[i].getModel()</code>.</li>
<li>Besides the current selection, actions can use the {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.action.IAction#context]} data structure that contains some parameters that may be useful for the action.</li>
<li>If your code removes elements from the data provider, please clone the selection <code>ArrayCollection</code> and operate on the clone.</li>
</ul>
<p><strong>The second step</strong> is to define a callback function for {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#fillContextMenuFunction]}. The implementation of the callback should add the actions in the context menu (e.g. using {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.contextmenu.FlowerContextMenu#addActionEntryIfVisible()]}).</p>
<p>You can have nested context menus (by using {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.contextmenu.SubMenuEntry]}).</p>
<h2><a name="context-menu-create-actions"></a>Create Actions</h2>
<p>Create actions are a little bit special. They are not displayed like "normal" actions, when something is selected on the screen. They are displayed after a "drag to create" operation (see {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.tool.SelectMoveResizeTool]}). To work with create actions, you need to follow the same 2 steps as above, but with the follwing remarks.</p>
<p>The actions that you define (<strong>first step</strong>) won't use the selection (which is empty). They will probably use the  information available in {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.action.IAction#context]} (e.g. to know how big was the rectangle dragged by the user).</p>
<p>A different callback function is used (<strong>second step</strong>): {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#fillCreateContextMenuFunction]}</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=SupermarketResources">Supermarket Resources Sample</a> - define both "normal" actions and "create" actions.</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/supermarket/SupermarketResourcesSample.mxml.html">Supermarket Resources Sample source code</a></li>
</ul>
<h1><a name="print-export"></a>Print and Export as Image or PDF</h1>
<p>To print the current Gantt diagram, you need to instantiate the Print Options dialog ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.printexport.GanttPrintDialog]}) and call its {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.printexport.GanttPrintDialog#show()]} method. The user selects some options (which rows to print, how many rows per page, etc); after that he/she selects printer specific options (the window specific to the operating system) and the data is sent to the printer.</p>
<p>The printing is done in vector format. This means that transparent raster images are not supported (i.e. the transparency is shown as white background). If this is not convenient, you need to use SVG images.</p>
<p>To export the current Gantt diagram as an image, you need to instantiate the Export as Image Options dialog ({jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.printexport.GanttExportAsImageDialog]}) and call its {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.printexport.GanttExportAsImageDialog#show()]} method. This method needs a callback function that is invoked after the image has been generated. This callback function needs to to something with the data (a <code>ByteArray</code>): "give it" to the user in a browser "Save as" dialog, send it to the server, etc.</p>
<p>The PDF export mechanism works in a similar way. Use {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.printexport.GanttExportAsPdfDialog]} and call its {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.printexport.GanttExportAsPdfDialog#show()]} by providing a callback. Please note that in order to use this feature, you need to import the AlivePDF (<a href="http://www.alivepdf.org/">http://www.alivepdf.org/</a>, version >=  0.1.5_RC) library in your application. For the moment, the AlivePDF supports PDFs that contains bitmap (raster) data (not vector).</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=SupermarketResources">Supermarket Resources Sample</a> - contains buttons for Print and Export as Image and PDF</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/supermarket/SupermarketResourcesSample.mxml.html">Supermarket Resources Sample source code</a></li>
</ul>
<h1>Other Customizations</h1>
<h2><a name="drag-drop-segments"></a>Drag and Drop Segments</h2>
<p>By default, drag and drop operations are allowed only on the horizontal axis. The user can grab a segment and move it or resize it. When the drop operation occurs, the system changes the dragged segment (i.e. it's start and/or end).</p>
<p>You may want to enable drag and drop an the vetical axis as well. In this case, a callback function needs to be specified: {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#allowSegmentVerticalDragFunction]}.</p>
<p>Once the vertical drag and drop is enabled, another callback function needs to be provided: {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure#segmentDropFunction]}. Its implementation should decide what to do when an object is dropped (e.g. reorder in the data provider, associate to another element in the tree hierarchy, etc.). The system doesn't do anything by default (on the vertical axis).</p>
<p>This callback function might be used as well to prevent the default move/resize behavior (i.e. horizontal axis). Your particular business context might require this (e.g. some segments cannot be dragged unless a custom condition is met).</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=SupermarketResources">Supermarket Resources Sample</a> - horizontal axis: move child elements together with the parent; vertical axis: change order or hierarchy</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/supermarket/SupermarketResourcesSample.mxml.html">Supermarket Resources Sample source code</a></li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=TaskManager">Task Manager Sample</a> - horizontal axis: composed tasks are not allowed to me moved/resized</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/taskmanager/TaskManagerSample.mxml.html">Task Manager Sample source code</a></li>
</ul>
<h2><a name="status-bar-text"></a>Status Bar Text</h2>
<p>{jumi[gantt4flex.inc]} has a class that handles how the status bar text is formatted: {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.statusbar.StatusBarTextFormatter]}. You can customize the status bar text by assigning a new {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.statusbar.StatusBarTextFormatter]} instance to the diagram ({jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#statusBarTextFormatter]}). You can:</p>
<ul>
<li>use the same class and modify one or more of its format and/or substitution strings that configure the display; or</li>
<li>extend the class and override one of more of its method (if changing the configuration is not enough).</li>
</ul>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Scientists">Scientists Sample</a> - modifies the format and substitution strings with something more appropriate for displaying born/die dates and ages</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/scientists/ScientistsSample.mxml.html">Scientists Sample source code</a></li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=TaskManager">Task Manager Sample</a> - modifies the format strings (display days instead of hours and minutes)</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/taskmanager/TaskManagerSample.mxml.html">Task Manager Sample source code</a></li>
</ul>
<h2><a name="snap-grid"></a>Snap to Grid</h2>
<p>If the Gantt diagram has one (or several) {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.timeline.Timeline]}s, the "smallest"/last one (in the {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#timelines]} array) controls the snap to grid behavior, when moving or resizing segments.</p>
<p>The snap to grid can be controlled independently of timelines as well. {jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#snapToGridTimeUnits]} needs to be set.</p>
<p><strong>Examples:</strong></p>
<ul>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/GanttSamples.html?sample=Scientists">Scientists Sample</a> - has different time units (from timelines) for snap to grid</li>
<li><a target="_blank" href="http://www.gantt4flex.com/flower-platform/../gantt4flex/samples/srcview/source/com/crispico/flower/flexdiagram/gantt/samples/scientists/ScientistsSample.mxml.html">Scientists Sample source code</a></li>
</ul>
<h1>Runtime</h1>
<p>The above sections, described various configuration elements, which are done at design time.</p>
<p>The entry point of {jumi[gantt4flex.inc]} is the {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.figure.GanttDiagramFigure]} <span style="font-family: courier new,courier;"> </span>component. It can be added within an MXML component (or application), or via ActionScript.</p>
<p>The library provides features that are accessed at runtime. They are described in the API documentation, but let's take a look at a couple of them.</p>
<h2>DataProvider</h2>
<p>Once the component is on the screen, you can set an <span style="font-family: courier new,courier;">ArrayCollection</span> of model elements as its {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#dataProvider]}. The component supports data binding. When the {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#dataProvider]} changes or when one model element changes its start or end property, the diagram refreshes.</p>
<p>From the performance perspective, if you need to add a lot of items sequentially (e.g. when data comes from the server) it is recommended to add them in an <span style="font-family: courier new,courier;">ArrayCollection </span>and then set it as <span style="font-family: courier new,courier;">dataProvider</span> (rather than setting the collection first and adding the items afterwards). The same remark applies for delete as well; if you need to delete all the elements, you should set the <span style="font-family: courier new,courier;">dataProvider</span> to null, rather than removing the elements one by one (or using <span style="font-family: courier new,courier;">removeAll()</span>, which does the same). Actually this applies to almost all Flex data bound components, because of the sequential way of dispatching notifications.</p>
<h2>Display Interval<strong></strong></h2>
<p>The display interval is the the time interval currently displayed in the diagram. It is controlled by the user via scrolling or zooming. It can be controlled programmatically as well, using {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.figure.AbstractGanttDiagramFigure#setDisplayInterval()]}.</p>
<h2>Formatting Durations</h2>
<p>Formatting dates as durations (instead as date and/or time) is rather difficult in ActionScript (even in Java) as the API doesn't provide appropriate formatters. The {jumi[gantt4flex.inc]} has a static method (used by the status bar) which you can use in your application as well, if you need to display durations: {jumi [g4f_doc.php] [com.crispico.flower.flexdiagram.gantt.statusbar.StatusBarTextFormatter#formatDuration()]}<span style="font-family: courier new,courier;">.</span></p>
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;" id="_mcePaste">{jumi [g4f_doc.php]  [com.crispico.flower.flexdiagram.action.IAction.context]}</div>]]></description>
			<author>contact@crispico.com (Admin Admin)</author>
			<category>Documentation</category>
			<pubDate>Mon, 13 Dec 2010 05:23:50 +0000</pubDate>
		</item>
		<item>
			<title>Gantt4Flex API Documentation</title>
			<link>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/46-gantt4flex-api-documentation.html</link>
			<guid>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/46-gantt4flex-api-documentation.html</guid>
			<description><![CDATA[<meta http-equiv="Refresh" content="0; url=/gantt4flex/asdoc/index.html" />
If your browser doesn't redirect you, please <a href="http://www.gantt4flex.com/flower-platform/../gantt4flex/asdoc/index.html">click here</a>. <br />]]></description>
			<author>contact@crispico.com (Admin Admin)</author>
			<category>Documentation</category>
			<pubDate>Tue, 26 Apr 2011 08:29:29 +0000</pubDate>
		</item>
		<item>
			<title>Compatible Flex SDKs</title>
			<link>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/55-compatible-flex-sdks.html</link>
			<guid>http://www.gantt4flex.com/flower-platform/documentation-gantt4flex/55-compatible-flex-sdks.html</guid>
			<description><![CDATA[<p>{jumi [gantt4flex.inc]} is compatible with the following Flex SDK versions:</p>
<ul>
<li>Flex 3 family: &gt;= 3.4 (i.e. 3.4, 3.5)</li>
<li>Flex 4 family: 4, 4.1, 4.5</li>
</ul>]]></description>
			<author>contact@crispico.com (Admin Admin)</author>
			<category>Documentation</category>
			<pubDate>Tue, 21 Jun 2011 06:43:12 +0000</pubDate>
		</item>
	</channel>
</rss>
