[udig-devel] Problem with FeatureCollection,
FeatureTableControl and CollectionListener
Ingmar Eveslage
eveslage at gmail.com
Sat Feb 16 10:50:29 PST 2008
With try and failure, i got the right combination of event listening/
ignoring and threading so that all commits, adds and removes do a
corect refresh on the table:
/*FeatureListener
*/
public void changed(FeatureEvent featureEvent) {
//update in edit case
if (Display.getCurrent() == null) {
PlatformUI.getWorkbench().getDisplay().syncExec(
new Runnable() {
public void run(){
ftc.update();
}
}
);
} else {
ftc.update();
}
}
/* IEditManagerListener
*/
public void changed(EditManagerEvent event) {
//update the table for commit and rollback
switch(event.getType()) {
case(EditManagerEvent.POST_COMMIT):
case(EditManagerEvent.POST_ROLLBACK):
System.out.println("POST");
if (Display.getCurrent() == null) {
PlatformUI.getWorkbench().getDisplay().syncExec(
new Runnable() {
public void run(){
ftc.update();
}
}
);
} else {
ftc.update();
}
break;
default:
break;
}
}
Only to post my update.
I hope you are not feeling to lonely as "the last geotools 2.2" user.
but i dont want to ask you here, why you not use a never version. you
have your reasons.
Greats Ingmar
Am 15.02.2008 um 06:05 schrieb Jody Garnett:
> Ingmar Eveslage wrote:
>>>> i hope someone can help me with my 2 problem. perhaps this are
>>>> bugs or do i missunderstand the api?
>>>>
>>> Your understanding is fine; GeoTools is used a lot by server
>>> applications (cough GeoServer) and client applications like uDig
>>> are the only people who care about events...
>>> Jody
>>
>> what should i do now? can i change the version of geotools in udig?
>> perhaps make usage of version 2.4 or so? but i think this isnt easy
>> or perhaps impossible.
>>
>> i dont realy "know" the geotools community. where should i post
>> such a bug-report? geotools-gt2-users or geotools-devel?
> Well the geotools community has moved on to GeoTools 2.5 (ie what
> uDig trunk uses), us udig hackers are the only people left using
> GeoTools 2.2 ... but Jesse and I can both fix things :-)
> So we have a couple of options right?
> - add a refresh button to the table (sounds like it may be needed
> given the number of datastores and lack of time)
> - fix the problem for memory datastore (ie your use case)
>
> Jesse have I left anything out?
> Jody
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
More information about the udig-devel
mailing list