GP-5369 Use DropDownTextFieldDataModel for function

editor register storage cell editor
This commit is contained in:
dragonmacher 2025-02-20 17:25:57 -05:00 committed by ghidra1
parent 65c496d833
commit e7b6bb1fcb
4 changed files with 138 additions and 34 deletions

View file

@ -350,7 +350,7 @@ public class DropDownTextField<T> extends JTextField implements GComponent {
// for testing so that we can override, otherwise would be private
protected List<T> getMatchingData(String searchText) {
if (searchText == null || searchText.length() == 0) {
if (searchText == null) {
return Collections.emptyList();
}
@ -372,6 +372,15 @@ public class DropDownTextField<T> extends JTextField implements GComponent {
return matchingWindow.isShowing();
}
/**
* Shows the matching list. This can be used to show all data when the user has not typed any
* text.
*/
public void showMatchingList() {
String text = pendingTextUpdate != null ? pendingTextUpdate : getText();
updateDisplayContents(text);
}
/**
* When true, this field will not pass Enter key press events up to it's parent <b>when the
* drop-down selection window is open</b>. However, an Enter key press will still be