bibliothek.gui.dock.dockable
Class DockableStateListenerManager

java.lang.Object
  extended by bibliothek.gui.dock.dockable.DockableStateListenerManager

public class DockableStateListenerManager
extends Object

A handler for invoking DockableStateListeners. Can be used by Dockables.
Note:

Author:
Benjamin Sigg

Constructor Summary
DockableStateListenerManager(Dockable dockable)
          Creates a new manager.
 
Method Summary
 void addListener(DockableStateListener listener)
          Adds a listener to this observer.
 void checkShowing()
          Checks whether the Dockable is showing and fires an event if the property changed.
 void event(int flags)
          Informs this observer that dockable changed.
protected  boolean hasListeners()
          Tells whether there is at least one DockableStateListener registered.
protected  void install()
          Activates this observer.
 void removeListener(DockableStateListener listener)
          Removes a listener from this observer
protected  void uninstall()
          Deactivates this observer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DockableStateListenerManager

public DockableStateListenerManager(Dockable dockable)
Creates a new manager.

Parameters:
dockable - the observed element
Method Detail

checkShowing

public void checkShowing()
Checks whether the Dockable is showing and fires an event if the property changed.


addListener

public void addListener(DockableStateListener listener)
Adds a listener to this observer.

Parameters:
listener - the new listener

removeListener

public void removeListener(DockableStateListener listener)
Removes a listener from this observer

Parameters:
listener - the listener to remove

hasListeners

protected boolean hasListeners()
Tells whether there is at least one DockableStateListener registered.

Returns:
whether there is at least one listener

event

public void event(int flags)
Informs this observer that dockable changed. The flags are created using the constants from DockableStateEvent.

Parameters:
flags - the changes

install

protected void install()
Activates this observer.


uninstall

protected void uninstall()
Deactivates this observer.