bibliothek.gui.dock.common.event
Interface CVetoFocusListener


public interface CVetoFocusListener

This listener is used to prevent a CDockable from loosing or gaining the focus. Events may happen such that the framework is unable to prevent the focus from changing, e.g. if a CDockable is closed.
Please use this listener with care, the workflow of the user may be seriously hindered if the focus cannot be changed.

Author:
Benjamin Sigg
See Also:
CControl.addVetoFocusListener(CVetoFocusListener), CControl.removeVetoFocusListener(CVetoFocusListener)

Method Summary
 boolean willGainFocus(CDockable dockable)
          Called before focus is transfered to dockable.
 boolean willLoseFocus(CDockable dockable)
          Called before focus is transfered from dockable.
 

Method Detail

willGainFocus

boolean willGainFocus(CDockable dockable)
Called before focus is transfered to dockable.

Parameters:
dockable - the dockable that gets the focus
Returns:
true if this listener approves the action, false to speak out a veto

willLoseFocus

boolean willLoseFocus(CDockable dockable)
Called before focus is transfered from dockable.

Parameters:
dockable - the dockable that looses the focus
Returns:
true if this listener approves the action, false to speak out a veto