org.pietschy.command.delegate

Interface DelegateContainer

Known Implementing Classes:
AbstractDemoPanel, DemoPanel, FaceDemoPanel, FileDemoPanel, GroupDemoPanel, ScriptDemoPanel, ToggleDemoPanel, UndoDemoPanel, WelcomePanel

public interface DelegateContainer

The DelgateContainer interface marks a JComponent as being a provider of CommandDelegates.

The DelegateManager tracks focus changes and searches up the components heirarchy to locate the first container implementing this interface. DelegatingCommands use the DelegateManager to automatically bind to their associated delegates when the focus changes.

Version:
$Revision: 1.5 $
Author:
andrewp

Method Summary

ActionCommandExecutor
getCommandExecutor(String commandId)
Gets the specifed command from this container.

Method Details

getCommandExecutor

public ActionCommandExecutor getCommandExecutor(String commandId)
Gets the specifed command from this container. If the command isn't registered with this container then the request is delegated to the containers parent.
Parameters:
commandId - the commands id.
Returns:
the command with the specified id, or null if it hasn't been registered with this container of one of its parents.