-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dataset manager: change how pull-down list of dataset types handles typed-in letters #44
Comments
Currently the dataset types menu has an action listener, typeAction() For a JComboBox, the action listener gets called whenever an item is selected. This means that typing in a single letter will fire the action event (because almost every letter matches a dataset type), which isn't what we want so this action listener needs to be removed. I see three different ways of interacting with the dataset types menu:
So, I'd suggest adding a PopupMenuListener to call typeAction() when the popup menu is closed (becomes invisible), and we'll see how that works out. |
Catherine, please test in Mac and Windows. I want to make sure it's functioning as expected. |
Back to square one with the code, the code has basically been reverted back to the original code. A new set of eyes should look at this in the future. |
To prevent the datasets from being loaded as soon as a letter is typed, I updated the actionListener to only call typeAction() if the dataset types popup menu is not open. Then I added a popupMenuWillBecomeInvisible listener to trigger the datasets to load when the popup menu is closed. I also added in the variable |
Looking at commit 1648b60, the problem with that code was the key listener that got added. There's no need to specifically listen for the Enter key being pressed because the default Java behavior does what we want. |
For the Show Datasets of Type pull-down in the Dataset Manager window, typing a letter immediately selects the first dataset type starting with that letter. See if this can be changed to just go to that letter in the pull-down and not select the item.
The text was updated successfully, but these errors were encountered: