This page last changed on Nov 09, 2010 by stepheneb.
Tip: Tracing and debugging applications in Java Web Start and Java Applets
Embedding NetLogo as an applet using the LiteApplet class is makes it get embedded as a heavy weight component. This messes up scroll panes and other light weight objects.
Only one NetLogo model can be active at a time.
We are not using the controlling or logging mechanisms. So we don't know if they work.
- embedding NetLogo application - provide a way to embed complete NetLogo app, instead of using applet.
- logging - determine the best way to log netlogo particular when there might be more than one running at the same time.
- multiple instances - allow multiple NetLogo models to be embedded at the same time.
- controlling - determine the best way to control netlogo particular when there might be more than one running at the same time.
Test cases to provide to the NetLogo team
These are things that Sam should create before we ask the NetLogo team to do any work.
Embed model panel of a NetLogo application into a swing component.
- Test created, see Trac entry. We are able to embed the contents of the Application's frame. However, we would like to get just the model's panel, like we do when we embed as an Applet. Also, the model loads, but does not work. On the plus side, the embedded components will be lightweight.
- Basic logging - Take the Lightweight Component test class and try adding in code to log it. This will mean trying to add in a Log4J Appender:
of some kind. Even if this code doesn't work having some example they can start from will help.
- Test created, see Trac entry. We can start NetLogo in logging mode, attatch our own appender, and catch the events as they come in. We can use this to listen to all changes to global variables (and buttons and anything else) in real time.
- Still needed:
- A configuration file must be passed to the App to tell it to start logging. While this could be bundled with the jar, it's a little clunky. Would it be possible to have a setting which just uses the defaults?
- When NetLogo starts in logging mode, it asks for the user's name. Can this be turned off?
- Multiple instance logging - write pseudo code to do the same for multiple instances.
Multiple Instances Test
Copy the code in the Lightweight Component test class, and add a second LiteApplet. Verify this doesn't work properly.
- Basic controlling - Take the Lightweight Component test class and try adding in code to control it using App.app.command method. Check if this works, if it doesn't work then ask them to make it work.
- Multiple instance controlling - Take the multiple instance test class and add pseudo code to control each instance. There doesn't appear to be api to do this, so that is why it is pseudo code.
Tasks for NetLogo Team