Class TableSelectionContext
- java.lang.Object
- 
- com.bc.ceres.core.ExtensibleObject
- 
- com.bc.ceres.swing.selection.AbstractSelectionContext
- 
- com.bc.ceres.swing.selection.support.TableSelectionContext
 
 
 
- 
- All Implemented Interfaces:
- Extensible,- SelectionChangeEmitter,- SelectionContext,- SelectionSource
 
 public class TableSelectionContext extends AbstractSelectionContext 
- 
- 
Constructor SummaryConstructors Constructor Description TableSelectionContext(JTable table)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectiongetSelection()Gets the current selection.JTablegetTable()protected voidhandleTableSelectionChanged(ListSelectionEvent event)voidsetSelection(Selection selection)Sets the current selection.voidsetTable(JTable table)- 
Methods inherited from class com.bc.ceres.swing.selection.AbstractSelectionContextaddSelectionChangeListener, canDeleteSelection, canInsert, canSelectAll, deleteSelection, fireSelectionChange, getSelectionChangeListeners, insert, removeSelectionChangeListener, selectAll
 - 
Methods inherited from class com.bc.ceres.core.ExtensibleObjectgetExtension
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface com.bc.ceres.core.ExtensiblegetExtension
 
- 
 
- 
- 
- 
Constructor Detail- 
TableSelectionContextpublic TableSelectionContext(JTable table) 
 
- 
 - 
Method Detail- 
getSelectionpublic Selection getSelection() Gets the current selection. The default implementation returns the selected row indices of the table. If overridden, make sure alsosetSelection(Selection)andhandleTableSelectionChanged(javax.swing.event.ListSelectionEvent)are appropriately overridden.- Returns:
- The current selection.
- See Also:
- Selection.EMPTY,- Selection.isEmpty()
 
 - 
setSelectionpublic void setSelection(Selection selection) Sets the current selection. The default implementation expects the selected row indices of the table in the given selection. If overridden, make sure alsogetSelection()andhandleTableSelectionChanged(javax.swing.event.ListSelectionEvent)are appropriately overridden.- Parameters:
- selection- The current selection.
 
 - 
getTablepublic JTable getTable() 
 - 
setTablepublic void setTable(JTable table) 
 - 
handleTableSelectionChangedprotected void handleTableSelectionChanged(ListSelectionEvent event) 
 
- 
 
-