org.nlogo.nvm
Interface Workspace

All Superinterfaces:
org.nlogo.api.CompilerServices, ImporterUser, JobManagerOwner, RandomServices, WorldResizer
All Known Implementing Classes:
AbstractWorkspace, DummyAbstractWorkspace, DummyWorkspace, HeadlessWorkspace

public interface Workspace
extends ImporterUser, JobManagerOwner, org.nlogo.api.CompilerServices, RandomServices


Nested Class Summary
static class Workspace.BehaviorSpaceFormat
           
static class Workspace.OutputDestination
           
static class Workspace.UpdateMode
           
 
Method Summary
 void addJobFromJobThread(Job job)
           
 org.nlogo.api.AggregateManagerInterface aggregateManager()
           
 String attachModelDir(String filePath)
           
 int behaviorSpaceRunNumber()
           
 void behaviorSpaceRunNumber(int n)
           
 void changeTopology(boolean wrapX, boolean wrapY)
           
 void clearAll()
           
 void clearDrawing()
           
 void clearLastLogoException()
           
 void clearOutput()
           
 Procedure compileCommands(String source)
           
 Procedure compileCommands(String source, Class<? extends Agent> agentClass)
           
 Procedure compileForRun(String source, Context context, boolean reporter)
           
 CompilerInterface compiler()
           
 Procedure compileReporter(String source)
           
 void convertToNormal()
           
 void deleteLogFiles()
           
 void dispose()
           
 void evaluateCommands(String source)
           
 void evaluateCommands(String source, Agent agent, boolean waitForCompletion)
           
 void evaluateCommands(String source, Class<? extends Agent> agentClass, boolean waitForCompletion)
           
 Object evaluateReporter(String source)
           
 Object evaluateReporter(String source, Agent agent)
           
 void exportAllPlots(String path)
           
 void exportDrawing(String path, String format)
           
 void exportInterface(String path)
           
 void exportOutput(String path)
           
 void exportPlot(String plotName, String path)
           
 BufferedImage exportView()
           
 void exportView(String path, String format)
           
 void exportWorld(String path)
           
 FileManager fileManager()
           
 BufferedImage getAndCreateDrawing()
           
 ExtensionManager getExtensionManager()
           
 HubNetInterface getHubNetManager()
           
 boolean getIsApplet()
           
 String getModelDir()
           
 String getModelFileName()
           
 String getModelPath()
           
 Map<String,Procedure> getProcedures()
           
 void importDrawing(String path)
           
 void importWorld(String path)
           
 void inspectAgent(Agent agent, double radius)
           
 void inspectAgent(Class<? extends Agent> agentClass, Agent agent, double radius)
           
 boolean isHeadless()
           
 void joinForeverButtons(Agent agent)
           
 LogoException lastLogoException()
           
 WeakHashMap<Job,WeakHashMap<Agent,WeakHashMap<Command,MutableLong>>> lastRunTimes()
           
 void magicOpen(String name)
           
 void open(String modelPath)
           
 void openIndex()
           
 void openNext()
           
 void openPrevious()
           
 void openString(String modelContents)
           
 void outputObject(Object object, Object owner, boolean addNewline, boolean readable, Workspace.OutputDestination destination)
           
 double patchSize()
           
 void perhapsUpdateDisplay()
           
 Object plotManager()
           
 void requestDisplayUpdate(boolean force)
           
 boolean runCompiledCommands(Procedure procedure)
           
 Object runCompiledReporter(Procedure procedure)
           
 Object runCompiledReporter(Procedure procedure, org.nlogo.util.MersenneTwisterFast rng)
           
 void setModelPath(String path)
           
 void setProcedures(Map<String,Procedure> procedures)
           
 void startLogging(String properties)
           
 void waitFor(CommandRunnable runnable)
           
 void waitForQueuedEvents()
           
<T> T
waitForResult(ReporterRunnable<T> runnable)
           
 World world()
           
 void zipLogFiles(String filename)
           
 
Methods inherited from interface org.nlogo.api.ImporterUser
currentPlot, getPlot, importExtensionData, isExtensionName, setOutputAreaContents
 
Methods inherited from interface org.nlogo.api.WorldResizer
patchSize, resizeView, setDimensions, setDimensions
 
Methods inherited from interface org.nlogo.nvm.JobManagerOwner
ownerFinished, periodicUpdate, runtimeError, updateDisplay
 
Methods inherited from interface org.nlogo.api.CompilerServices
autoConvert, checkCommandSyntax, checkReporterSyntax, findProcedurePositions, getTokenAtPosition, isValidIdentifier, readFromString, readNumberFromString, tokenizeForColorization
 
Methods inherited from interface org.nlogo.api.RandomServices
auxRNG, mainRNG
 

Method Detail

world

World world()

getProcedures

Map<String,Procedure> getProcedures()

setProcedures

void setProcedures(Map<String,Procedure> procedures)

aggregateManager

org.nlogo.api.AggregateManagerInterface aggregateManager()

requestDisplayUpdate

void requestDisplayUpdate(boolean force)

perhapsUpdateDisplay

void perhapsUpdateDisplay()

joinForeverButtons

void joinForeverButtons(Agent agent)

addJobFromJobThread

void addJobFromJobThread(Job job)

getExtensionManager

ExtensionManager getExtensionManager()

waitFor

void waitFor(CommandRunnable runnable)
             throws LogoException
Throws:
LogoException

waitForResult

<T> T waitForResult(ReporterRunnable<T> runnable)
                throws LogoException
Throws:
LogoException

importWorld

void importWorld(String path)
                 throws IOException
Throws:
IOException

importDrawing

void importDrawing(String path)
                   throws IOException
Throws:
IOException

clearDrawing

void clearDrawing()

exportDrawing

void exportDrawing(String path,
                   String format)
                   throws IOException
Throws:
IOException

exportView

void exportView(String path,
                String format)
                throws IOException
Throws:
IOException

exportView

BufferedImage exportView()

exportInterface

void exportInterface(String path)
                     throws IOException
Throws:
IOException

exportWorld

void exportWorld(String path)
                 throws IOException
Throws:
IOException

exportOutput

void exportOutput(String path)
                  throws IOException
Throws:
IOException

exportPlot

void exportPlot(String plotName,
                String path)
                throws IOException
Throws:
IOException

exportAllPlots

void exportAllPlots(String path)
                    throws IOException
Throws:
IOException

inspectAgent

void inspectAgent(Agent agent,
                  double radius)

inspectAgent

void inspectAgent(Class<? extends Agent> agentClass,
                  Agent agent,
                  double radius)

getAndCreateDrawing

BufferedImage getAndCreateDrawing()

getHubNetManager

HubNetInterface getHubNetManager()

waitForQueuedEvents

void waitForQueuedEvents()
                         throws LogoException
Throws:
LogoException

outputObject

void outputObject(Object object,
                  Object owner,
                  boolean addNewline,
                  boolean readable,
                  Workspace.OutputDestination destination)
                  throws LogoException
Throws:
LogoException

clearOutput

void clearOutput()

clearAll

void clearAll()
              throws LogoException
Throws:
LogoException

compileForRun

Procedure compileForRun(String source,
                        Context context,
                        boolean reporter)
                        throws CompilerException
Throws:
CompilerException

convertToNormal

void convertToNormal()
                     throws IOException
Throws:
IOException

getModelPath

String getModelPath()

setModelPath

void setModelPath(String path)

getModelDir

String getModelDir()

getModelFileName

String getModelFileName()

fileManager

FileManager fileManager()

plotManager

Object plotManager()

attachModelDir

String attachModelDir(String filePath)
                      throws MalformedURLException
Throws:
MalformedURLException

evaluateCommands

void evaluateCommands(String source)
                      throws CompilerException
Throws:
CompilerException

evaluateCommands

void evaluateCommands(String source,
                      Agent agent,
                      boolean waitForCompletion)
                      throws CompilerException
Throws:
CompilerException

evaluateCommands

void evaluateCommands(String source,
                      Class<? extends Agent> agentClass,
                      boolean waitForCompletion)
                      throws CompilerException
Throws:
CompilerException

evaluateReporter

Object evaluateReporter(String source)
                        throws CompilerException
Throws:
CompilerException

evaluateReporter

Object evaluateReporter(String source,
                        Agent agent)
                        throws CompilerException
Throws:
CompilerException

compileCommands

Procedure compileCommands(String source)
                          throws CompilerException
Throws:
CompilerException

compileCommands

Procedure compileCommands(String source,
                          Class<? extends Agent> agentClass)
                          throws CompilerException
Throws:
CompilerException

compileReporter

Procedure compileReporter(String source)
                          throws CompilerException
Throws:
CompilerException

runCompiledCommands

boolean runCompiledCommands(Procedure procedure)

runCompiledReporter

Object runCompiledReporter(Procedure procedure)

runCompiledReporter

Object runCompiledReporter(Procedure procedure,
                           org.nlogo.util.MersenneTwisterFast rng)

dispose

void dispose()
             throws InterruptedException
Throws:
InterruptedException

patchSize

double patchSize()

changeTopology

void changeTopology(boolean wrapX,
                    boolean wrapY)

open

void open(String modelPath)
          throws IOException,
                 CompilerException,
                 LogoException
Throws:
IOException
CompilerException
LogoException

openString

void openString(String modelContents)
                throws CompilerException,
                       LogoException
Throws:
CompilerException
LogoException

magicOpen

void magicOpen(String name)

openIndex

void openIndex()

openNext

void openNext()

openPrevious

void openPrevious()

startLogging

void startLogging(String properties)

zipLogFiles

void zipLogFiles(String filename)

deleteLogFiles

void deleteLogFiles()

getIsApplet

boolean getIsApplet()

compiler

CompilerInterface compiler()

isHeadless

boolean isHeadless()

behaviorSpaceRunNumber

int behaviorSpaceRunNumber()

behaviorSpaceRunNumber

void behaviorSpaceRunNumber(int n)

lastLogoException

LogoException lastLogoException()

clearLastLogoException

void clearLastLogoException()

lastRunTimes

WeakHashMap<Job,WeakHashMap<Agent,WeakHashMap<Command,MutableLong>>> lastRunTimes()