CommandBinding (class)
public abstract CommandBinding {inherits Observer, GuiEventTarget}
Import from: CURL.GUI.STANDARD. Defined in package CURL.GUI.BASE.
Direct Known Subclasses: ControlFrame, Dialog, MenuAction

Superclass for objects that can be bound to and observe Commands.

Description

This class will observe whatever Command it is bound to, and fires a CommandChanged event at itself whenever this command notifies it of a state change. It also fires a CommandChanged event at itself whenever the CommandBinding.bound-command property is changed.

Constructors
default:Construct this object
constructor public {CommandBinding.default bound-command:#Command = null}
Properties
bound-command:The command associated with this object.
accessor public CommandBinding.bound-command:#Command
setter public CommandBinding.bound-command:#Command
bound-command-impl:Provide the CommandImpl (if any) that this object is implicitly bound to.
accessor public CommandBinding.bound-command-impl:#CommandImpl
Properties inherited from EventTarget: event-handlers
Methods
handle-observer-message:This method is called by the observed object when it wants to send a message. An Observer must implement this method to perform an operation when a change occurs.
protected {CommandBinding.handle-observer-message
    sender:Observable,
    message:any
}:void
Methods inherited from Observer: observe, stop-observing
Methods inherited from GuiEventTarget: handle-event, on-action, on-cancel-mode, on-command-changed, on-commit, on-composition-change-event, on-composition-result-event, on-context-menu-event, on-current-record-change-request, on-current-record-changed, on-destroy-notify, on-destroy-requested, on-drag-enter, on-drag-leave, on-drag-over, on-drag-pointer, on-drag-started, on-drop, on-end-composition-event, on-focus-event, on-focus-in, on-focus-out, on-grab-release, on-gui-event, on-input-method-event, on-inspection, on-key-event, on-key-press, on-pointer-button, on-pointer-crossing, on-pointer-enter, on-pointer-envelope-event, on-pointer-event, on-pointer-leave, on-pointer-motion, on-pointer-press, on-pointer-release, on-pointer-scroll, on-raw-key-event, on-raw-key-press, on-raw-key-release, on-reset, on-selectable-added, on-selectable-removed, on-selection-changed, on-selection-context-activated, on-selection-context-deactivated, on-selection-event, on-start-composition-event, on-start-event, on-stop-event, on-view-activate, on-view-deactivate, on-window-close, remove-event-handlers-for-event-class
Methods inherited from EventTarget: accepts-event-class?, add-event-handler, event-handler-present?, remove-event-handler, verify-event
Methods inherited from BasicEventTarget: enqueue-event
Methods inherited from Object: object-describe, object-describe-for-debugging, object-serialize

Constructor Details
default (constructor)
public {CommandBinding.default bound-command:#Command = null}

Construct this object

command: Command to bind this object to.


Property Details
bound-command (accessor)
accessor public CommandBinding.bound-command:#Command
setter public CommandBinding.bound-command:#Command

The command associated with this object.



bound-command-impl (accessor)
accessor public CommandBinding.bound-command-impl:#CommandImpl

Provide the CommandImpl (if any) that this object is implicitly bound to.



Method Details
handle-observer-message (method)
protected {CommandBinding.handle-observer-message
    sender:Observable,
    message:any
}:void

This method is called by the observed object when it wants to send a message. An Observer must implement this method to perform an operation when a change occurs.

sender: the Observable object that's changed
message: This contains more detailed information about the change from the Observer. If no more information is present, then this is null.