• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic