bibliothek.gui.dock.station.split
Class FullScreenClickableListener

java.lang.Object
  extended by bibliothek.gui.dock.event.DockAdapter
      extended by bibliothek.gui.dock.station.split.FullScreenClickableListener
All Implemented Interfaces:
DockableListener, DockControllerListener, DockRegisterListener, DockRelocatorListener, DockStationListener

public class FullScreenClickableListener
extends DockAdapter

A listener which is added to a SplitDockStation. The listener observes all children and adds to each DockTitle or Dockable a FullScreenClickableListener.FullScreenListener. The listener is removed when a Dockable is removed from this station.

Author:
Benjamin Sigg

Nested Class Summary
protected  class FullScreenClickableListener.FullScreenListener
          A listener which waits for a double-click-event to change the fullscreen-mode of a Dockable.
 
Constructor Summary
FullScreenClickableListener(SplitDockStation station)
          Constructs a new listener.
 
Method Summary
 void destroy()
          Deconstructor of this listener, removes all listeners from any known observed object.
 void dockableAdded(DockStation station, Dockable dockable)
          Invoked after dockable has been added to station.
 void dockableRemoved(DockStation station, Dockable dockable)
          Invoked after dockable has been removed from station.
 SplitDockStation getStation()
          Gets the station which is observed by this listener.
protected  boolean shouldCollect(Dockable dockable)
          Determines whether dockable should be observed or not.
protected  boolean shouldCollect(Dockable dockable, DockTitle title)
          Determines whether title should be observed or not.
 void titleBound(DockController controller, DockTitle title, Dockable dockable)
          Called when title was bound to dockable.
 void titleUnbound(DockController controller, DockTitle title, Dockable dockable)
          Called when title was unbound from dockable.
protected  Dockable unwrap(Dockable dockable)
          Searches a parent of dockable which has the station as its direct parent.
 
Methods inherited from class bibliothek.gui.dock.event.DockAdapter
dockableAdding, dockableDrag, dockableFocused, dockablePut, dockableRegistered, dockableRegistering, dockableRemoving, dockableUnregistered, dockableVisibiltySet, dockStationRegistered, dockStationRegistering, dockStationUnregistered, titleBound, titleIconChanged, titleTextChanged, titleUnbound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FullScreenClickableListener

public FullScreenClickableListener(SplitDockStation station)
Constructs a new listener.

Parameters:
station - the station which should be observed
Method Detail

getStation

public SplitDockStation getStation()
Gets the station which is observed by this listener.

Returns:
the observed station

dockableAdded

public void dockableAdded(DockStation station,
                          Dockable dockable)
Description copied from interface: DockStationListener
Invoked after dockable has been added to station.

Specified by:
dockableAdded in interface DockStationListener
Overrides:
dockableAdded in class DockAdapter
Parameters:
station - the station where the new child was added
dockable - the new child

dockableRemoved

public void dockableRemoved(DockStation station,
                            Dockable dockable)
Description copied from interface: DockStationListener
Invoked after dockable has been removed from station.

Specified by:
dockableRemoved in interface DockStationListener
Overrides:
dockableRemoved in class DockAdapter
Parameters:
station - the station where the old child was removed
dockable - the old child

titleBound

public void titleBound(DockController controller,
                       DockTitle title,
                       Dockable dockable)
Description copied from interface: DockControllerListener
Called when title was bound to dockable. This method is called after the DockTitle.bind()-method was invoked.

Specified by:
titleBound in interface DockControllerListener
Overrides:
titleBound in class DockAdapter
Parameters:
controller - the origin of the event
title - the DockTitle that was bound
dockable - the owner of title

titleUnbound

public void titleUnbound(DockController controller,
                         DockTitle title,
                         Dockable dockable)
Description copied from interface: DockControllerListener
Called when title was unbound from dockable. This method is called after the DockTitle.bind()-method was invoked.

Specified by:
titleUnbound in interface DockControllerListener
Overrides:
titleUnbound in class DockAdapter
Parameters:
controller - the origin of the event
title - the DockTitle which was unbound
dockable - the old owner of title

unwrap

protected Dockable unwrap(Dockable dockable)
Searches a parent of dockable which has the station as its direct parent.

Parameters:
dockable - the root of the search
Returns:
dockable, a parent of dockable or null

shouldCollect

protected boolean shouldCollect(Dockable dockable)
Determines whether dockable should be observed or not.

Parameters:
dockable - the dockable which will be checked
Returns:
true if dockable should have a listener, false otherwise

shouldCollect

protected boolean shouldCollect(Dockable dockable,
                                DockTitle title)
Determines whether title should be observed or not.

Parameters:
dockable - the owner of title
title - the title which will be checked
Returns:
true if title has to be observed, false otherwise

destroy

public void destroy()
Deconstructor of this listener, removes all listeners from any known observed object.