bibliothek.gui.dock.event
Interface FocusVetoListener

All Known Implementing Classes:
ControlVetoFocusListener

public interface FocusVetoListener

This listener is added to the FocusController and allows to interrupt a change of the focus. This listener stop focus transfer if the transfer is initialized by the framework itself. If the client calls a method like Component.requestFocusInWindow() then the framework may not be able to prevent the focus change from happening.

Author:
Benjamin Sigg

Nested Class Summary
static class FocusVetoListener.FocusVeto
          Tells how to react on a potential change of the focus.
 
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.
 

Method Detail

vetoFocus

FocusVetoListener.FocusVeto vetoFocus(FocusController controller,
                                      DockTitle title)
Invoked when the focus should change because the user did something with title.

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

FocusVetoListener.FocusVeto vetoFocus(FocusController controller,
                                      Dockable dockable)
Invoked when the focus should change because the user did something with dockable.

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