com.borland.primetime.actions
Interface DelegateHandler
- public interface DelegateHandler
An implementor of DelegateHandler (must be a subclass of
java.awt.Component) has a set of known DelegateActions that it wishes to
handle. This known set is typically stored in a some type of HashMap of
associations between the DelegateActions and the Actions to associate with
them.
When a DelegateAction is invoked (or updated), it will start a search
with the current focused component in the Window containing the source
context of UI widget diplaying the action, and walk up the parent containership
tree until it finds an instance of DelegateHandler. The DelegateHandler
instance will be queried via the getAction(DelegateAction delegate)
method. If the specified DelegateAction is handled by the
DelegateHandler instance, the DelegateHandler will return an Action. If the
DelegateHandler does not wish to handle the specified DelegateAction, it may
return null, and the search process will continue up the containership tree
until a DelegateHandler is found that handles the DelegateAction, or it
reaches the top of the containership hierarchy.
- See Also:
Action
,
com.borland.primetime.DelegateAction
Method Summary |
javax.swing.Action |
getAction(DelegateAction delegate)
Returns the Action instance associated with the specified DelegateAction. |
getAction
public javax.swing.Action getAction(DelegateAction delegate)
- Returns the Action instance associated with the specified DelegateAction.
If this DelegateHandler does not with to handle the specified DelegateAction,
null should be returned.
- Parameters:
delegate
- The DelegateAction searching for a handler- Returns:
- The Action to associate with the DelegateAction, or null if the
specified DelegateAction is not to be handled by this DelegateHandler