List of usage examples for javax.swing.event ListSelectionEvent getLastIndex
public int getLastIndex()
From source file:com.mirth.connect.client.ui.editors.transformer.TransformerPane.java
private void TransformerListSelected(ListSelectionEvent evt) { updating = true;//from w w w. jav a2s. c o m int row = transformerTable.getSelectedRow(); int last = evt.getLastIndex(); if (row != prevSelRow) { saveData(prevSelRow); if (invalidVar) { row = prevSelRow; invalidVar = false; } if (isValid(row)) { loadData(row); } else if (isValid(last)) { loadData(last); row = last; } String type = (String) transformerTable.getValueAt(row, STEP_TYPE_COL); stepPanel.showCard(type); transformerTable.setRowSelectionInterval(row, row); prevSelRow = row; updateTaskPane(type); } updateCodePanel(null); updating = false; }