Merge remote-tracking branch

'origin/GP-1-dragonmacher-structure-editor-keyboard-fix' (#3561)
This commit is contained in:
Ryan Kurtz 2023-03-14 06:11:19 -04:00
commit 3be7e2d0a6

View File

@ -79,7 +79,7 @@ public abstract class CompositeEditorPanel extends JPanel
protected CompositeEditorProvider provider;
protected CompositeEditorModel model;
protected CompositeTable table;
protected GTable table;
private JLabel statusLabel;
private boolean editorAdjusting = false;
@ -558,7 +558,7 @@ public abstract class CompositeEditorPanel extends JPanel
}
private void createTable() {
table = new CompositeTable(model);
table = new GTable(model);
TableColumnModel columnModel = table.getColumnModel();
if (columnModel instanceof GTableColumnModel) {
@ -1332,7 +1332,7 @@ public abstract class CompositeEditorPanel extends JPanel
@Override
public void focusEditor() {
textField.requestFocusInWindow();
boolean didFocus = textField.requestFocusInWindow();
}
@Override
@ -1490,20 +1490,4 @@ public abstract class CompositeEditorPanel extends JPanel
e.consume();
}
}
class CompositeTable extends GTable {
public CompositeTable(TableModel dm) {
super(dm);
}
@Override
// overridden because the editor component was not being given focus
public Component prepareEditor(TableCellEditor editor, int row, int column) {
final Component component = super.prepareEditor(editor, row, column);
Swing.runLater(() -> component.requestFocus());
return component;
}
}
}