NetLogo API
version 3.0.2
A B C D E F G H I L M N O P R S T U W

A

Agent - interface org.nlogo.api.Agent.
Interface provides access to NetLogo agents.
App - class org.nlogo.app.App.
The main class for the complete NetLogo application.
Argument - interface org.nlogo.api.Argument.
Interface provides access to arguments passed to the perform or report methods of a primitive at run-time.
addConfigurable(Configurable) - Method in interface org.nlogo.api.PrimitiveManager
 
addHelpMenu(JMenuBar) - Method in class org.nlogo.app.App
 
addLinkComponent(Object) - Method in class org.nlogo.app.App
Internal use only.
addPrimitive(String, Primitive) - Method in interface org.nlogo.api.PrimitiveManager
Adds a new primitive.
app - Static variable in class org.nlogo.app.App
Once main() has been called, holds the singleton instance of this class.
attachCurrentDirectory(String) - Method in interface org.nlogo.api.Context
Transforms a relative path to an absolute path by prepending the current working directory.
attachModelDir(String) - Method in interface org.nlogo.api.Context
Transforms a relative path to a model into an absolute path by prepending the current model directory.

B

BLACK - Static variable in class org.nlogo.api.Color
 
BOXED_BLACK - Static variable in class org.nlogo.api.Color
 
BOXED_WHITE - Static variable in class org.nlogo.api.Color
 

C

COMMAND_PRECEDENCE - Static variable in class org.nlogo.api.Syntax
 
ClassManager - interface org.nlogo.api.ClassManager.
Interface specifies the main class of a NetLogo extension.
Color - class org.nlogo.api.Color.
 
Command - interface org.nlogo.api.Command.
Interface for NetLogo extension commands.
CompilerException - exception org.nlogo.compiler.CompilerException.
Exception thrown by various methods that accept NetLogo code as input and cause that code to be compiled; indicates the code was invalid.
CompilerException(String, Token) - Constructor for class org.nlogo.compiler.CompilerException
 
Configurable - interface org.nlogo.api.Configurable.
A marker interface for a class that is configurable.
Context - interface org.nlogo.api.Context.
Provides access to the current execution environment.
clearAll() - Method in class org.nlogo.headless.HeadlessWorkspace
 
clearDrawing() - Method in class org.nlogo.headless.HeadlessWorkspace
 
clearOutput() - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
command(String) - Method in class org.nlogo.app.App
Runs NetLogo commands and waits for them to complete.
command(String) - Method in class org.nlogo.headless.HeadlessWorkspace
Runs NetLogo commands and waits for them to complete.
commandLater(String) - Method in class org.nlogo.app.App
Runs NetLogo commands in the background.
commandSyntax() - Static method in class org.nlogo.api.Syntax
Returns an EMPTY_SYNTAX Object for commands with no arguments.
commandSyntax(int[]) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for commands with one or more right arguments.
commandSyntax(int[], int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for commands with a variable number of arguments.
compile() - Method in class org.nlogo.app.App
Recompiles the model.
createFileMenu() - Method in class org.nlogo.app.App
 
createPatchesNotify() - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
createToolsMenu() - Method in class org.nlogo.app.App
 
createZoomMenu() - Method in class org.nlogo.app.App
 

D

DefaultClassManager - class org.nlogo.api.DefaultClassManager.
An abstract, partial implementation of ClassManager that implements runOnce() and unload() with empty methods.
DefaultClassManager() - Constructor for class org.nlogo.api.DefaultClassManager
 
DefaultCommand - class org.nlogo.api.DefaultCommand.
Partial implementation of Command provides common implentations of some methods.
DefaultCommand() - Constructor for class org.nlogo.api.DefaultCommand
 
DefaultReporter - class org.nlogo.api.DefaultReporter.
Partial implementation of Reporter provides common implentations of some methods.
DefaultReporter() - Constructor for class org.nlogo.api.DefaultReporter
 

E

ExtensionException - exception org.nlogo.api.ExtensionException.
Wrapper class for exceptions thrown by NetLogo extensions.
ExtensionException(String) - Constructor for class org.nlogo.api.ExtensionException
Creates a new ExtensionException
ExtensionException(Exception) - Constructor for class org.nlogo.api.ExtensionException
Creates a new ExtensionException
ExtensionManager - interface org.nlogo.api.ExtensionManager.
ExtensionManager provides some methods that can be used in runOnce
ensureRenderer() - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
exportDrawing(String, String) - Method in class org.nlogo.headless.HeadlessWorkspace
 
exportDrawingToCSV(PrintWriter) - Method in class org.nlogo.headless.HeadlessWorkspace
 
exportGraphics(String, String) - Method in class org.nlogo.headless.HeadlessWorkspace
 
exportInterface(String) - Method in class org.nlogo.headless.HeadlessWorkspace
Not implemented.
exportOutput(String) - Method in class org.nlogo.headless.HeadlessWorkspace
 
exportOutputAreaToCSV(PrintWriter) - Method in class org.nlogo.headless.HeadlessWorkspace
 

F

findCentralColorNumber(double) - Static method in class org.nlogo.api.Color
 

G

generateModelTest(String) - Method in class org.nlogo.headless.HeadlessWorkspace
 
generateModelTests() - Static method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
get() - Method in interface org.nlogo.api.Argument
Returns the argument as an Object without type checking.
getARGBByIndex(int) - Static method in class org.nlogo.api.Color
 
getARGBbyPremodulatedColorNumber(double) - Static method in class org.nlogo.api.Color
 
getAgent() - Method in interface org.nlogo.api.Argument
Returns the argument as an Agent.
getAgent() - Method in interface org.nlogo.api.Context
Returns the agent that is currently executing this code.
getAgentClassString() - Method in class org.nlogo.api.DefaultCommand
Indicates that this primitive can be used by any agent.
getAgentClassString() - Method in class org.nlogo.api.DefaultReporter
Indicates that this primitive can be used by any agent.
getAgentClassString() - Method in interface org.nlogo.api.Primitive
Returns a String which specifies in which context this primitive is allowed.
getAndCreateDrawing() - Method in class org.nlogo.headless.HeadlessWorkspace
 
getBoolean() - Method in interface org.nlogo.api.Argument
Returns the argument as a Boolean
getBooleanValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as a boolean
getClosestColorNameByARGB(int) - Static method in class org.nlogo.api.Color
 
getClosestColorNumberByARGB(int) - Static method in class org.nlogo.api.Color
 
getClosestColorNumberByHSB(float, float, float) - Static method in class org.nlogo.api.Color
 
getColorIndexByName(String) - Static method in class org.nlogo.api.Color
 
getColorNameByIndex(int) - Static method in class org.nlogo.api.Color
 
getColorNamesArray() - Static method in class org.nlogo.api.Color
 
getColorNumberByIndex(int) - Static method in class org.nlogo.api.Color
 
getColorUnder(double, double) - Method in class org.nlogo.headless.HeadlessWorkspace
 
getConfigurables() - Method in interface org.nlogo.api.PrimitiveManager
 
getDefaultShape() - Method in class org.nlogo.headless.HeadlessWorkspace
 
getDfault() - Method in class org.nlogo.api.Syntax
 
getDoubleValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as a double.
getDrawing() - Method in interface org.nlogo.api.Context
Returns the drawing image. ( experimental )
getEndPosition() - Method in class org.nlogo.compiler.CompilerException
Returns the index of the end of the portion of the code in which the error was found.
getFileName() - Method in class org.nlogo.compiler.CompilerException
 
getFloatValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as a float.
getGraphics() - Method in class org.nlogo.headless.HeadlessWorkspace
Get a snapshot of the 2D view.
getHSBListByARGB(int) - Static method in class org.nlogo.api.Color
 
getIntegerValue() - Method in interface org.nlogo.api.Argument
Returns the value of the argument as an int.
getLeft() - Method in class org.nlogo.api.Syntax
 
getLinkComponents() - Method in class org.nlogo.app.App
Internal use only.
getList() - Method in interface org.nlogo.api.Argument
Returns the argument as a org.nlogo.api.LogoList
getNumber() - Method in interface org.nlogo.api.Argument
Returns the argument as a Number.
getOffset() - Method in class org.nlogo.compiler.CompilerException
 
getPatch() - Method in interface org.nlogo.api.Argument
Returns the argument as an org.nlogo.api.Patch
getPrecedence() - Method in class org.nlogo.api.Syntax
 
getProcedures() - Method in class org.nlogo.app.App
Returns the contents of the Procedures tab.
getRGBListByARGB(int) - Static method in class org.nlogo.api.Color
 
getRGBUnder(double, double) - Method in class org.nlogo.headless.HeadlessWorkspace
 
getRet() - Method in class org.nlogo.api.Syntax
 
getRight() - Method in class org.nlogo.api.Syntax
 
getStartPosition() - Method in class org.nlogo.compiler.CompilerException
Returns the index of the start of the portion of the code in which the error was found.
getString() - Method in interface org.nlogo.api.Argument
Returns the argument as a String
getSwitchesBoolean() - Method in interface org.nlogo.api.Command
Specifies whether NetLogo should "switch" to another turtle after running this command.
getSwitchesBoolean() - Method in class org.nlogo.api.DefaultCommand
Indicates that NetLogo does not need to switch agents after executing this command.
getSyntax() - Method in class org.nlogo.api.DefaultCommand
Indicates that this command takes no arguments.
getSyntax() - Method in class org.nlogo.api.DefaultReporter
Indicates that this reporter takes no arguments and returns a number.
getSyntax() - Method in interface org.nlogo.api.Primitive
Returns Syntax which specifies the syntax that is acceptable for this primitive.
getTurtle() - Method in interface org.nlogo.api.Argument
Returns the argument as a org.nlogo.api.Turtle.

H

HeadlessWorkspace - class org.nlogo.headless.HeadlessWorkspace.
The main class for headless (no GUI) operation of NetLogo.
HeadlessWorkspace() - Constructor for class org.nlogo.headless.HeadlessWorkspace
Makes a new instance of NetLogo capable of running a model "headless", with no GUI.
halt() - Method in class org.nlogo.headless.HeadlessWorkspace
Halts all running NetLogo code in this workspace.
handle(Throwable) - Method in class org.nlogo.app.App
Internal use only.
handleAppEvent(AppEvent) - Method in class org.nlogo.app.App
Internal use only.
handleBeforeLoadEvent(BeforeLoadEvent) - Method in class org.nlogo.app.App
Internal use only.
handleLoadBeginEvent(LoadBeginEvent) - Method in class org.nlogo.app.App
Internal use only.
handleLoadEndEvent(LoadEndEvent) - Method in class org.nlogo.app.App
Internal use only.
handleModelSavedEvent(ModelSavedEvent) - Method in class org.nlogo.app.App
Internal use only.
handleSwitchedTabsEvent(SwitchedTabsEvent) - Method in class org.nlogo.app.App
Internal use only.

I

importDrawing(File) - Method in class org.nlogo.headless.HeadlessWorkspace
 
initForTesting(int, int, String) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
initForTesting(int, int) - Method in class org.nlogo.headless.HeadlessWorkspace
 
initModel() - Method in class org.nlogo.headless.HeadlessWorkspace
 
initializeHubNet() - Method in interface org.nlogo.api.ExtensionManager
Intializes the HubNetManager, this method should be called if the extension intends to use HubNet.
inspectAgent(Class, Agent) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
isCompilerTestingMode() - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
isHeadless() - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.

L

LogoException - exception org.nlogo.api.LogoException.
A runtime error that has occurred in NetLogo code.
LogoException(String) - Constructor for class org.nlogo.api.LogoException
 
LogoList - class org.nlogo.api.LogoList.
 
LogoList() - Constructor for class org.nlogo.api.LogoList
 
LogoList(int) - Constructor for class org.nlogo.api.LogoList
 
LogoList(Collection) - Constructor for class org.nlogo.api.LogoList
 
lastLogoException - Variable in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
load(PrimitiveManager) - Method in interface org.nlogo.api.ClassManager
Loads the primitives in the extension.
load(PrimitiveManager) - Method in class org.nlogo.api.DefaultClassManager
Loads the primitives in the extension.

M

MAX_COLOR - Static variable in class org.nlogo.api.Color
 
MAX_PRECEDENCE - Static variable in class org.nlogo.api.Syntax
 
magicOpen(String) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
main(String[]) - Static method in class org.nlogo.app.App
Should be called once at startup to create the application and start it running.
main(String[]) - Static method in class org.nlogo.headless.HeadlessWorkspace
 
makeWidget(String) - Method in class org.nlogo.app.App
Adds new widget to Interface tab given its specification, in the same (undocumented) format found in a saved model.
modulateDouble(Double) - Static method in class org.nlogo.api.Color
 
modulateDouble(double) - Static method in class org.nlogo.api.Color
 
modulateInteger(Integer) - Static method in class org.nlogo.api.Color
 
modulateInteger(int) - Static method in class org.nlogo.api.Color
 

N

NORMAL_PRECEDENCE - Static variable in class org.nlogo.api.Syntax
 
NUM_HUES - Static variable in class org.nlogo.api.Color
 
newInstance(String) - Method in interface org.nlogo.api.Command
Returns a new instance of this Command.
newInstance(String) - Method in class org.nlogo.api.DefaultCommand
Returns a new instance of this class, created by invoking the empty constructor.
newInstance(String) - Method in class org.nlogo.api.DefaultReporter
Returns a new instance of this class, created by invoking the empty constructor.
newInstance(String) - Method in interface org.nlogo.api.Reporter
Returns a new instance of this Reporter.

O

open(String) - Method in class org.nlogo.app.App
Opens a model stored in a file.
open(String) - Method in class org.nlogo.headless.HeadlessWorkspace
Opens a model stored in a file.
openFromSource(String, String) - Method in class org.nlogo.app.App
Opens a model stored in a string.
openFromSource(String) - Method in class org.nlogo.headless.HeadlessWorkspace
Opens a model stored in a string.
org.nlogo.api - package org.nlogo.api
Provides classes associated with the NetLogo Extensions API.
outputAreaBuffer - Variable in class org.nlogo.headless.HeadlessWorkspace
 
ownerFinished(JobOwner) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.

P

Patch - interface org.nlogo.api.Patch.
Interface provides access to NetLogo patches.
Primitive - interface org.nlogo.api.Primitive.
Top-level interface for primitives (commands or reporters).
PrimitiveManager - interface org.nlogo.api.PrimitiveManager.
PrimitiveManager ships extension primitives and associated names to NetLogo.
patchSize(double) - Method in class org.nlogo.headless.HeadlessWorkspace
 
patchSize() - Method in class org.nlogo.headless.HeadlessWorkspace
 
pauseProgram() - Method in interface org.nlogo.api.Context
Undocumented method.
perform(Argument[], Context) - Method in interface org.nlogo.api.Command
Executes this Command.
periodicUpdate() - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
pressButton(String) - Method in class org.nlogo.app.App
Not currently supported.
protocolFromModel(String) - Method in class org.nlogo.headless.HeadlessWorkspace
 
protocolLines - Variable in class org.nlogo.headless.HeadlessWorkspace
 

R

Reporter - interface org.nlogo.api.Reporter.
Interface for NetLogo reporters.
renderer - Variable in class org.nlogo.headless.HeadlessWorkspace
 
report(Argument[], Context) - Method in interface org.nlogo.api.Reporter
Executes this Reporter.
report(String) - Method in class org.nlogo.app.App
Runs a NetLogo reporter.
report(String) - Method in class org.nlogo.headless.HeadlessWorkspace
Runs a NetLogo reporter.
reporterSyntax(int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with no arguments
reporterSyntax(int, int[], int, int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with infix arguments.
reporterSyntax(int[], int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with one or more right arguments
reporterSyntax(int[], int, int) - Static method in class org.nlogo.api.Syntax
Returns a Syntax for reporters with a variable number of arguments.
requestFocus() - Method in class org.nlogo.app.App
Internal use only.
resizeWorld(int, int) - Method in class org.nlogo.app.App
Kills all turtles, clears all patch variables, and makes a new patch grid.
resizeWorld() - Method in class org.nlogo.headless.HeadlessWorkspace
 
resumeProgram() - Method in interface org.nlogo.api.Context
Undocumented method.
retrieveObject() - Method in interface org.nlogo.api.ExtensionManager
Returns the stored object.
rgbToLogoObject(int) - Static method in class org.nlogo.api.Color
 
runCommand(String, boolean) - Method in interface org.nlogo.api.Context
Runs a command as if it were written in the Command Center.
runExperiment(String, int, PrintWriter) - Method in class org.nlogo.headless.HeadlessWorkspace
Runs a BehaviorSpace experiment.
runExperiment(File, int, PrintWriter) - Method in class org.nlogo.headless.HeadlessWorkspace
Runs a BehaviorSpace experiment.
runExperiment(File, String, int, PrintWriter) - Method in class org.nlogo.headless.HeadlessWorkspace
Runs a BehaviorSpace experiment.
runExperimentFromModel(String) - Method in class org.nlogo.headless.HeadlessWorkspace
 
runExperimentFromModel(String, int, PrintWriter) - Method in class org.nlogo.headless.HeadlessWorkspace
Runs a BehaviorSpace experiment.
runOnce(ExtensionManager) - Method in interface org.nlogo.api.ClassManager
Initializes the extension.
runOnce(ExtensionManager) - Method in class org.nlogo.api.DefaultClassManager
Empty implementation.
runReporter(String) - Method in interface org.nlogo.api.Context
Runs a reporter as if it were written in the Command Center.
runtimeError(JobOwner, Context, Instruction, Exception) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.

S

SPREADSHEET - Static variable in class org.nlogo.headless.HeadlessWorkspace
constant for specifying format of BehaviorSpace output
Syntax - class org.nlogo.api.Syntax.
Specifies the arguments accepted by a primitive.
selectTab(int) - Method in class org.nlogo.app.App
Switches tabs.
setCompilerTestingMode(boolean) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
setImporterErrorHandler(Importer.ErrorHandler) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
setModelPath(String) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
setModelType(int) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
setOffset(int) - Method in class org.nlogo.compiler.CompilerException
 
setProcedures(String) - Method in class org.nlogo.app.App
Replaces the contents of the Procedures tab.
setScreenEdges(int, int) - Method in class org.nlogo.headless.HeadlessWorkspace
Kills all turtles, clears all patch variables, and makes a new patch grid.
setSpotlightSize(double) - Method in class org.nlogo.headless.HeadlessWorkspace
 
setVariable(Argument, Object) - Method in interface org.nlogo.api.Context
Undocumented method.
shapesOn(boolean) - Method in class org.nlogo.headless.HeadlessWorkspace
 
shapesOn() - Method in class org.nlogo.headless.HeadlessWorkspace
 
stamp(Turtle) - Method in class org.nlogo.headless.HeadlessWorkspace
 
storeObject(Object) - Method in interface org.nlogo.api.ExtensionManager
Stores an object for the extension that can be retrieved in runOnce if the extension is loaded again.

T

TABLE - Static variable in class org.nlogo.headless.HeadlessWorkspace
constant for specifying format of BehaviorSpace output
TEST_DECLARATIONS - Static variable in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
TYPE_AGENT - Static variable in class org.nlogo.api.Syntax
Type constant for set of agents.
TYPE_AGENTSET - Static variable in class org.nlogo.api.Syntax
Type constant for set of agents.
TYPE_BOOLEAN - Static variable in class org.nlogo.api.Syntax
Type constant for boolean.
TYPE_BOOLEAN_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_BRACKETED - Static variable in class org.nlogo.api.Syntax
 
TYPE_COMMAND_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_FLOAT - Static variable in class org.nlogo.api.Syntax
Unsupported.
TYPE_INTEGER - Static variable in class org.nlogo.api.Syntax
Unsupported.
TYPE_LIST - Static variable in class org.nlogo.api.Syntax
Type constant for list.
TYPE_NOBODY - Static variable in class org.nlogo.api.Syntax
 
TYPE_NUMBER - Static variable in class org.nlogo.api.Syntax
Type constant for number (integer or floating point).
TYPE_NUMBER_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_OTHER_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_PATCH - Static variable in class org.nlogo.api.Syntax
Type constant for set of patch.
TYPE_PATCHSET - Static variable in class org.nlogo.api.Syntax
Type constant for set of patches.
TYPE_READABLE - Static variable in class org.nlogo.api.Syntax
 
TYPE_REFERENCE - Static variable in class org.nlogo.api.Syntax
 
TYPE_REPEATABLE - Static variable in class org.nlogo.api.Syntax
 
TYPE_REPORTER_BLOCK - Static variable in class org.nlogo.api.Syntax
 
TYPE_STRING - Static variable in class org.nlogo.api.Syntax
Type constant for string.
TYPE_TURTLE - Static variable in class org.nlogo.api.Syntax
Type constant for set of turtle.
TYPE_TURTLESET - Static variable in class org.nlogo.api.Syntax
Type constant for set of turtles.
TYPE_VOID - Static variable in class org.nlogo.api.Syntax
Unsupported.
TYPE_WILDCARD - Static variable in class org.nlogo.api.Syntax
 
TestColor - class org.nlogo.api.TestColor.
 
TestColor(String) - Constructor for class org.nlogo.api.TestColor
 
Turtle - interface org.nlogo.api.Turtle.
Interface provides access to NetLogo turtles.
testModulate() - Method in class org.nlogo.api.TestColor
 
toString() - Method in class org.nlogo.compiler.CompilerException
Synonymous with getDescription().
translateSavedColor(int) - Static method in class org.nlogo.api.Color
 

U

unload() - Method in interface org.nlogo.api.ClassManager
Cleans up the extension.
unload() - Method in class org.nlogo.api.DefaultClassManager
Empty implementation.
updateDisplay(boolean) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.

W

WHITE - Static variable in class org.nlogo.api.Color
 
waitFor(CommandRunnable) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
waitForQueuedEvents() - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
waitForResult(ReporterRunnable) - Method in class org.nlogo.headless.HeadlessWorkspace
Internal use only.
workspace - Variable in class org.nlogo.app.App
 
writeGraphicsData(PrintWriter) - Method in class org.nlogo.headless.HeadlessWorkspace
 

A B C D E F G H I L M N O P R S T U W
NetLogo API
version 3.0.2