net.sf.vex
Class SelectionProviderImpl

java.lang.Object
  |
  +--net.sf.vex.SelectionProviderImpl
All Implemented Interfaces:
SelectionListener, SelectionProvider

public class SelectionProviderImpl
extends java.lang.Object
implements SelectionProvider, SelectionListener

Implementation of the SelectionProvider interface. Also acts as a selection event multiplexor: any events received on its SelectionListener interface are relayed to any registered listeners.


Constructor Summary
SelectionProviderImpl()
           
 
Method Summary
 void addSelectionListener(SelectionListener listener)
          Add the given SelectionChangeListener to be notified when the current selection changes.
 void fireSelectionChanged(Selection selection)
          Call selectionChanged on all registered listeners.
 void removeSelectionListener(SelectionListener listener)
          Remove the given SelectionChangeListener from the notification list.
 void selectionChanged(Selection selection)
          Called by a selection provider when the current selection changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionProviderImpl

public SelectionProviderImpl()
Method Detail

addSelectionListener

public void addSelectionListener(SelectionListener listener)
Description copied from interface: SelectionProvider
Add the given SelectionChangeListener to be notified when the current selection changes.

Specified by:
addSelectionListener in interface SelectionProvider
Parameters:
listener - SelectionChangeListener to add.
See Also:
net.sf.vex.SelectionProvider#addSelectionChangeListener(net.sf.vex.SelectionListener)

fireSelectionChanged

public void fireSelectionChanged(Selection selection)
Call selectionChanged on all registered listeners.

Parameters:
selection - Selection that has changed.

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Description copied from interface: SelectionProvider
Remove the given SelectionChangeListener from the notification list.

Specified by:
removeSelectionListener in interface SelectionProvider
Parameters:
listener - SelectionChangeListener to remove.
See Also:
net.sf.vex.SelectionProvider#removeSelectionChangeListener(net.sf.vex.SelectionListener)

selectionChanged

public void selectionChanged(Selection selection)
Description copied from interface: SelectionListener
Called by a selection provider when the current selection changes.

Specified by:
selectionChanged in interface SelectionListener
Parameters:
selection - the new Selection.
See Also:
SelectionListener.selectionChanged(net.sf.vex.Selection)