org.springframework.richclient.form
Class AbstractMasterForm.ListSelectionHandler

java.lang.Object
  extended by org.springframework.richclient.table.ListSelectionListenerSupport
      extended by org.springframework.richclient.form.AbstractMasterForm.ListSelectionHandler
All Implemented Interfaces:
EventListener, ListSelectionListener
Enclosing class:
AbstractMasterForm

protected class AbstractMasterForm.ListSelectionHandler
extends ListSelectionListenerSupport

Inner class to handle the list selection and installing the selection into the detail form.


Constructor Summary
protected AbstractMasterForm.ListSelectionHandler()
           
 
Method Summary
protected  void maybeChangeSelection(int newIndex)
          Deal with a change in the selected index.
protected  void onNoSelection()
          Called when nothing gets selected.
protected  void onSingleSelection(int index)
          Called when the user selects a single row.
 
Methods inherited from class org.springframework.richclient.table.ListSelectionListenerSupport
getItemsSelected, onMultiSelection, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMasterForm.ListSelectionHandler

protected AbstractMasterForm.ListSelectionHandler()
Method Detail

onNoSelection

protected void onNoSelection()
Called when nothing gets selected. Override this method to handle empty selection

Overrides:
onNoSelection in class ListSelectionListenerSupport

onSingleSelection

protected void onSingleSelection(int index)
Called when the user selects a single row. Override this method to handle single selection

Overrides:
onSingleSelection in class ListSelectionListenerSupport
Parameters:
index - the selected row

maybeChangeSelection

protected void maybeChangeSelection(int newIndex)
Deal with a change in the selected index. If we have unsaved changes, then we need to query the user to ensure they want to really make the change.

Parameters:
newIndex - The new selection index, may be -1 to clear the selection


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.