This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Inability to persist column sorting | ||
---|---|---|---|
Product: | platform | Reporter: | Martin Entlicher <mentlicher> |
Component: | Outline&TreeTable | Assignee: | Jiri Rechtacek <jrechtacek> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 136658 |
Description
Martin Entlicher
2008-10-24 15:20:44 UTC
reassigning to new component owner > In TTV we used "SortingColumnTTV" and "DescendingOrderTTV" properties to > set sorting programmatically because of > persistence. In Outline we did not find similar functionality. > > ETableColumn has public methods isSorted(), getSortRank() and > isAscending(), but corresponding setSorted(), > setSortRank() and setAscending() are package-private. I made it public. > Also, protected getRowComparator() is impossible to override for us, > because instance of protected class OutlineColumn > is created through protected Outline.createColumn(int), which we can not > override, because that method is already > overriden in a private class OutlineViewOutline, returning > implementation of private class OutlineViewOutlineColumn. That's true. > I consider this to be a design mistake to hide these protected methods > this way. We might want to override e.g. > isSortingAllowed() I'll solve it later. > and especially the getRowComparator() to define > comparator for integers for instance. Now we must use > a hack to prepend numbers with spaces to get correct numerical sorting > through alphabetical one. No need to solve it in this way. Outline uses j.l.Comparable interface to order rows. If column's class is Integer, will sorted naturally as numbers. For own order you can wrap Integer to YourInteger class and define own comparator. Fixed in rev/13b0821dda4a Integrated into 'main-golden', will be available in build *200901110304* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/13b0821dda4a User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #151294: Inability to persist column sorting |