From: Bennie T. <B.J...@st...> - 2005-01-19 13:00:27
|
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;100 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;10 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 > > > > |