RFR: 7441: JVM System information tables do not scroll horizontally

Alex Macdonald aptmac at openjdk.org
Fri Jul 14 01:30:24 UTC 2023


This PR addresses JMC-7441 [[0]](https://bugs.openjdk.org/browse/JMC-7441), in which the tables on the System tab in the JVM Browser don't scroll horizontally.

While looking into this I noticed it affects many more tables, potentially most notable would be the automated analysis report ui, but that should be taken care of in a separate ticket.

The problem is that the column sizes aren't being set appropriately to the contents of the table. This affects the tables initialized with `SWT.VIRTUAL`, because these are lazy loaded and are not always fully filled out when it's time for the table to paint. I was playing around with an idea of adding a listener on the `SWT.Paint` event and having the columns re-sized in an attempt to keep these as virtual tables, but the initial re-paint was jarring visually. Also it might not make sense for (some of) these tables to be virtual; they don't contain a large amount of information and/or aren't mutable.

For the sake of the JVM Browser System tab tables, I just made these tables non-virtual and added a column packing function to the ColumnManager. The result is now the entire contents can be viewed in the table.

[0] https://bugs.openjdk.org/browse/JMC-7441

-------------

Commit messages:
 - 7441: JVM System information tables do not scroll horizontally

Changes: https://git.openjdk.org/jmc/pull/505/files
 Webrev: https://webrevs.openjdk.org/?repo=jmc&pr=505&range=00
  Issue: https://bugs.openjdk.org/browse/JMC-7441
  Stats: 15 lines in 3 files changed: 8 ins; 2 del; 5 mod
  Patch: https://git.openjdk.org/jmc/pull/505.diff
  Fetch: git fetch https://git.openjdk.org/jmc.git pull/505/head:pull/505

PR: https://git.openjdk.org/jmc/pull/505


More information about the jmc-dev mailing list