org.pietschy.command.delegate

Class DelegateManager


public class DelegateManager
extends java.lang.Object

DelegateManager class acts as a singleton factory for all DelegateMediator instances. DelegateMediators are created using the currently installed DelegateMediatorFactory.
Version:
$Revision: 1.12 $
Author:
andrewp
See Also:
getMediatorFor(java.awt.Window), DelegatingCommand.trackDelegateIn(String, java.awt.Window)

Method Summary

static DelegateMediator
getMediatorFor(Component component)
This is a convenience method that gets the DelegateMediator based on the specified components window ancestor.
static DelegateMediator
getMediatorFor(Window window)
Gets the DelegateMediator for the specified window.
static void
setDelegateMediatorFactory(DelegateMediatorFactory delegateMediatorFactory)
Sets the factory to use to create DelegateMediator instances.

Method Details

getMediatorFor

public static DelegateMediator getMediatorFor(Component component)
This is a convenience method that gets the DelegateMediator based on the specified components window ancestor.
Parameters:
component -
Returns:
the DelegateMediator for the specified component.

getMediatorFor

public static DelegateMediator getMediatorFor(Window window)
Gets the DelegateMediator for the specified window. If the mediator doesn't exist it will be created using the current DelegateMediatorFactory.
Parameters:
window - the window of interest.
Returns:
the DelegateMediator for the specified window.
See Also:
getMediatorFor(java.awt.Component), setDelegateMediatorFactory(DelegateMediatorFactory)

setDelegateMediatorFactory

public static void setDelegateMediatorFactory(DelegateMediatorFactory delegateMediatorFactory)
Sets the factory to use to create DelegateMediator instances.
Parameters:
delegateMediatorFactory - the new factory to use.