Runs NetLogo commands and waits for them to complete.
Runs NetLogo commands and waits for them to complete.
This method must not be called from the AWT event queue thread or while that thread is blocked. It is an error to do so.
The command or commands to run
if the code fails to compile
IllegalStateExceptionif called from the AWT event queue thread
#commandLater
Runs NetLogo commands in the background.
Runs NetLogo commands in the background. Returns immediately, without waiting for the commands to finish.
This method may be called from any thread.
The command or commands to run
if the code fails to compile
#command
Recompiles the model.
Recompiles the model. Useful after calling
setProcedures()
.
#setProcedures
Returns the contents of the Code tab.
Returns the contents of the Code tab.
contents of Code tab
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Internal use only.
Adds new widget to Interface tab given its specification, in the same (undocumented) format found in a saved model.
Adds new widget to Interface tab given its specification, in the same (undocumented) format found in a saved model.
the widget specification
Opens a model stored in a file.
Opens a model stored in a file.
the path (absolute or relative) of the NetLogo model to open.
Opens a model stored in a string.
Opens a model stored in a string.
Model name (will appear in the main window's title bar)
The complete model, including widgets and so forth, in the same format as it would be stored in a file.
Not currently supported.
Not currently supported. For now, use command
or commandLater()
instead.
the button to press
#commandLater
,#command
Quits NetLogo by exiting the JVM.
Quits NetLogo by exiting the JVM. Asks user for confirmation first if they have unsaved changes. If the user confirms, calls System.exit(0).
Runs a NetLogo reporter.
Runs a NetLogo reporter.
This method must not be called from the AWT event queue thread or while that thread is blocked. It is an error to do so.
The reporter to run
the result reported; may be of type java.lang.Integer, java.lang.Double,
java.lang.Boolean, java.lang.String, org.nlogo.api.LogoList
,
org.nlogo.api.Agent
, AgentSet, or Nobody
if the code fails to compile
IllegalStateExceptionif called from the AWT event queue thread
Switches tabs.
Switches tabs.
which tab to switch to. 0 is the Interface tab, 1 the Info tab, 2 the Code tab, 3 the Errors tab.
Replaces the contents of the Code tab.
Replaces the contents of the Code tab. Does not recompile the model.
new contents
#compile
Internal use only.