bibliothek.gui.dock.dockable
Class DockableStateListenerManager

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

public class DockableStateListenerManager
extends java.lang.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 checkVisibility()
          Rechecks the visibility state and may fire an event if the visibility 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

checkVisibility

public void checkVisibility()
Rechecks the visibility state and may fire an event if the visibility 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.