Hi NetBeans developers, I am trying to save and restore the settings (sorting direction, visible columns) of an OutlineView in an @ConvertAsProperties-annotated TopComponent.
This seems to be simple enough:
void readProperties(Properties properties) {
outlineView.readSettings(properties, PREFX);
}
void writeProperties(Properties properties) {
outlineView.writeeadSettings(properties, PREFX);
}
This works *but* the Javadoc of OutlineView.read/writeSettings
emphatically states that
> The stored values should be only those that the user has customized, it does
> not make sense to store the values that were set using the initialization
> code because the initialization code can be run in the same way after restart.
Alas, I am at a loss how I am meant to achieve that. Manually remove
properties keys? Override some method (if haven't found yet) in
OutlineView to tell it what the defaults are?
I've searched through the entire NetBeans 9 codebase looking for usages
of OutlineView.read/writeSettings but unfortunately found none. How am I
meant to store only changed values? How are these methods supposed to be
used?
Maybe somebody on this list can help me out. (I would volunteer for a PR
improving the Javadoc then. ;-)
Best wishes,
Andreas
--
Dr. Andreas Sewe | [email protected] | +49 152 56342856
CQSE GmbH | Lichtenbergstrasse 8 | 85748 Garching | www.cqse.eu
Amtsgericht Muenchen | HRB 177678 | GF: F. Deissenboeck, M. Feilkas
signature.asc
Description: OpenPGP digital signature
