aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes java geoTools api: refresh of my gui when a Feature source is update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "java geoTools api: refresh of my gui when a Feature source is update " Watch "java geoTools api: refresh of my gui when a Feature source is update " New topic
Author

java geoTools api: refresh of my gui when a Feature source is update

Julia Bluemarine
Greenhorn

Joined: Jul 23, 2010
Posts: 1
Hi!
I have built a java gui that show some icons representing some Features taken from my Postgres database (with postGis integration) in the following way:

SimpleFeatureSource fs = dataStore.getFeatureSource("location"); //where location is my db table

Style style = createStyle(fs);

CachingFeatureSource cfs = new CachingFeatureSource(fs);

mapCtx.addLayer(cfs, style); //where mapCtx is my DefaultMapContext

Example of my feature: a man walking, so his position on the gui have to change (the data in the database are update by an external software).

Now, can I simulate the moving of my icon (man) on my java gui?

I was thinking to a listener that alert me when something in my db table has changed, then maybe a repaint of my map, but I can't find example and the right API.
Please, can someone help me?

Best regards
Alce
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java geoTools api: refresh of my gui when a Feature source is update