edu.umd.cfar.lamp.viper.util
Class AbstractViperSelection
java.lang.Object
edu.umd.cfar.lamp.viper.util.AbstractViperSelection
- All Implemented Interfaces:
- ViperSelection
- Direct Known Subclasses:
- AbstractViperSubTree, ViperSelectionSet
- public abstract class AbstractViperSelection
- extends java.lang.Object
- implements ViperSelection
Implements event handling for viper selection.
Method Summary |
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. |
protected void |
fireChangeEvent(javax.swing.event.ChangeEvent e)
Fire a change event to all registered listeners. |
javax.swing.event.ChangeListener[] |
getChangeListeners()
Gets a list of the attached listeners. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the attached listener. |
protected boolean |
writeLock()
|
protected void |
writeUnlock()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
notifyingListeners
protected boolean notifyingListeners
AbstractViperSelection
public AbstractViperSelection()
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.
- Specified by:
addChangeListener
in interface ViperSelection
- Parameters:
l
- an event listener
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener l)
- Removes the attached listener.
- Specified by:
removeChangeListener
in interface ViperSelection
- Parameters:
l
- an event listener
getChangeListeners
public javax.swing.event.ChangeListener[] getChangeListeners()
- Gets a list of the attached listeners.
- Specified by:
getChangeListeners
in interface ViperSelection
- Returns:
- all currently attached listeners
fireChangeEvent
protected void fireChangeEvent(javax.swing.event.ChangeEvent e)
- Fire a change event to all registered listeners.
- Parameters:
e
- null
if you wish to use a default change event,
with this
as the source
writeLock
protected boolean writeLock()
writeUnlock
protected void writeUnlock()