Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » gantt and databinding
gantt and databinding [message #535797] Tue, 25 May 2010 17:05
Mauro Condarelli is currently offline Mauro CondarelliFriend
Messages: 424
Registered: September 2009
Senior Member
Hi,
I have an EMF-based model that includes data I want to display as a GanttChart.
I would like to be able to edit the model via GanttEvent moving/resizing.
Using databinding would be nice, but I don't know how to access the GanttEvent properties (essentially StartDate, EndDate and PercentComplete).

I tried something like:

Timeline te; //<< this is my model element

DataBindingContext dbc = new DataBindingContext();

GanttEvent ge = new GanttEvent(ganttChart, te, te.getCaption(), cs, ce, 0);

//IObservableValue startDateW = PojoProperties.value("StartDate").observe(ge);
IObservableValue startDate = BeanProperties.value("StartDate").observe(ge);
IObservableValue startMillis = EMFProperties.value(WorldPackage.Literals.TIMELINE__START_DA TE).observe(te);
dbc.bindValue(startDate, startMillis, calendar2date, date2calendar);

.... but it doesn't work (unsurprisingly)

Any idea?
Thanks in Advance
Mauro
Previous Topic:ganttchart event resize
Next Topic:gantt and databinding
Goto Forum:
  


Current Time: Fri Nov 28 02:03:38 GMT 2014

Powered by FUDForum. Page generated in 0.01546 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software