Community
Participate
Working Groups
The ListEditor does not allow subclasses to determine which buttons are present, for example, I only want users to be able to reorder a predefined sequence, so I want to hide NEW and REMOVE, but as they are all bunched inside 'createButtons(..)' I cannot. One solution would be to allow a 'style' attribute to be specified in the constructor (as I am doing in my own branch of ListEditor). I can provide the modified class if required. Cheers.
Your suggestions would be appreciated. If you would like to attach your modified class I would be happy to review your ideas.
Created attachment 2602 [details] Modified ListEditor.java class file from JFace preferences, allows buttons to be selectable
Why can you not such subclass ListEditor and modify createButtons and setEnabled? What you are asking for is a bit more configurability than this simple control was designed for.
Hmm, making components more flexible can only be a good thing yes?, especially when the changes involved are minor, as these are. Besides, to do as you suggest, a lot of methods would have to be exposed to subclasses, - reimplementing Up/Down behaviour /listener code etc would be annoying. Making the component more flexible might extend its applicability, reducing the need for subclassing and reimplementation of already implemented code. But Hey, at the end of the day Ive provided the mods Ive made to the class and am using it in isolation from jFace, if you dont believe its worth integrating, then fine :) Cheers
This was meant to be a simple little component - your changes are great and represent the spirit of why we supply simple JFace components - to give developers like yourself a good place to start if they need more. I am going to mark this as WONTFIX as the change in behaviour is not worth the potential risk to other developers. Thanks for your input and for using Eclipse.
Odd the WONTFIX fell off this bug, even though there was no evidence of when that happened in the bug activity. Re-marking for completeness.