bibliothek.gui.dock.common.intern
Class ControlVetoClosingListener

java.lang.Object
  extended by bibliothek.gui.dock.common.intern.ControlVetoClosingListener
All Implemented Interfaces:
VetoableDockFrontendListener

@FrameworkOnly
public class ControlVetoClosingListener
extends Object
implements VetoableDockFrontendListener

A converter listening for VetoableDockFrontendEvents and firing new CVetoClosingEvents.

Author:
Benjamin Sigg

Constructor Summary
ControlVetoClosingListener(CControl control, CVetoClosingListener callback)
          Creates a new converter.
 
Method Summary
protected  CDockable[] getCDockables(VetoableDockFrontendEvent event)
          Gets all the CDockables that are to be forwarded by this converter.
 void hidden(VetoableDockFrontendEvent event)
          Called whenever a set of Dockable was hidden.
 void hiding(VetoableDockFrontendEvent event)
          Called before a set of Dockables is hidden.
 void showing(VetoableDockFrontendEvent event)
          Called before a Dockable is shown.
 void shown(VetoableDockFrontendEvent event)
          Called whenever a Dockable was shown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControlVetoClosingListener

public ControlVetoClosingListener(CControl control,
                                  CVetoClosingListener callback)
Creates a new converter.

Parameters:
control - the control in whose realm this converter works
callback - the listener to inform about new events
Method Detail

hidden

public void hidden(VetoableDockFrontendEvent event)
Description copied from interface: VetoableDockFrontendListener
Called whenever a set of Dockable was hidden. Other than VetoableDockFrontendListener.hiding(VetoableDockFrontendEvent) this method is always called.

Specified by:
hidden in interface VetoableDockFrontendListener
Parameters:
event - description of the element and how it got closed

hiding

public void hiding(VetoableDockFrontendEvent event)
Description copied from interface: VetoableDockFrontendListener
Called before a set of Dockables is hidden. To abort the operation, VetoableDockFrontendEvent.cancel() can be invoked. This method may not always be invoked for all Dockables, it is certainly invoked if DockFrontend.hide(Dockable) is called or if DockFrontend.setSetting(bibliothek.gui.dock.frontend.Setting, boolean).

Specified by:
hiding in interface VetoableDockFrontendListener
Parameters:
event - description of the element to close

getCDockables

protected CDockable[] getCDockables(VetoableDockFrontendEvent event)
Gets all the CDockables that are to be forwarded by this converter.

Parameters:
event - the source
Returns:
the elements to forward, no event is fired if the result is empty or null

showing

public void showing(VetoableDockFrontendEvent event)
Description copied from interface: VetoableDockFrontendListener
Called before a Dockable is shown. To abort the operation, VetoableDockFrontendEvent.cancel() can be invoked. This method may not be called for all Dockables, it is certainly called if a client opens a Dockable through DockFrontend.show(Dockable)

Specified by:
showing in interface VetoableDockFrontendListener
Parameters:
event - description of the element to close

shown

public void shown(VetoableDockFrontendEvent event)
Description copied from interface: VetoableDockFrontendListener
Called whenever a Dockable was shown. Other than VetoableDockFrontendListener.showing(VetoableDockFrontendEvent) this method is always called.

Specified by:
shown in interface VetoableDockFrontendListener
Parameters:
event - description of the element and how it got shown