Optional
opt_name: stringname of this DisplayList.
Static
Readonly
OBJECT_Static
Readonly
OBJECT_Adds the DisplayObject, inserting it at the end of the group of DisplayObjects
with the same zIndex; the item will appear visually over objects that have
the same (or lower) zIndex
.
Rest
...dispObjs: DisplayObject[]the DisplayObject's to add
Adds the given Observer to this Subject's list of Observers, so that the Observer
will be notified of changes in this Subject. An Observer may call Subject.addObserver
during its observe
method.
the Observer to add
Adds the Parameter to the list of this Subject's available Parameters.
the Parameter to add
if a Parameter with the same name already exists.
Notifies all Observers that this Subject has changed by calling observe on each Observer.
An Observer may call addObserver or removeObserver during its observe
method.
a SubjectEvent with information relating to the change
Notifies all Observers that the Parameter with the given name has changed by calling observe on each Observer.
the language-independent or English name of the Parameter that has changed
if there is no Parameter with the given name
Returns true if this DisplayList contains the given DisplayObject.
the item to search for
true if the DisplayObject was found
Draws the DisplayObjects in order, which means that DisplayObjects drawn later (at the end of the list) will appear to be on top of those drawn earlier (at start of the list).
the canvas's context to draw this object into
the mapping to use for translating between simulation and screen coordinates
Returns the DisplayObject that shows the given SimObject.
the SimObject to search for, or name of SimObject, or index number of DisplayObject. Name should be English or language-independent version of name.
the DisplayObject on this list that shows the given SimObject, or undefined if not found
Returns the DisplayShape that shows the given SimObject.
the SimObject to search for, or name of SimObject, or index number of DisplayObject. Name should be English or language-independent version of name.
the DisplayShape on this list that shows the given SimObject
if DisplayShape is not found
Returns the DisplaySpring that shows the given SimObject.
the SimObject to search for, or name of SimObject, or index number of DisplayObject. Name should be English or language-independent version of name.
the DisplaySpring on this list that shows the given SimObject
if DisplaySpring is not found
Returns the DisplayObject at the specified position in this DisplayList
index number of DisplayObject
the DisplayObject at the specified position in this DisplayList
if index out of range
Protected
getReturns whether broadcasting is enabled for this Subject. See setBroadcast.
whether broadcasting is enabled for this Subject
Returns the ParameterBoolean with the given name.
the language-independent or English name of the ParameterBoolean
the ParameterBoolean with the given name
if there is no ParameterBoolean with the given name
Returns the ParameterNumber with the given name.
the language-independent or English name of the ParameterNumber
the ParameterNumber with the given name
if there is no ParameterNumber with the given name
Returns the ParameterString with the given name.
the language-independent or English name of the ParameterString
the ParameterString with the given name
if there is no ParameterString with the given name
Adds the DisplayObject, inserting it at the front of the group of DisplayObjects
with the same zIndex; the item will appear visually under objects that have
the same (or higher) zIndex
.
the DisplayObject to prepend
Removes the item from the list of DisplayObjects.
the item to remove
Removes the Observer from this Subject's list of Observers. An Observer may
call removeObserver
during its observe
method.
the Observer to detach from list of Observers
Removes the Parameter from the list of this Subject's available Parameters.
the Parameter to remove
Protected
setSets whether this Subject will broadcast events, typically used to temporarily disable broadcasting. Intended to be used in situations where a subclass overrides a method that broadcasts an event. This allows the subclass to prevent the superclass broadcasting that event, so that the subclass can broadcast the event when the method is completed.
whether this Subject should broadcast events
the previous value
Returns set of the DisplayObjects in proper visual sequence, starting with the bottom-most object.
list of DisplayObjects in visual sequence order
Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.
For an object whose main purpose is to represent another Printable object, it is
recommended to include the result of calling toStringShort
on that other object.
For example, calling toStringShort()
on a DisplayShape might return something like
this:
DisplayShape{polygon:Polygon{'chain3'}}
a minimal string representation of this object.
Generated using TypeDoc
A set of DisplayObject's, which show the state of the simulation. A DisplayObject typically represents a SimObject, but not always.
zIndex
DisplayObjects with a lower
zIndex
appear underneath those with higherzIndex
. The DisplayList is sorted byzIndex
. See DisplayObject.getZIndex.