[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[nebula-dev] Multipart GanttEvent

Hello list,

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?

Best regards,