Class TableModelSelectionAdapter
- java.lang.Object
-
- cern.accsoft.steering.util.gui.table.TableModelSelectionAdapter
-
- All Implemented Interfaces:
java.util.EventListener,javax.swing.event.ListSelectionListener
public class TableModelSelectionAdapter extends java.lang.Object implements javax.swing.event.ListSelectionListenerThis class is the implementation of a listener to remember, which rows in the table are selected and convert the indizes correctly to the model.
-
-
Constructor Summary
Constructors Constructor Description TableModelSelectionAdapter(javax.swing.JTable table)the constructor, which sets the table, which we listen to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetSelectedRowIndex()java.util.List<java.lang.Integer>getSelectedRowIndizes()protected voidselectionChanged(java.lang.Integer selectedRow, java.util.List<java.lang.Integer> selectedRows)this method may be overridden to react on a selcetion-change in a subclassvoidvalueChanged(javax.swing.event.ListSelectionEvent event)
-
-
-
Method Detail
-
valueChanged
public final void valueChanged(javax.swing.event.ListSelectionEvent event)
- Specified by:
valueChangedin interfacejavax.swing.event.ListSelectionListener
-
selectionChanged
protected void selectionChanged(java.lang.Integer selectedRow, java.util.List<java.lang.Integer> selectedRows)this method may be overridden to react on a selcetion-change in a subclass- Parameters:
selectedRow- the actually selected row in the table-modelselectedRows- all selected rows in the table-model
-
getSelectedRowIndizes
public java.util.List<java.lang.Integer> getSelectedRowIndizes()
- Returns:
- the indizes of all selected Rows in terms of the TableModel
-
getSelectedRowIndex
public java.lang.Integer getSelectedRowIndex()
- Returns:
- the index of the actually selected row in terms of the TableModel
-
-