Merge pull request #2261 from karlmortensen/focusOnAction

Set focus to new keyword text box upon events
This commit is contained in:
Richard Cordovano 2016-06-28 17:40:29 -04:00 committed by GitHub
commit c2bc9d3d73
2 changed files with 8 additions and 1 deletions

View File

@ -454,7 +454,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis
chRegex.setSelected(false);
addWordField.setText("");
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
setFocusOnKeywordTextBox();
setButtonStates();
}//GEN-LAST:event_addWordButtonActionPerformed

View File

@ -26,6 +26,7 @@ import java.util.ArrayList;
import java.util.List;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.swing.table.AbstractTableModel;
@ -65,6 +66,12 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa
listsTable.setRowSelectionAllowed(true);
tableModel.resync();
listsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
@Override
public void valueChanged(ListSelectionEvent e) {
globalListSettingsPanel.setFocusOnKeywordTextBox();
}
});
/*
* XmlKeywordSearchList.getCurrent().addPropertyChangeListener(new
* PropertyChangeListener() {