mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-5769 - Updated dialogs with combo boxes to have consistent behavior
when the Enter key is pressed
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -127,7 +127,6 @@ public class ChooseMatchTagAction extends DockingAction {
|
||||
tagComboBox = new MatchTagComboBox(session, matches, component, selectedTag);
|
||||
Dimension dim = new Dimension(50, tagComboBox.getPreferredSize().height);
|
||||
tagComboBox.setMinimumSize(dim);
|
||||
tagComboBox.addActionListener(e -> fieldEdited());
|
||||
panel.add(tagComboBox, BorderLayout.CENTER);
|
||||
return panel;
|
||||
}
|
||||
@@ -148,12 +147,5 @@ public class ChooseMatchTagAction extends DockingAction {
|
||||
VTMatchTag getSelectedTag() {
|
||||
return selectedTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* An address edit action occurred in the panel so handle it as if ok button were pressed.
|
||||
*/
|
||||
public void fieldEdited() {
|
||||
okCallback();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
* REVIEWED: YES
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -16,10 +15,6 @@
|
||||
*/
|
||||
package ghidra.feature.vt.gui.editors;
|
||||
|
||||
import ghidra.feature.vt.api.main.*;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.util.SystemUtilities;
|
||||
|
||||
import java.awt.Component;
|
||||
import java.awt.event.*;
|
||||
import java.util.*;
|
||||
@@ -29,6 +24,9 @@ import javax.swing.table.TableCellEditor;
|
||||
import javax.swing.table.TableModel;
|
||||
|
||||
import docking.widgets.table.RowObjectTableModel;
|
||||
import ghidra.feature.vt.api.main.*;
|
||||
import ghidra.feature.vt.gui.plugin.VTController;
|
||||
import ghidra.util.SystemUtilities;
|
||||
|
||||
public class MatchTagCellEditor extends AbstractCellEditor implements TableCellEditor {
|
||||
|
||||
@@ -55,12 +53,6 @@ public class MatchTagCellEditor extends AbstractCellEditor implements TableCellE
|
||||
VTSession session = controller.getSession();
|
||||
tag = match.getTag();
|
||||
matchTagChoices = new MatchTagComboBox(session, matches, theTable, tag);
|
||||
matchTagChoices.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
stopCellEditing();
|
||||
}
|
||||
});
|
||||
|
||||
matchTagChoices.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
|
||||
@@ -831,7 +831,7 @@ public class ApplyMarkupPropertyEditor implements OptionsEditor {
|
||||
Enum<?>[] enums = editor.getEnums();
|
||||
|
||||
final JComboBox<Enum<?>> applyComboBox = new GComboBox<>(enums);
|
||||
applyComboBox.addActionListener(e -> changesMade(true));
|
||||
applyComboBox.addItemListener(e -> changesMade(true));
|
||||
|
||||
return applyComboBox;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user