bibliothek.gui.dock.control
Class DefaultDockControllerFactory

java.lang.Object
  extended by bibliothek.gui.dock.control.DefaultDockControllerFactory
All Implemented Interfaces:
DockControllerFactory
Direct Known Subclasses:
SecureDockControllerFactory

public class DefaultDockControllerFactory
extends java.lang.Object
implements DockControllerFactory

A very simple implementation of DockControllerFactory, creating only the default-versions of every element.

Author:
Benjamin Sigg

Constructor Summary
DefaultDockControllerFactory()
           
 
Method Summary
 DockRegisterListener createActionBinder(DockController controller, ControllerSetupCollection setup)
          Creates a listener that will ensure that every DockAction is bound to its Dockable.
 ActionViewConverter createActionViewConverter(DockController controller, ControllerSetupCollection setup)
          Creates the converter that will transform actions into views.
 ActionOffer createDefaultActionOffer(DockController controller, ControllerSetupCollection setup)
          Creates the default action offer.
 DockableSelector createDockableSelector(DockController controller, ControllerSetupCollection setup)
          Creates a new selector for Dockables.
 DoubleClickController createDoubleClickController(DockController controller, ControllerSetupCollection setup)
          Creates the controller that will forward double clicks with the mouse.
 ExtensionManager createExtensionManager(DockController controller, ControllerSetupCollection setup)
          Creates a new ExtensionManager.
 FocusController createFocusController(DockController controller, ControllerSetupCollection setup)
          Creates the focus-controller of controller
 KeyboardController createKeyboardController(DockController controller, ControllerSetupCollection setup)
          Creates a new controller for global KeyEvents.
 MouseFocusObserver createMouseFocusObserver(DockController controller, ControllerSetupCollection setup)
          Creates an observer for MouseEvents that lead to focus changes
 PopupController createPopupController(DockController controller, ControllerSetupCollection setup)
          Creates a listener which will open a popup-menu for each title or dockable known to the controller.
 DockRegister createRegister(DockController controller, ControllerSetupCollection setup)
          Creates a new register for the controller.
 DockRelocator createRelocator(DockController controller, ControllerSetupCollection setup)
          Creates a new relocator for the controller.
 SingleParentRemover createSingleParentRemover(DockController controller, ControllerSetupCollection setup)
          Creates a SingleParentRemover that will be used to remove some stations from this controller.
 DockRegisterListener createVisibilityFocusObserver(DockController controller, ControllerSetupCollection setup)
          Creates a listener which will observe all stations to ensure that the focused Dockable is always visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDockControllerFactory

public DefaultDockControllerFactory()
Method Detail

createActionBinder

public DockRegisterListener createActionBinder(DockController controller,
                                               ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a listener that will ensure that every DockAction is bound to its Dockable.

Specified by:
createActionBinder in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the new listener or null

createActionViewConverter

public ActionViewConverter createActionViewConverter(DockController controller,
                                                     ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates the converter that will transform actions into views.

Specified by:
createActionViewConverter in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the new converter, not null

createDefaultActionOffer

public ActionOffer createDefaultActionOffer(DockController controller,
                                            ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates the default action offer. This ActionOffer will be used if no other offer was interested in a Dockable.

Specified by:
createDefaultActionOffer in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the offer, must not be null

createDoubleClickController

public DoubleClickController createDoubleClickController(DockController controller,
                                                         ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates the controller that will forward double clicks with the mouse.

Specified by:
createDoubleClickController in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the controller, not null

createVisibilityFocusObserver

public DockRegisterListener createVisibilityFocusObserver(DockController controller,
                                                          ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a listener which will observe all stations to ensure that the focused Dockable is always visible.

Specified by:
createVisibilityFocusObserver in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the listener or null

createFocusController

public FocusController createFocusController(DockController controller,
                                             ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates the focus-controller of controller

Specified by:
createFocusController in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the controller, not null

createDockableSelector

public DockableSelector createDockableSelector(DockController controller,
                                               ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a new selector for Dockables.

Specified by:
createDockableSelector in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the new controller, not null

createKeyboardController

public KeyboardController createKeyboardController(DockController controller,
                                                   ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a new controller for global KeyEvents.

Specified by:
createKeyboardController in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the new controller, not null

createMouseFocusObserver

public MouseFocusObserver createMouseFocusObserver(DockController controller,
                                                   ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates an observer for MouseEvents that lead to focus changes

Specified by:
createMouseFocusObserver in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the observer, not null

createPopupController

public PopupController createPopupController(DockController controller,
                                             ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a listener which will open a popup-menu for each title or dockable known to the controller.

Specified by:
createPopupController in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the new listener or null

createRegister

public DockRegister createRegister(DockController controller,
                                   ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a new register for the controller.

Specified by:
createRegister in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the new register

createRelocator

public DockRelocator createRelocator(DockController controller,
                                     ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a new relocator for the controller.

Specified by:
createRelocator in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the relocator

createSingleParentRemover

public SingleParentRemover createSingleParentRemover(DockController controller,
                                                     ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a SingleParentRemover that will be used to remove some stations from this controller.

Specified by:
createSingleParentRemover in interface DockControllerFactory
Parameters:
controller - the controller for which the element is created
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
The remover

createExtensionManager

public ExtensionManager createExtensionManager(DockController controller,
                                               ControllerSetupCollection setup)
Description copied from interface: DockControllerFactory
Creates a new ExtensionManager.

Specified by:
createExtensionManager in interface DockControllerFactory
Parameters:
controller - the controller which will use the manager
setup - an observable where new objects can add ControllerSetupListener to be informed when the setup of controller is finished.
Returns:
the new manager, not null