gantt and databinding [message #535797] |
Tue, 25 May 2010 13:05 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02582 seconds