[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nebula-dev] Multipart GanttEvent
- From: Aleksandar Kanchev <aleksandar.kanchev@xxxxxxxxxxxxxx>
- Date: Wed, 18 May 2011 12:07:51 +0200
- Delivered-to: email@example.com
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=W5ElffSE4MCGBfyg1ZQRM6fr/vlj0Xlu3wssPOi7ZWiNkR9CHFeb5XeI8lp94CWSer lgbNnEHQocdx2m34rX+PzTt8uSsGpO1m8lpDQuSFw1lBw8j50wnIuhHIlwGe0YbtRyGK 1+vw6A7VBFE6mUxlt7AgZaaW2ZjK9kjhJo728=
I'm using the nebula GanttChart widget along a TableViewer to visualize a precedence diagram. Although the GanttChart is very flexible and already supports many features, I'm having trouble implementing one special case. The GanttEvents that I want to display consist of multiple parts for different phases within a single event. Currently I'm implementing this by creating a GanttEvent per event part, adding the parts to a GanttGroup so that they'll be displayed on a single row to align it with the corresponding table row. Finally if a GanttEvent is moved, the GanttComposite updates it's revised dates by calling setRevisedStart(Calendar, boolean) and setRevisedStop(Calendar, boolean), so I'm extending those methods and I update the revised dates of the predecessor/successor GanttEvents of the GanttGroup. What I want to achieve is being able to resize the different parts of the event but still displaying and moving them as a whole event.
Although this works good enough, I'm not sure this is the right way to do it. I'm concerned about performance and correct notBefore/notAfter bounds checking. Also if I start moving an event with the mouse really fast then the GanttComposite will eventually start drawing them incorrectly and overlapping. Am I using the right approach? Is there a better/correct way of doing this?