bibliothek.gui.dock.event
Class LocatedListenerList<L extends LocatedListener>

java.lang.Object
  extended by bibliothek.gui.dock.event.LocatedListenerList<L>
Type Parameters:
L - the type of listeners in this list

public class LocatedListenerList<L extends LocatedListener>
extends Object

An object that can hold some LocatedListeners and order and filter them regarding to one element of the tree.

Author:
Benjamin Sigg

Constructor Summary
LocatedListenerList()
           
 
Method Summary
 void addListener(L listener)
          Adds a listener to the list of listeners.
 List<L> affected(DockElement element)
          Creates a list of all LocatedListeners which are affected by an event which occurs on element.
 void removeListener(L listener)
          Removes a list of the list of listeners.
 int size()
          Gets the number of listeners in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatedListenerList

public LocatedListenerList()
Method Detail

addListener

public void addListener(L listener)
Adds a listener to the list of listeners.

Parameters:
listener - the new listener

removeListener

public void removeListener(L listener)
Removes a list of the list of listeners.

Parameters:
listener - the listener to remove

size

public int size()
Gets the number of listeners in this list.

Returns:
the number of listeners

affected

public List<L> affected(DockElement element)
Creates a list of all LocatedListeners which are affected by an event which occurs on element. The list is ordered by the distance of the listeners to element.

Parameters:
element - the element which is the source of an event
Returns:
the ordered list of observers