Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Nebula GanttChart EventListener
Nebula GanttChart EventListener [message #600092] Thu, 05 August 2010 05:55
Eduardo Costa is currently offline Eduardo Costa
Messages: 2
Registered: August 2010
Junior Member
Hi,
I have problem when i try move the GanttEvent, i want alter the start
and end date the other GanttEvent, but GanttChart doesn't refresh.
final GanttChart ganttChart = new GanttChart(shell, SWT.NONE);
....
GanttGroup groupOne = new GanttGroup(ganttChart);
..
final GanttEvent eventOne = new GanttEvent(ganttChart, "OF 1",
sdEventOne, edEventOne, 60);
eventOne.setStatusColor(ColorCache.getColor(255, 0, 0));
eventOne.setHorizontalTextLocation(SWT.CENTER);
eventOne.setVerticalTextLocation(SWT.TOP);
..
groupOne.addEvent(eventOne);
...
GanttSection gsponner = new GanttSection(ganttChart, "Sponner");
gsponner.addGanttEvent(groupOne);
gsponner.setTextOrientation(SWT.HORIZONTAL);
...
ganttChart.addGanttEventListener(new IGanttEventListener() {
public void eventsMoveFinished(List events, MouseEvent me) {
GanttEvent event;
for(int i=0;i<events.size();i++){
event=(GanttEvent) events.get(i);
Calendar sdEvent=event.getActualStartDate();
sdEvent.add(Calendar.MINUTE, 10);
Calendar edEvent=event.getActualEndDate();
sdEvent.add(Calendar.MINUTE, 10);
if(event.equals(eventOne)){
eventOneSectionTwo.setStartDate(sdEvent);
eventOneSectionTwo.setEndDate(edEvent);
}
}
}
}

...
Sorry, my english is very bad :(

Best Regards
Eduardo Costa
Previous Topic:Nebula GanttChart EventListener
Next Topic:handle check events on a checkbox in a GridTreeViewer
Goto Forum:
  


Current Time: Tue Jul 29 19:07:31 EDT 2014

Powered by FUDForum. Page generated in 0.02004 seconds