Package

org.nlogo

api

Permalink

package api

Provides classes associated with the NetLogo Extensions API and Controlling API.

For discussion and sample code, please see the NetLogo User Manual.

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. api
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait Agent extends AnyRef

    Permalink

    NetLogo agents include turtles, patches, links and the observer.

  2. class AgentException extends Exception

    Permalink
  3. trait AgentSet extends AnyRef

    Permalink

    Interface provides access to NetLogo agentsets.

    Interface provides access to NetLogo agentsets. NetLogo agentsets may be composed of turtles, patches, or links (but an agentset may not contain a mix of different agent types.)

    In order to perform some functions on AgentSets you may need to cast to org.nlogo.agent.AgentSet.

  4. final class AgentVariableNumbers extends AnyRef

    Permalink
  5. trait AggregateManagerInterface extends SourceOwner with Saveable

    Permalink
  6. trait Argument extends AnyRef

    Permalink

    Interface provides access to arguments passed to the perform or report methods of a primitive at run-time.

    Interface provides access to arguments passed to the perform or report methods of a primitive at run-time.

    Arguments are created by NetLogo and passed to the perform or report methods of your primitive.

    See also

    Reporter#report(Argument[], Context)

    Command#perform(Argument[], Context)

  7. class CSV extends AnyRef

    Permalink
  8. trait ClassManager extends AnyRef

    Permalink
  9. trait Command extends Primitive

    Permalink

    Interface for NetLogo extension commands.

    Interface for NetLogo extension commands. Commands are primitives that do not return a value. All new commands must implement this interface.

  10. trait CommandLogoThunk extends AnyRef

    Permalink
  11. trait CommandRunnable extends AnyRef

    Permalink
  12. trait CommandTask extends Task

    Permalink
  13. class CompilerException extends Exception

    Permalink

    Exception thrown by various methods that accept NetLogo code as input and cause that code to be compiled; indicates the code was invalid.

    Exception thrown by various methods that accept NetLogo code as input and cause that code to be compiled; indicates the code was invalid. May be inspected to discover the location and nature of the error.

  14. trait CompilerServices extends AnyRef

    Permalink
  15. trait Context extends AnyRef

    Permalink

    Provides access to the current execution environment.

  16. abstract class DefaultClassManager extends ClassManager

    Permalink
  17. abstract class DefaultCommand extends Command

    Permalink

    Partial implementation of Command provides common implentations of some methods.

    Partial implementation of Command provides common implentations of some methods. Implements every method except Command.perform(...).

  18. abstract class DefaultReporter extends Reporter

    Permalink

    Partial implementation of Reporter provides common implementations of some methods.

    Partial implementation of Reporter provides common implementations of some methods. Implements every method except report(...).

  19. trait Drawing3D extends AnyRef

    Permalink
  20. trait DrawingInterface extends AnyRef

    Permalink
  21. trait DrawingLine3D extends AnyRef

    Permalink
  22. class DummyCompilerServices extends CompilerServices

    Permalink
  23. trait DummyEditable extends Editable with DummyErrorHandler

    Permalink
  24. trait DummyErrorHandler extends AnyRef

    Permalink
  25. class DummyExtensionManager extends ExtensionManager

    Permalink
  26. class DummyLogoThunkFactory extends LogoThunkFactory

    Permalink
  27. trait Editable extends AnyRef

    Permalink
  28. trait EditorAreaInterface extends AnyRef

    Permalink
  29. class ErrorSource extends AnyRef

    Permalink
  30. class ExtensionException extends Exception

    Permalink

    Wrapper class for exceptions thrown by NetLogo extensions.

  31. trait ExtensionManager extends AnyRef

    Permalink

    ExtensionManager provides some methods that can be used in runOnce

    ExtensionManager provides some methods that can be used in runOnce

  32. trait ExtensionObject extends AnyRef

    Permalink

    Interface which all NetLogo objects defined in Extensions must support

  33. abstract class File extends AnyRef

    Permalink
  34. sealed trait FileMode extends AnyRef

    Permalink
  35. class Graphics2DWrapper extends GraphicsInterface

    Permalink
  36. trait GraphicsInterface extends AnyRef

    Permalink
  37. trait HubNetInterface extends ViewInterface with BufSaveable

    Permalink
  38. trait HubNetWorkspaceInterface extends CompilerServices

    Permalink
  39. trait I18NJava extends AnyRef

    Permalink
  40. trait ImportErrorHandler extends AnyRef

    Permalink
  41. trait ImporterUser extends WorldResizer

    Permalink
  42. trait JobOwner extends SourceOwner

    Permalink

    Like source owners, job owners are usually parts of the UI.

    Like source owners, job owners are usually parts of the UI. Jobs are initiated by by buttons, by monitors, by the Command Center, and so on.

    The (assorted, disparate) methods here in JobOwner have mainly to do with runtime behavior and/or runtime error handling. (SourceOwner is more about compilation and compile-time errors.)

  43. final case class Let(varName: String, startPos: Int, endPos: Int, children: List[Let]) extends Product with Serializable

    Permalink
  44. trait Link extends Agent

    Permalink

    Interface provides access to NetLogo links.

  45. trait Link3D extends Link

    Permalink
  46. trait LinkStamp3D extends Link3D

    Permalink
  47. class LocalFile extends File

    Permalink
  48. trait Logger extends AnyRef

    Permalink
  49. abstract class LogoException extends Exception

    Permalink

    A runtime error that has occurred in NetLogo code.

    A runtime error that has occurred in NetLogo code.

    As with any Exception, use the getMessage() method to get the error message. A LogoExceptions is expected to have a nice end-user-understandable message.

    LogoException is abstract because engine code is supposed to throw a concrete subclass like EngineException.

  50. class LogoList extends AbstractSequentialList[AnyRef] with Serializable

    Permalink
  51. class LogoListBuilder extends AnyRef

    Permalink
  52. trait LogoThunkFactory extends AnyRef

    Permalink
  53. class Matrix3D extends AnyRef

    Permalink
  54. sealed trait ModelSection extends AnyRef

    Permalink
  55. trait ModelSections extends AnyRef

    Permalink
  56. sealed trait ModelType extends AnyRef

    Permalink

    how a model was loaded.

    how a model was loaded. NEW is type for new models, NORMAL is a model opened normally (e.g. via Open on the File menu), LIBRARY a models library model.

  57. trait ModelingCommonsInterface extends AnyRef

    Permalink
  58. trait MultiErrorHandler extends AnyRef

    Permalink
  59. trait NetLogoAdapter extends NetLogoListener

    Permalink

    Implements NetLogoListener with empty methods, which can be overriden in subclasses.

  60. trait NetLogoListener extends EventListener

    Permalink

    A host application should implement this interface in order to be notified of events occurring within NetLogo.

    A host application should implement this interface in order to be notified of events occurring within NetLogo. Its methods are called by NetLogoListenerManager when these events occur. The events are typically user actions, but may also be triggered programmatically by the model.

  61. trait Observer extends Agent

    Permalink

    Provides access to NetLogo observer

  62. class Options[T] extends AnyRef

    Permalink
  63. trait Patch extends Agent

    Permalink

    Provides access to NetLogo patches.

  64. trait Patch3D extends Patch

    Permalink
  65. sealed abstract class Perspective extends AnyRef

    Permalink
  66. trait PlotInterface extends AnyRef

    Permalink
  67. trait PlotPenInterface extends AnyRef

    Permalink
  68. sealed trait PreviewCommands extends AnyRef

    Permalink

    A model's "preview commands" are the commands that are used to generate the preview that appears in the Models Library dialog, the NetLogo website (http://ccl.northwestern.edu/netlogo/models/), the Modeling Commons (http://www.modelingcommons.org/) and potentially other places.

    A model's "preview commands" are the commands that are used to generate the preview that appears in the Models Library dialog, the NetLogo website (http://ccl.northwestern.edu/netlogo/models/), the Modeling Commons (http://www.modelingcommons.org/) and potentially other places. By default, they're just setup repeat 75 [ go ] but they can be customized. Some models require manually generated previews.

    Preview commands are always run in a fresh headless workspace with random-seed 0 called before opening the model. The startup procedure, if present, runs before the preview commands.

  69. trait Primitive extends AnyRef

    Permalink

    Top-level interface for primitives (commands or reporters).

    Top-level interface for primitives (commands or reporters). Not to be implemented directly; the Command or Reporter interface should be used instead.

    See also

    Reporter

    Command

  70. trait PrimitiveManager extends AnyRef

    Permalink

    Ships extension primitives and associated names to NetLogo.

  71. final class Program extends AnyRef

    Permalink
  72. case class Property(accessString: String, tyype: Type, name: String, notes: String = "", gridWidth: Int = GridBagConstraints.REMAINDER, focus: Boolean = false, setLive: Boolean = false, enabled: Boolean = true, collapsible: Boolean = false, collapseByDefault: Boolean = false) extends Product with Serializable

    Permalink
  73. trait Protractor extends AnyRef

    Permalink
  74. trait Protractor3D extends Protractor

    Permalink
  75. trait RandomServices extends AnyRef

    Permalink
  76. class RemoteFile extends File

    Permalink
  77. trait RendererInterface extends AnyRef

    Permalink
  78. trait Reporter extends Primitive

    Permalink

    Interface for NetLogo reporters.

    Interface for NetLogo reporters. Reporters are primitives that return a value. All new reporters must implement this interface.

  79. trait ReporterLogoThunk extends AnyRef

    Permalink

    This is used by SliderConstraint.

    This is used by SliderConstraint. Sliders have snippets of Logo code associated with them, which need be to be evaluated to produce numbers for the min, max, and increment. But here in the org.nlogo.agent package we don't know anything about Logo code and how to run it. This interface lets other code keep us in the dark by giving us a black box that magically produces an object whenever we ask for one. (In the case of SliderConstraint the object should be a boxed double.)

  80. trait ReporterRunnable[T] extends AnyRef

    Permalink
  81. trait ReporterTask extends Task

    Permalink
  82. trait Shape extends AnyRef

    Permalink
  83. class ShapeList extends AnyRef

    Permalink
  84. class SimpleChangeEventPublisher extends Publisher[SimpleChangeEvent.type]

    Permalink

    A most basic event publisher only warning subscribers that "something has changed" Currently used by TreeAgentSet to allow the nw extension to listen for changes and update its graph context accordingly.

    A most basic event publisher only warning subscribers that "something has changed" Currently used by TreeAgentSet to allow the nw extension to listen for changes and update its graph context accordingly. NP 2013-05-14.

  85. class SimpleJobOwner extends JobOwner

    Permalink
  86. trait SingleErrorHandler extends AnyRef

    Permalink
  87. trait SourceOwner extends AnyRef

    Permalink

    Source owners are usually parts of the UI.

    Source owners are usually parts of the UI. Code comes from buttons, from monitors, from the Code tab, from the Command Center, and so on.

    SourceOwner has mainly to do with compilation and with what to do if an error occurs during compilation.

    "Header source" is distinguished from "inner source" because the latter is the code the user actually wrote, while header and footer source is extra code we wrapped around it. This matters when showing code and showing positions of errors in the UI; we never want to show the user header/footer source, but error locations need to take the length of the header source into account.

    See also JobOwner, which extends SourceOwner and adds methods having to do with runtime behavior and runtime error-handling.

  88. case class Syntax(precedence: Int, left: Int = Syntax.VoidType, right: Array[Int] = Array(), ret: Int = Syntax.VoidType, defaultOption: Option[Int] = None, minimumOption: Option[Int] = None, isRightAssociative: Boolean = false, agentClassString: String = "OTPL", blockAgentClassString: String = null, switches: Boolean = false) extends Product with Serializable

    Permalink

    Specifies the arguments accepted by a primitive.

    Specifies the arguments accepted by a primitive. Used by the compiler for type-checking.

    You cannot instantiate this class directly. Instead, use the static construction methods Syntax.commandSyntax(...) or Syntax.reporterSyntax(...).

    For example, in a Reporter that takes two number arguments and returns a boolean, implement Primitive.getSyntax() as follows:

    public Syntax getSyntax() {
      return Syntax.reporterSyntax(
        new int[] { Syntax.NumberType(), Syntax.NumberType() },
        Syntax.BooleanType());
    }
    

    An input can be made variadic, meaning that it can be repeated any number of times when enclosed in parentheses, if you add the RepeatableType flag. When using variadic inputs you should also define the default number of inputs, that is, the number of inputs expect if the user does not use parentheses. For example:

     public Syntax getSyntax() {
       return Syntax.reporterSyntax(
         new int[] { Syntax.WildcardType() | Syntax.RepeatableType() },
         Syntax.ListType(), 2);
     }
    

    See also

    Primitive#getSyntax()

  89. sealed trait Task extends AnyRef

    Permalink
  90. case class Token(name: String, tyype: TokenType, value: AnyRef)(startPos: Int, endPos: Int, fileName: String) extends Product with Serializable

    Permalink
  91. trait TokenHolder extends AnyRef

    Permalink
  92. trait TokenMapperInterface extends AnyRef

    Permalink
  93. trait TokenReaderInterface extends Iterator[Token]

    Permalink
  94. sealed trait TokenType extends AnyRef

    Permalink
  95. trait TokenizerInterface extends AnyRef

    Permalink
  96. trait TrailDrawerInterface extends DrawingInterface

    Permalink
  97. trait Turtle extends Agent

    Permalink

    Interface provides access to NetLogo turtles.

  98. trait Turtle3D extends Turtle

    Permalink
  99. trait TurtleStamp3D extends Turtle3D

    Permalink
  100. trait ValueConstraint extends AnyRef

    Permalink

    Interface for objects which provide constraints for values

  101. case class Vect(x: Double, y: Double, z: Double) extends Product with Serializable

    Permalink
  102. trait ViewInterface extends AnyRef

    Permalink
  103. trait ViewSettings extends AnyRef

    Permalink
  104. trait World extends AnyRef

    Permalink
  105. trait World3D extends World

    Permalink
  106. class WorldDimensionException extends Exception

    Permalink
  107. class WorldDimensions extends AnyRef

    Permalink

    for wrapping up dimensions to resize the world using WorldResizer

  108. class WorldDimensions3D extends WorldDimensions

    Permalink

    for wrapping up dimensions to resize the world using WorldResizer

  109. trait WorldPropertiesInterface extends AnyRef

    Permalink
  110. trait WorldResizer extends AnyRef

    Permalink

    used by Importer for resizing the world during an import.

    used by Importer for resizing the world during an import. also used by BehaviorSpace when the experiment varies the world size

Value Members

  1. object APIVersion

    Permalink
  2. object AgentVariables

    Permalink
  3. object Approximate

    Permalink
  4. object Color

    Permalink
  5. object CompilerException extends Serializable

    Permalink
  6. object Constants

    Permalink
  7. object Dump

    Permalink
  8. object Equality

    Permalink
  9. object FileIO

    Permalink
  10. object FileMode

    Permalink
  11. object FileModeJ

    Permalink

    Java can't (I don't think) access Scala inner objects without reflection, so we provide these convenience vals for use from Java.

  12. object I18N

    Permalink
  13. object JavaLibraryPath

    Permalink

    This code came from http://forum.java.sun.com/thread.jspa?threadID=627890&start=15

    This code came from http://forum.java.sun.com/thread.jspa?threadID=627890&start=15

    The Terms of Use for the website, in the "Content Submitted to Sun" section states: You (the author) grant Sun and all other users of the Website an irrevocable, worldwide, royalty-free, nonexclusive license to use, reproduce, modify, distribute, transmit, display, perform, adapt, resell and publish such Content (including in digital form).

    http://www.sun.com/termsofuse.jsp

    The username of the original post has no name or email associated with it.

    Adds a path to the java.library.path System property and updates the ClassLoader. Uses reflection to allow update to private system members. Will not work if JVM security policy gets in the way (like in an applet). Will not work if Sun changes the private members. This really shouldn't be used at all...

  14. object LogoList extends Serializable

    Permalink
  15. object ModelReader

    Permalink
  16. object ModelSection

    Permalink
  17. object ModelSectionJ

    Permalink
  18. object ModelSections

    Permalink
  19. object ModelType

    Permalink
  20. object ModelTypeJ

    Permalink
  21. object Nobody

    Permalink
  22. object NumberParser

    Permalink
  23. object PeriodicUpdateDelay

    Permalink

    Created by IntelliJ IDEA.

    Created by IntelliJ IDEA. User: jdc974 Date: Sep 23, 2010 Time: 3:27:54 PM To change this template use File | Settings | File Templates.

  24. object Perspective

    Permalink
  25. object PerspectiveJ

    Permalink
  26. object PlotPenInterface

    Permalink
  27. object PreviewCommands

    Permalink
  28. object Property extends Serializable

    Permalink
  29. object RandomSeedGenerator

    Permalink
  30. object RemoteFile

    Permalink
  31. object ScalaConversions

    Permalink
  32. object ShapeList

    Permalink
  33. object SimpleChangeEvent

    Permalink
  34. object StringUtils

    Permalink
  35. object Syntax extends Serializable

    Permalink
  36. object Token extends Serializable

    Permalink
  37. object TokenType

    Permalink
  38. object TypeNames

    Permalink
  39. object ValueConstraint

    Permalink
  40. object Vect extends Serializable

    Permalink
  41. object Version

    Permalink
  42. object VersionHistory

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped