IFreezable
Interface for an object with a state change event that can be disabled. Object that implements IFreezable it can function in one of the following modes:
-
- Active. In this mode, each change to the internal state of the object generates an IFreezable.event:change event.
-
- Frozen. In this mode, changes to the object state do not cause an IFreezable.event:change event, but if changes occurred, the IFreezable.event:change event will be generated once when switching to active mode.
Constructor | Fields | Events | Methods
Constructor
IFreezable()
Fields
Name |
Type |
Description |
Event manager for the object. |
Events
Name |
Description |
Change to the internal state of the object. |
Methods
Name |
Returns |
Description |
freeze() |
Switches the object to "frozen" mode. |
|
isFrozen() |
Boolean |
Returns true if the object is in "frozen" mode, otherwise false. |
unfreeze() |
Switches the object to active mode. |
Fields details
events
{IEventManager} events
Event manager for the object.
Events details
change
Change to the internal state of the object.
Methods details
freeze
{IFreezable} freeze()
Switches the object to "frozen" mode.
Returns self-reference.
isFrozen
{Boolean} isFrozen()
Returns true if the object is in "frozen" mode, otherwise false.
unfreeze
{IFreezable} unfreeze()
Switches the object to active mode.
Returns self-reference.