org.nlogo.nvm
Class DummyWorkspace

java.lang.Object
  extended by org.nlogo.api.DummyCompilerServices
      extended by org.nlogo.nvm.DummyWorkspace
All Implemented Interfaces:
org.nlogo.api.CompilerServices, ImporterUser, RandomServices, WorldResizer, JobManagerOwner, Workspace, scala.ScalaObject

public class DummyWorkspace
extends org.nlogo.api.DummyCompilerServices
implements Workspace


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nlogo.nvm.Workspace
Workspace.BehaviorSpaceFormat, Workspace.OutputDestination, Workspace.UpdateMode
 
Constructor Summary
DummyWorkspace()
           
 
Method Summary
 void addJobFromJobThread(Job job)
           
 org.nlogo.api.AggregateManagerInterface aggregateManager()
           
 String attachModelDir(String filePath)
           
 org.nlogo.util.MersenneTwisterFast auxRNG()
           
 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 currentPlot(String plot)
           
 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()
           
 PlotInterface getPlot(String plot)
           
 Map<String,Procedure> getProcedures()
           
 void importDrawing(String path)
           
 void importExtensionData(String name, List<String[]> data, ImportErrorHandler handler)
           
 void importWorld(String path)
           
 void inspectAgent(Agent agent, double radius)
           
 void inspectAgent(Class<? extends Agent> agentClass, Agent agent, double radius)
           
 boolean isExtensionName(String name)
           
 boolean isHeadless()
           
 void joinForeverButtons(Agent agent)
           
 LogoException lastLogoException()
           
 WeakHashMap<Job,WeakHashMap<Agent,WeakHashMap<Command,MutableLong>>> lastRunTimes()
           
 void magicOpen(String name)
           
 org.nlogo.util.MersenneTwisterFast mainRNG()
           
 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)
           
 void ownerFinished(JobOwner owner)
           
 double patchSize()
           
 void patchSize(double patchSize)
           
 void perhapsUpdateDisplay()
           
 void periodicUpdate()
           
 Object plotManager()
           
 void requestDisplayUpdate(boolean force)
           
 void resizeView()
           
 boolean runCompiledCommands(Procedure procedure)
           
 Object runCompiledReporter(Procedure procedure)
           
 Object runCompiledReporter(Procedure procedure, org.nlogo.util.MersenneTwisterFast rng)
           
 void runtimeError(JobOwner owner, Context context, Instruction instruction, Exception ex)
           
 void setDimensions(WorldDimensions dim)
           
 void setDimensions(WorldDimensions dim, double patchSize)
           
 void setModelPath(String path)
           
 void setOutputAreaContents(String text)
           
 void setProcedures(Map<String,Procedure> procedures)
           
 void startLogging(String properties)
           
 void updateDisplay(boolean haveWorldLockAlready)
           
 void waitFor(CommandRunnable runnable)
           
 void waitForQueuedEvents()
           
<T> T
waitForResult(ReporterRunnable<T> runnable)
           
 World world()
           
 void zipLogFiles(String filename)
           
 
Methods inherited from class org.nlogo.api.DummyCompilerServices
autoConvert, checkCommandSyntax, checkReporterSyntax, findProcedurePositions, getTokenAtPosition, isValidIdentifier, readFromString, readNumberFromString, tokenizeForColorization
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nlogo.api.CompilerServices
autoConvert, checkCommandSyntax, checkReporterSyntax, findProcedurePositions, getTokenAtPosition, isValidIdentifier, readFromString, readNumberFromString, tokenizeForColorization
 

Constructor Detail

DummyWorkspace

public DummyWorkspace()
Method Detail

world

public World world()
Specified by:
world in interface Workspace

getProcedures

public Map<String,Procedure> getProcedures()
Specified by:
getProcedures in interface Workspace

setProcedures

public void setProcedures(Map<String,Procedure> procedures)
Specified by:
setProcedures in interface Workspace

aggregateManager

public org.nlogo.api.AggregateManagerInterface aggregateManager()
Specified by:
aggregateManager in interface Workspace

requestDisplayUpdate

public void requestDisplayUpdate(boolean force)
Specified by:
requestDisplayUpdate in interface Workspace

perhapsUpdateDisplay

public void perhapsUpdateDisplay()
Specified by:
perhapsUpdateDisplay in interface Workspace

joinForeverButtons

public void joinForeverButtons(Agent agent)
Specified by:
joinForeverButtons in interface Workspace

addJobFromJobThread

public void addJobFromJobThread(Job job)
Specified by:
addJobFromJobThread in interface Workspace

getExtensionManager

public ExtensionManager getExtensionManager()
Specified by:
getExtensionManager in interface Workspace

waitFor

public void waitFor(CommandRunnable runnable)
Specified by:
waitFor in interface Workspace

waitForResult

public <T> T waitForResult(ReporterRunnable<T> runnable)
Specified by:
waitForResult in interface Workspace

importWorld

public void importWorld(String path)
Specified by:
importWorld in interface Workspace

importDrawing

public void importDrawing(String path)
Specified by:
importDrawing in interface Workspace

clearDrawing

public void clearDrawing()
Specified by:
clearDrawing in interface Workspace

exportDrawing

public void exportDrawing(String path,
                          String format)
Specified by:
exportDrawing in interface Workspace

exportView

public void exportView(String path,
                       String format)
Specified by:
exportView in interface Workspace

exportView

public BufferedImage exportView()
Specified by:
exportView in interface Workspace

exportInterface

public void exportInterface(String path)
Specified by:
exportInterface in interface Workspace

exportWorld

public void exportWorld(String path)
Specified by:
exportWorld in interface Workspace

exportOutput

public void exportOutput(String path)
Specified by:
exportOutput in interface Workspace

exportPlot

public void exportPlot(String plotName,
                       String path)
Specified by:
exportPlot in interface Workspace

exportAllPlots

public void exportAllPlots(String path)
Specified by:
exportAllPlots in interface Workspace

inspectAgent

public void inspectAgent(Agent agent,
                         double radius)
Specified by:
inspectAgent in interface Workspace

inspectAgent

public void inspectAgent(Class<? extends Agent> agentClass,
                         Agent agent,
                         double radius)
Specified by:
inspectAgent in interface Workspace

getAndCreateDrawing

public BufferedImage getAndCreateDrawing()
Specified by:
getAndCreateDrawing in interface Workspace

getHubNetManager

public HubNetInterface getHubNetManager()
Specified by:
getHubNetManager in interface Workspace

waitForQueuedEvents

public void waitForQueuedEvents()
Specified by:
waitForQueuedEvents in interface Workspace

outputObject

public void outputObject(Object object,
                         Object owner,
                         boolean addNewline,
                         boolean readable,
                         Workspace.OutputDestination destination)
Specified by:
outputObject in interface Workspace

clearOutput

public void clearOutput()
Specified by:
clearOutput in interface Workspace

clearAll

public void clearAll()
Specified by:
clearAll in interface Workspace

compileForRun

public Procedure compileForRun(String source,
                               Context context,
                               boolean reporter)
Specified by:
compileForRun in interface Workspace

convertToNormal

public void convertToNormal()
Specified by:
convertToNormal in interface Workspace

getModelPath

public String getModelPath()
Specified by:
getModelPath in interface Workspace

setModelPath

public void setModelPath(String path)
Specified by:
setModelPath in interface Workspace

getModelDir

public String getModelDir()
Specified by:
getModelDir in interface Workspace

getModelFileName

public String getModelFileName()
Specified by:
getModelFileName in interface Workspace

fileManager

public FileManager fileManager()
Specified by:
fileManager in interface Workspace

plotManager

public Object plotManager()
Specified by:
plotManager in interface Workspace

attachModelDir

public String attachModelDir(String filePath)
Specified by:
attachModelDir in interface Workspace

evaluateCommands

public void evaluateCommands(String source)
Specified by:
evaluateCommands in interface Workspace

evaluateCommands

public void evaluateCommands(String source,
                             Agent agent,
                             boolean waitForCompletion)
Specified by:
evaluateCommands in interface Workspace

evaluateCommands

public void evaluateCommands(String source,
                             Class<? extends Agent> agentClass,
                             boolean waitForCompletion)
Specified by:
evaluateCommands in interface Workspace

evaluateReporter

public Object evaluateReporter(String source)
Specified by:
evaluateReporter in interface Workspace

evaluateReporter

public Object evaluateReporter(String source,
                               Agent agent)
Specified by:
evaluateReporter in interface Workspace

compileCommands

public Procedure compileCommands(String source)
Specified by:
compileCommands in interface Workspace

compileCommands

public Procedure compileCommands(String source,
                                 Class<? extends Agent> agentClass)
Specified by:
compileCommands in interface Workspace

compileReporter

public Procedure compileReporter(String source)
Specified by:
compileReporter in interface Workspace

runCompiledCommands

public boolean runCompiledCommands(Procedure procedure)
Specified by:
runCompiledCommands in interface Workspace

runCompiledReporter

public Object runCompiledReporter(Procedure procedure)
Specified by:
runCompiledReporter in interface Workspace

runCompiledReporter

public Object runCompiledReporter(Procedure procedure,
                                  org.nlogo.util.MersenneTwisterFast rng)
Specified by:
runCompiledReporter in interface Workspace

patchSize

public double patchSize()
Specified by:
patchSize in interface Workspace

changeTopology

public void changeTopology(boolean wrapX,
                           boolean wrapY)
Specified by:
changeTopology in interface Workspace

magicOpen

public void magicOpen(String name)
Specified by:
magicOpen in interface Workspace

openIndex

public void openIndex()
Specified by:
openIndex in interface Workspace

openNext

public void openNext()
Specified by:
openNext in interface Workspace

openPrevious

public void openPrevious()
Specified by:
openPrevious in interface Workspace

startLogging

public void startLogging(String properties)
Specified by:
startLogging in interface Workspace

zipLogFiles

public void zipLogFiles(String filename)
Specified by:
zipLogFiles in interface Workspace

deleteLogFiles

public void deleteLogFiles()
Specified by:
deleteLogFiles in interface Workspace

getIsApplet

public boolean getIsApplet()
Specified by:
getIsApplet in interface Workspace

lastRunTimes

public WeakHashMap<Job,WeakHashMap<Agent,WeakHashMap<Command,MutableLong>>> lastRunTimes()
Specified by:
lastRunTimes in interface Workspace

compiler

public CompilerInterface compiler()
Specified by:
compiler in interface Workspace

open

public void open(String modelPath)
Specified by:
open in interface Workspace

openString

public void openString(String modelContents)
Specified by:
openString in interface Workspace

dispose

public void dispose()
Specified by:
dispose in interface Workspace

lastLogoException

public LogoException lastLogoException()
Specified by:
lastLogoException in interface Workspace

clearLastLogoException

public void clearLastLogoException()
Specified by:
clearLastLogoException in interface Workspace

isHeadless

public boolean isHeadless()
Specified by:
isHeadless in interface Workspace

behaviorSpaceRunNumber

public int behaviorSpaceRunNumber()
Specified by:
behaviorSpaceRunNumber in interface Workspace

behaviorSpaceRunNumber

public void behaviorSpaceRunNumber(int n)
Specified by:
behaviorSpaceRunNumber in interface Workspace

setOutputAreaContents

public void setOutputAreaContents(String text)
Specified by:
setOutputAreaContents in interface ImporterUser

currentPlot

public void currentPlot(String plot)
Specified by:
currentPlot in interface ImporterUser

getPlot

public PlotInterface getPlot(String plot)
Specified by:
getPlot in interface ImporterUser

isExtensionName

public boolean isExtensionName(String name)
Specified by:
isExtensionName in interface ImporterUser

importExtensionData

public void importExtensionData(String name,
                                List<String[]> data,
                                ImportErrorHandler handler)
Specified by:
importExtensionData in interface ImporterUser

resizeView

public void resizeView()
Specified by:
resizeView in interface WorldResizer

patchSize

public void patchSize(double patchSize)
Specified by:
patchSize in interface WorldResizer

setDimensions

public void setDimensions(WorldDimensions dim)
Specified by:
setDimensions in interface WorldResizer

setDimensions

public void setDimensions(WorldDimensions dim,
                          double patchSize)
Specified by:
setDimensions in interface WorldResizer

runtimeError

public void runtimeError(JobOwner owner,
                         Context context,
                         Instruction instruction,
                         Exception ex)
Specified by:
runtimeError in interface JobManagerOwner

ownerFinished

public void ownerFinished(JobOwner owner)
Specified by:
ownerFinished in interface JobManagerOwner

updateDisplay

public void updateDisplay(boolean haveWorldLockAlready)
Specified by:
updateDisplay in interface JobManagerOwner

periodicUpdate

public void periodicUpdate()
Specified by:
periodicUpdate in interface JobManagerOwner

auxRNG

public org.nlogo.util.MersenneTwisterFast auxRNG()
Specified by:
auxRNG in interface RandomServices

mainRNG

public org.nlogo.util.MersenneTwisterFast mainRNG()
Specified by:
mainRNG in interface RandomServices