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.

Bug 230064 - DB query results: double-clicking on vertical line separating column headers also sorts
Summary: DB query results: double-clicking on vertical line separating column headers ...
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: NETFIX, PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2013-05-21 19:54 UTC by athompson
Modified: 2013-05-29 18:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch v1 (1.81 KB, patch)
2013-05-24 17:53 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description athompson 2013-05-21 19:54:23 UTC
Netbeans' display of DB query results has that nice feature that Microsoft Excel also has: if you double-click on the vertical line separating the column headers, it widens the column to fit the data. Unfortunately, it also incorrectly sorts the results by one of the two columns it straddles. There probably needs to be a "dead zone" around the dividers so this doesn't happen.
Comment 1 matthias42 2013-05-24 17:53:27 UTC
Created attachment 134877 [details]
proposed patch v1

This problem seems to be fallout from the refactoring I did with regard to ResultSetJXTable and the assoziated models.

The SwingX components are more interdependend that I'd wish.

The attached patch does two things:

1. Use the build-in TableColumnModelEx of swingx - without this column hiding/selection in the top-right-corner-icon-menu doesn't work (the menu checks the class of the TableColumnModel)
2. The JXTableHeader has special handling for double clicks, that is only invoked, when a TableSortController is present - change BaseClass of StringFallbackRowSorter from TableRowSorter to TableSortController.
Comment 2 Jaroslav Havlin 2013-05-27 16:16:45 UTC
Patch applied as http://hg.netbeans.org/core-main/rev/8eb4b90c44f8.
Thank you very much, Matthias, for the quick fix.
Comment 3 Quality Engineering 2013-05-28 14:14:17 UTC
Integrated into 'main-golden', will be available in build *201305281155* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8eb4b90c44f8
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #230064: DB query results: double-clicking on vertical line separating column headers also sorts

Patch by Matthias42.
Comment 4 athompson 2013-05-29 18:27:54 UTC
yup.