ConstraintListener

Listenernape.callbacks.ConstraintListener (final class)

Event listener for Constraint type events.

The events that can be caught are WAKE, SLEEP and BREAK type events. Theses listeners will only operate on Constraints.

Instance Members

@private


nape
options: OptionType

The OptionType used to match against Constraints.

When added to the same Space, any Constraint who's CbType list matches against this OptionType will be issued a callback when the relevant event occurs.


nape
handler(): Void

The callback handler for this event.


nape
new(event: CbEvent, options: Null<Dynamic>, handler: Function, ?precedence: Int = 0): Void

Construct a new ConstraintListener.

The possible event types are WAKE, SLEEP and BREAK.

The options argument is typed Dynamic, and is permitted to be either an OptionType or one of: CbType, CbTypeList, Array<CbType>, flash.Vector<CbType> In which case the input CbType's will be used to construct an OptionType whose included types will be the set of CbTypes supplied.

Name Type Default Description
event CbEvent The event type to listen for.
options Null<Dynamic> The OptionType to match Constraints against, passing null will equate to an empty OptionType.
handler Function The callback handler for this listener.
precedence Int 0 The precedence of this listener used to sort the order of callbacks in the case of more than one suitable ConstraintListener existing for the same event on the same Constraint. (default 0)

Private Members

Metadata

Name Parameters
:final -