This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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
 
Consider Paul's rocket mass heater.
 
subject: java geoTools api: refresh of my gui when a Feature source is update