Skip to content
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

AutoFilterComboBox-raw-type #203

Merged
merged 5 commits into from
Nov 10, 2021

Conversation

fredg1
Copy link
Contributor

@fredg1 fredg1 commented Nov 9, 2021

AutoFilterComboBox was split into two "modes": editable, and not.

This PR isolates the editable mode into its own class, "EditableAutoFilterComboBox", whose generic is locked as String.

This allows AutoFilterComboBox to have its own Generic.

@fredg1 fredg1 requested a review from a team as a code owner November 9, 2021 22:36
@heeheehee-kolmafia heeheehee-kolmafia self-assigned this Nov 9, 2021
Copy link
Contributor

@heeheehee-kolmafia heeheehee-kolmafia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine modulo a tiny nitpick.

}

public String getText() {
return (String) (this.getSelectedItem() != null ? this.getSelectedItem() : this.currentMatch);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I hate that LcokableListModel.getSelectedItem returns an Object instead of a genericized type...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(why are we even still using that? Wasn't it used for the lockable aspect, which got removed?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, LockableListModel is a (Swing) ListModel that has a notion of visible / hidden elements based on a custom filter.

@heeheehee-kolmafia heeheehee-kolmafia merged commit 25e821d into kolmafia:main Nov 10, 2021
@fredg1 fredg1 deleted the AutoFilterComboBox-raw-type branch November 10, 2021 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants