From: Bennie T. <B.J...@st...> - 2005-01-29 11:26:36
|
Bastiaan, I think this problem is due to a change in the DSOLApplication() code. I recently changed the libraries for a project from dsol-gui 1.6.2 to dsol-gui 1.6.4 and it resulted in the same error as you mentioned, while it worked with the older library. On the DSOL website, the code for the latest version (dsol-giu 1.6.6) shows the following for the DSOLApplication() constructor: /*** 57 * constructs a new DSOLApplicationInterface 58 * 59 * @param navigation an URL to an xml-based navigation structure. 60 */ 61 public DSOLApplication(final URL navigation) So, the argument "navigation" is added in the newer versions. The default menu navigation structure is included in the jar file, so by adding a parameter when calling DSOLApplication(), the problem should be solved: public BargeHandlingApplication() { super(URLResource.getResource("/navigation.xml"); this.properties.put("dsol-gui.animation.panel.size","1020;680"); } Of course, if all else fails you can just use the older jar files. Bennie -----Original Message----- From: Bastiaan van de Rakt [mailto:in...@ra...] Sent: 19 January 2005 15:19 To: Bennie Talma Subject: Re: [Dsol-java] Problems and question Animation Panel/Frame in DSOL I tried this before, (see below), but I get The constructor DSOLApplication() is undefined BargeHandlingApplication.java BargeHandlingProject 13122004/src/java/nl/init8/port line 32 19 januari 2005 15:15:11 This is what I meant last time. What do I do wrong? Kind regards Bastiaan van de Rakt package nl.init8.port; import nl.tudelft.simulation.dsol.gui.DSOLApplication; /** * @author rakt * * Extension of the DSOLApplication * */ public class BargeHandlingApplication extends DSOLApplication { public BargeHandlingApplication() { super(); this.properties.put("dsol-gui.animation.panel.size","1020;680"); } public static void main(String[] args) { new BargeHandlingApplication(); } } Bennie Talma wrote: >Define your own application by just extending the DSOLApplication (and >adding your new properties). Now just run this class instead of the >DSOLApplication class. For example: > > >import nl.tudelft.simulation.dsol.gui.DSOLApplication; > >public class MyOwnApplication extends DSOLApplication >{ > public MyOwnApplication () > { > super(); > >this.properties.put("dsol-gui.animation.panel.extent","10000;30000;10000;10 0 >00"); > this.properties.put("dsol-gui.animation.panel.size","1020;680"); > } > > public static void main(String[] args) > { > new MyOwnApplication(); > } >} > > > >-----Original Message----- >From: Bastiaan van de Rakt [mailto:in...@ra...] >Sent: 19 January 2005 12:01 >To: Bennie Talma >Subject: Re: [Dsol-java] Problems and question Animation Panel/Frame in >DSOL > > >First of all, thanks for your help. > >I understand that the animation window are properties of the >DSOLApplication. > >But where in my model can I put such a constructor? I don't define my >own Application, I just use the DSOLApplication and load my model on >it. Can I define my own Application and run that? > >Kind regards > >Bastiaan van de Rakt > > >Bennie Talma wrote: > > > >>Bastiaan, >> >>In the constructor of your application, you can define some properties for >>the animation window. So, for your example: >> >>public class Application extends DSOLApplication >>{ >> public Application() >> { >> super(); >> //second parameter: Xmin, Ymin, X range, Y range >> >>this.properties.put("dsol-gui.animation.panel.extent","10000;30000;10000;1 0 >> >> >0 > > >>00"); >> this.properties.put("dsol-gui.animation.panel.size","1020;680"); >> } >>} >> >>There seems to be some sort of constraint on the values you can use for the >>extent of the animation window; similar to the aspect ratio of a picture. >> >> >So > > >>while it displays correctly if the X range is the same as the Y range (as >>above), it automatically adjusts the Y min if you have X range and Y range >>values as in your example (10.000;20.000). >> >>Regards, >>Bennie >> >>-----Original Message----- >>From: dso...@li... >>[mailto:dso...@li...]On Behalf Of Bastiaan van >>de Rakt >>Sent: 17 January 2005 12:20 >>To: ''Dsol-java (E-mail)' ' >>Subject: [Dsol-java] Problems and question Animation Panel/Frame in DSOL >> >> >>Dear DSOL developers and users, >> >>I have some problems with understanding the working of the animation >>panel. I want to set the dimension size of the AnimationFrame (so not >>the default setting of 600 by 600). Next to that I want to able to set >>the worldcoordinates visible in the frame. (for example xmin: 10.000, >>xmax: 20.000, ymin 30.000, ymax 50.000). How does these things work? >> >>Then I have some problems with reaction of the grid on my renderable >>objects, using for example >> >> >>public void paint(Graphics2D g, ImageObserver arg1) throws >>RemoteException{ >> >> >> g.setFont(new Font("Arial Narrow", Font.BOLD, 320)); >> >> g.translate(1.0,1.0); >> } >> >>also the grid numbers of the animation panel turns bold. >>and also translate methods in a Renderable2D translates the complete >>gridstructure in the same way. >> >>Besides this, I have another question: Is it possible to have another >>animation panel with a different map/ renderables and a different scale >>in the same model? >> >>Kind Regards >> >>Bastiaan van de Rakt >> >> >>------------------------------------------------------- >>The SF.Net email is sponsored by: Beat the post-holiday blues >>Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >>It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >>_______________________________________________ >>Dsol-java mailing list >>Dso...@li... >>https://lists.sourceforge.net/lists/listinfo/dsol-java >> >> >> >> >>------------------------------------------------------- >>The SF.Net email is sponsored by: Beat the post-holiday blues >>Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >>It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >>_______________________________________________ >>Dsol-java mailing list >>Dso...@li... >>https://lists.sourceforge.net/lists/listinfo/dsol-java >> >> >> >> >> >> > > > > >------------------------------------------------------- >The SF.Net email is sponsored by: Beat the post-holiday blues >Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >_______________________________________________ >Dsol-java mailing list >Dso...@li... >https://lists.sourceforge.net/lists/listinfo/dsol-java > > > > |