GUI Commands User GuideVersion 2.1 |
||
Delegating CommandsDelegatingCommands allow you to create a command whose actual implementation is late bound based on the current UI state. Typical examples include the print, cut, copy and paste operations since they are always in menus and on toolbars but their behaviour typically depends on the currently focused component. DelegatingCommands are also useful when you reguire a command to be accessed from a top level of a container hierarchy OverviewThe following gives an outline of how DelegatingCommands interact with DelegateMediator.
The following diagram illustrates:
NOTE: You typically on need one DelegateMediator instance per frame since the
DelegatingCommands will search the container hierarchy for the nearest instance.
|
||