gov.nih.nlm.mms.cxt
Class MRCXTBuilderSourceListSelectionListener

java.lang.Object
  extended bygov.nih.nlm.mms.cxt.MRCXTBuilderSourceListSelectionListener
All Implemented Interfaces:
EventListener, IgnorableListener, ListSelectionListener, TableSortListener

public class MRCXTBuilderSourceListSelectionListener
extends Object
implements ListSelectionListener, IgnorableListener, TableSortListener

List selection listener for the remove term types table. Initializes and updates selections on the the removable term types table.

Author:
Deborah Shapiro, Brian Carlsen

Constructor Summary
MRCXTBuilderSourceListSelectionListener(MRCXTBuilderGUI gui, SortableJTable table)
          Instantiates a MRCXTBuilderSourceListSelectionListener with the specified MRCXTBuilderGUI and SortableJTable.
 
Method Summary
 void addSource(int row)
          Selects a row and adds the Source on that row to the list of Sources.
 boolean ignoreEvents()
          Returns boolean to indicate whether or not ListSelectionEvents are to be ignored.
 void removeSource(int row)
          Deselects row and removes the Source on that row from the list of Sources.
 void setIgnoreEvents(boolean b)
          Turns off responses to the ListSelectionEvents.
 void setSelections()
           
 void tableSortFinished(TableSortEvent e)
          Handle finish of table sorting.
 void tableSortStarted(TableSortEvent e)
          Handle start of table sorting.
 void valueChanged(ListSelectionEvent e)
          Listens for changes in the list and validates them.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MRCXTBuilderSourceListSelectionListener

public MRCXTBuilderSourceListSelectionListener(MRCXTBuilderGUI gui,
                                               SortableJTable table)
Instantiates a MRCXTBuilderSourceListSelectionListener with the specified MRCXTBuilderGUI and SortableJTable.

Parameters:
gui - the parent gui MRCXTBuilderGUI
table - the SortableJTable of Sources
Method Detail

setSelections

public void setSelections()

valueChanged

public void valueChanged(ListSelectionEvent e)
Listens for changes in the list and validates them.

Specified by:
valueChanged in interface ListSelectionListener
Parameters:
e - the ListSelectionEvent

ignoreEvents

public boolean ignoreEvents()
Returns boolean to indicate whether or not ListSelectionEvents are to be ignored.

Specified by:
ignoreEvents in interface IgnorableListener
Returns:
boolean

setIgnoreEvents

public void setIgnoreEvents(boolean b)
Turns off responses to the ListSelectionEvents.

Specified by:
setIgnoreEvents in interface IgnorableListener
Parameters:
b - boolean true if events are to be ignored false if events are to be processed

addSource

public void addSource(int row)
Selects a row and adds the Source on that row to the list of Sources.

Parameters:
row - number to be selected and removed

removeSource

public void removeSource(int row)
Deselects row and removes the Source on that row from the list of Sources.

Parameters:
row - number to be deselected and not removed

tableSortStarted

public void tableSortStarted(TableSortEvent e)
Handle start of table sorting.

Specified by:
tableSortStarted in interface TableSortListener
Parameters:
e - TableSortEvent

tableSortFinished

public void tableSortFinished(TableSortEvent e)
Handle finish of table sorting.

Specified by:
tableSortFinished in interface TableSortListener
Parameters:
e - TableSortEvent


Copyright ©2005