From: johann s. <joh...@ge...> - 2008-08-05 06:39:01
|
Hi again, I am aware of this problem. Looks like they are some problems coming from the postgis values. Grab the interesting code part from the demo and paste it in your classes. If you dont see anything at startup, hit the small "earth" icon at the top. it will center the map on the datas. Michael Bedward a écrit : > The demo builds but when I run it with > org.geotools.demo.widgets.StreamWidgetsDemo as the main class I get > this... > > java.lang.NullPointerException > at org.geotools.gui.swing.datachooser.JPostGISDataPanel.<init>(JPostGISDataPanel.java:74) > at org.geotools.demo.widgets.StreamWidgetsDemo$4.actionPerformed(StreamWidgetsDemo.java:209) > > As far as I can see all that's happening at that point in the code is > some simple form initialization with default parameter values. I'm > sure I must be missing something very obvious. Any ideas ? > > cheers > Michael > > 2008/8/5 Michael Bedward <mic...@gm...>: > >> Excellent - thanks Johann. >> >> I had searched the code with grep jstreamnavmap and hadn't thought to >> grep for a subclass (duh !) >> >> cheers >> Michael >> >> 2008/8/4 johann wrote: >> >>> You can find a demo on svn : >>> http://svn.geotools.org/trunk/demo/example/src/main/java/org/geotools/demo/widgets/StreamWidgetsDemo.java >>> >>> For the use of decorations I dont have any but it's not a hard thing. >>> A decoration is basicly a swing component who will be added on top of the >>> map, a bit like a layeredpane. >>> The only thing you have to do is override the paint method of your >>> decoration and paint what you wish. >>> >>> Here is snapshot of what did anaxa : >>> It's a decoration to show up more informations about some plots. >>> http://img218.imageshack.us/img218/1112/infossiteszn5.jpg >>> >>> The trick is to listen to the map widget and use the methods toMapCoord and >>> toComponentCoord to know exactly where you must paint on the decoration. >>> >>> I hope this helps. >>> >>> > > > -- Johann Sorel Company - Geomatys GIS Developer Mail - joh...@ge... |