edu.umd.cfar.lamp.viper.util
Interface ViperSelection

All Known Subinterfaces:
NodeVisibilityManager, ViperSubTree
All Known Implementing Classes:
AbstractViperSelection, AbstractViperSubTree

public interface ViperSelection

Simple selection interface for viper data.


Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Adds a change listener to the selection.
 javax.swing.event.ChangeListener[] getChangeListeners()
          Gets a list of the attached listeners.
 boolean isEmpty()
          Tests to see if something is selected.
 boolean isSelected(Node n)
          Tests to see if the given node is selected.
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes the attached listener.
 

Method Detail

isSelected

public boolean isSelected(Node n)
Tests to see if the given node is selected.

Parameters:
n - the viper data node to test
Returns:
true iff the node is selected

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a change listener to the selection. The listener is to be notified whenver the collection of selected objects changes.

Parameters:
l - an event listener

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes the attached listener.

Parameters:
l - an event listener

getChangeListeners

public javax.swing.event.ChangeListener[] getChangeListeners()
Gets a list of the attached listeners.

Returns:
all currently attached listeners

isEmpty

public boolean isEmpty()
Tests to see if something is selected.

Returns:
if anything is selected