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

Grouping properties in a group (formerly "Which properties have changed?") #4

Open
vicenrico opened this issue Dec 30, 2017 · 3 comments

Comments

@vicenrico
Copy link
Contributor

Is there any option to know which properties have changed? Or should I implement the usual propertychagelistener code?

@albertus82 albertus82 self-assigned this Dec 30, 2017
@albertus82
Copy link
Owner

albertus82 commented Dec 30, 2017

Hi @vicenrico, you can try PropertiesComparator: first, create a CompareResults object:

CompareResults results = PropertiesComparator.compare(before, after);

then call results.getRightOnly(), results.getLeftOnly() or results.getDifferentValues().

For a real-world example, you can see: ConfigurationHandler.java, method doPost.

@albertus82 albertus82 changed the title Whichs properties have changed? Which properties have changed? Dec 30, 2017
@vicenrico
Copy link
Contributor Author

Ok. Thanks again. Now I have another problem. I have a label with foreground and background color, and and I'd like to group both properties in a group, like your example for Radiogroupfieldeditor. Is it possible this behaviour? Or is it only for radio buttons?

@albertus82
Copy link
Owner

albertus82 commented Dec 31, 2017

Sorry @vicenrico, this feature is missing. You can use isSeparate() (PreferenceDetails/IPreference) to emulate grouping of properties.

Happy new year!

@albertus82 albertus82 changed the title Which properties have changed? Grouping properties in a group (formerly "Which properties have changed?") Dec 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants