Class CListenerCollection
java.lang.Object
bibliothek.gui.dock.common.intern.CListenerCollection
A collection of the listeners which are normally added to a
CDockable.
This class can be used by subclasses of CDockable to easily store
listeners and fire events.- Author:
- Benjamin Sigg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStores an additionalCDockableLocationListenerin this collection.voidStores an additionalCDockablePropertyListenerin this collection.voidStores an additionalCDockableStateListenerin this collection.voidaddDoubleClickListener(CDoubleClickListener listener) Stores an additionalCDoubleClickListenerin this collection.voidaddFocusListener(CFocusListener listener) Adds aCFocusListenerto this collection.voidaddKeyboardListener(CKeyboardListener listener) Stores an additionalCKeyboardListenerin this collection.voidaddVetoClosingListener(CVetoClosingListener listener) Stores an additionalCVetoClosingListenerin this collection.voidaddVetoFocusListener(CVetoFocusListener listener) Adds a listener to this collection.Gets aCDockableLocationListenerwhich forwards all calls to its methods to the listeners registered at this collection.Gets all currently registeredCDockableLocationListeners collected in an array.Gets aCDockablePropertyListenerwhich forwards all calls to its methods to the listeners registered at this collection.Gets all currently registeredCDockableStateListeners collected in an array.Gets aCDockableStateListenerwhich forwards all calls to its methods to the listeners registered at this collection.Gets all currently registeredCDockableStateListeners collected in an array.Gets aCDoubleClickListenerwhich forwards all calls to its methods to the listener registered at this collection.Gets all currently registeredCDoubleClickListeners collected in an array.Gets aCFocusListenerwhich forwards all calls to its methods to the listener registered at this collection.Gets all currently registeredCFocusListeners collected in an array.Gets aCKeyboardListenerwhich forwards all calls to its methods to the listener registered at this collection.Gets all currently registeredCKeyboardListeners collected in an array.Gets aCVetoClosingListenerthat forwards all events to the other registered listeners.Gets all currently registeredCVetoClosingListeners collected in an array.Gets aCVetoFocusListenerwhich forwards all calls to its methods to the listeners registered in this collection.Gets all theCVetoFocusListenerthat are collected in this collection.booleanTells whether at least oneCDockableStateListeneris currently registered.booleanTells whether there is at least oneCVetoClosingListenerregistered in this collection.voidRemoves a listener from this collectionvoidRemoves a listener from this collection.voidRemoves a listener from this collectionvoidRemoves a listener from this collection.voidremoveFocusListener(CFocusListener listener) Removes a listener from this collection.voidremoveKeyboardListener(CKeyboardListener listener) Removes a listener from this collection.voidRemoveslistenerfrom this collection.voidremoveVetoFocusListener(CVetoFocusListener listener) Removes a listener from this collection
-
Constructor Details
-
CListenerCollection
public CListenerCollection()
-
-
Method Details
-
addCDockableStateListener
Stores an additionalCDockableStateListenerin this collection.- Parameters:
listener- the additional listener
-
removeCDockableStateListener
Removes a listener from this collection- Parameters:
listener- the listener to remove
-
getCDockableStateListeners
Gets all currently registeredCDockableStateListeners collected in an array. Modifications of the array will not modify this collection.- Returns:
- the independent array of listeners
-
getCDockableLocationListener
Gets aCDockableLocationListenerwhich forwards all calls to its methods to the listeners registered at this collection.- Returns:
- a forwarding listener
-
hasCDockableLocationListeners
public boolean hasCDockableLocationListeners()Tells whether at least oneCDockableStateListeneris currently registered.- Returns:
trueif there is at least one listener
-
addCDockableLocationListener
Stores an additionalCDockableLocationListenerin this collection.- Parameters:
listener- the additional listener
-
removeCDockableLocationListener
Removes a listener from this collection- Parameters:
listener- the listener to remove
-
getCDockableLocationListeners
Gets all currently registeredCDockableLocationListeners collected in an array. Modifications of the array will not modify this collection.- Returns:
- the independent array of listeners
-
getCDockableStateListener
Gets aCDockableStateListenerwhich forwards all calls to its methods to the listeners registered at this collection.- Returns:
- a forwarding listener
-
addCDockablePropertyListener
Stores an additionalCDockablePropertyListenerin this collection.- Parameters:
listener- the additional listener
-
removeCDockablePropertyListener
Removes a listener from this collection.- Parameters:
listener- the listener to remove
-
getCDockablePropertyListeners
Gets all currently registeredCDockableStateListeners collected in an array. Modifications of the array will not modify this collection.- Returns:
- the independent array of listeners
-
getCDockablePropertyListener
Gets aCDockablePropertyListenerwhich forwards all calls to its methods to the listeners registered at this collection.- Returns:
- a forwarding listener
-
addFocusListener
Adds aCFocusListenerto this collection.- Parameters:
listener- the new listener
-
removeFocusListener
Removes a listener from this collection.- Parameters:
listener- the listener to remove
-
getFocusListeners
Gets all currently registeredCFocusListeners collected in an array. Modifications of the array will not modify this collection.- Returns:
- the independent array of listeners
-
getFocusListener
Gets aCFocusListenerwhich forwards all calls to its methods to the listener registered at this collection.- Returns:
- a forwarding listener
-
addVetoFocusListener
Adds a listener to this collection.- Parameters:
listener- the additional listener
-
removeVetoFocusListener
Removes a listener from this collection- Parameters:
listener- the listener to remove
-
getVetoFocusListeners
Gets all theCVetoFocusListenerthat are collected in this collection.- Returns:
- an independent array of listeners
-
getVetoFocusListener
Gets aCVetoFocusListenerwhich forwards all calls to its methods to the listeners registered in this collection.- Returns:
- a forwarding listener
-
addKeyboardListener
Stores an additionalCKeyboardListenerin this collection.- Parameters:
listener- the new listener
-
removeKeyboardListener
Removes a listener from this collection.- Parameters:
listener- the listener to remove
-
getKeyboardListeners
Gets all currently registeredCKeyboardListeners collected in an array. Modifications of the array will not modify this collection.- Returns:
- the independent array of listeners
-
getKeyboardListener
Gets aCKeyboardListenerwhich forwards all calls to its methods to the listener registered at this collection.- Returns:
- a forwarding listener
-
addDoubleClickListener
Stores an additionalCDoubleClickListenerin this collection.- Parameters:
listener- the additional listener
-
removeDoubleClickListener
Removes a listener from this collection.- Parameters:
listener- the listener to remove
-
getDoubleClickListeners
Gets all currently registeredCDoubleClickListeners collected in an array. Modifications of the array will not modify this collection.- Returns:
- the independent array of listeners
-
getDoubleClickListener
Gets aCDoubleClickListenerwhich forwards all calls to its methods to the listener registered at this collection.- Returns:
- a forwarding listener
-
getVetoClosingListener
Gets aCVetoClosingListenerthat forwards all events to the other registered listeners.- Returns:
- the forwarding listener
-
addVetoClosingListener
Stores an additionalCVetoClosingListenerin this collection.- Parameters:
listener- the new listener
-
removeVetoClosingListener
Removeslistenerfrom this collection.- Parameters:
listener- the listener to remove
-
hasVetoClosingListeners
public boolean hasVetoClosingListeners()Tells whether there is at least oneCVetoClosingListenerregistered in this collection.- Returns:
- whether there is at least one listener
-
getVetoClosingListeners
Gets all currently registeredCVetoClosingListeners collected in an array. Modifications of the array will not modify this collection.- Returns:
- the independent array of listeners
-