bibliothek.gui.dock.common.intern
Class ControlVetoFocusListener

java.lang.Object
  extended by bibliothek.gui.dock.common.intern.ControlVetoFocusListener
All Implemented Interfaces:
FocusVetoListener

@FrameworkOnly
public class ControlVetoFocusListener
extends Object
implements FocusVetoListener

This listener observes a DockController and forwards all calls to a CVetoFocusListener.

Author:
Benjamin Sigg

Nested Class Summary
 
Nested classes/interfaces inherited from interface bibliothek.gui.dock.event.FocusVetoListener
FocusVetoListener.FocusVeto
 
Constructor Summary
ControlVetoFocusListener(CControl control, CVetoFocusListener callback)
          Creates a new veto focus listener.
 
Method Summary
 FocusVetoListener.FocusVeto vetoFocus(FocusController controller, Dockable dockable)
          Invoked when the focus should change because the user did something with dockable.
 FocusVetoListener.FocusVeto vetoFocus(FocusController controller, DockTitle title)
          Invoked when the focus should change because the user did something with title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlVetoFocusListener

public ControlVetoFocusListener(CControl control,
                                CVetoFocusListener callback)
Creates a new veto focus listener.

Parameters:
control - the control in whose realm this listener operates
callback - the callback to be called if an event is triggered
Method Detail

vetoFocus

public FocusVetoListener.FocusVeto vetoFocus(FocusController controller,
                                             DockTitle title)
Description copied from interface: FocusVetoListener
Invoked when the focus should change because the user did something with title.

Specified by:
vetoFocus in interface FocusVetoListener
Parameters:
controller - the controller who will change the focus
title - the title from which the focus-change was initialized
Returns:
whether to cancel the focus transfer, not null

vetoFocus

public FocusVetoListener.FocusVeto vetoFocus(FocusController controller,
                                             Dockable dockable)
Description copied from interface: FocusVetoListener
Invoked when the focus should change because the user did something with dockable.

Specified by:
vetoFocus in interface FocusVetoListener
Parameters:
controller - the controller who will change the focus
dockable - the Dockable from which the focus-change was initialized
Returns:
whether to cancel the focus transfer, not null