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

Allow the developer to specify that the ListSelectionView source and target lists should be sorted. #1446

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

torrlane
Copy link

When a user moves an item from the source list to the target list, or vice versa. The item always appears at the end of the destination list. This can sometimes be undesirable behaviour e.g. if the destination list is very long, then it might not be obvious that the item has arrived.

I think that it would be useful to allow the developer to set a sort order on the lists so that it should be easier for the user to find things and more obvious when they have added / removed entries.

@github-actions
Copy link

Hi torrlane,

Welcome to ControlsFX and thank you for taking time to contribute to this project.

We do not recognise you as a contributor. Can you please sign ControlsFX Individual Contributor Agreement: https://cla.controlsfx.org ?

@github-actions github-actions bot added the CLA label May 26, 2022
@torrlane torrlane changed the title Allow the developer to specify that the source and target lists should be sorted. Allow the developer to specify that the ListSelectionView source and target lists should be sorted. May 26, 2022
@@ -474,6 +475,22 @@ protected final void setEventHandler(Consumer<ActionEvent> eventHandler) {
super.setEventHandler(eventHandler);
}
}

private Comparator<T> comparator;
Copy link
Member

Choose a reason for hiding this comment

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

Please convert this into ObjectProperty<Comparator>. Have a look into other properties in the class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants