From 94e7f29869c2cef8cc90db16acf631eeed3ec59d Mon Sep 17 00:00:00 2001 From: James Mark Chan Date: Sun, 4 Oct 2026 19:16:40 -0700 Subject: [PATCH 1/2] #232 dynamic benchmark bar --- jdm-core/docs/design.md | 1 + .../src/main/java/jdiskmark/MainFrame.java | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/jdm-core/docs/design.md b/jdm-core/docs/design.md index e1c075f..7e34a19 100644 --- a/jdm-core/docs/design.md +++ b/jdm-core/docs/design.md @@ -6,6 +6,7 @@ - the top-left section of the benchmark tab is called the settings controls - the top-right section of the benchmark is the chart - the bottom section is the historical list of runs and common status output +- the Total Tx progress bar below the bottom tabs is visible only on the Benchmark tab or while a benchmark/batch is running; otherwise it is hidden and its space goes to the bottom tabs (`MainFrame.updateProgressPanelVisibility`) # Active design trades diff --git a/jdm-core/src/main/java/jdiskmark/MainFrame.java b/jdm-core/src/main/java/jdiskmark/MainFrame.java index 3133781..b32c2bb 100644 --- a/jdm-core/src/main/java/jdiskmark/MainFrame.java +++ b/jdm-core/src/main/java/jdiskmark/MainFrame.java @@ -208,6 +208,8 @@ public MainFrame() { } }); + mainTabPane.addChangeListener(e -> updateProgressPanelVisibility()); + // Rebuild the content pane: mainTabPane (top) and the bottom panel (tabbedPane + // progress bar) are separated by a draggable vertical JSplitPane divider. getContentPane().removeAll(); @@ -238,6 +240,7 @@ public void componentResized(java.awt.event.ComponentEvent e) { }); getContentPane().add(splitPane, BorderLayout.CENTER); + updateProgressPanelVisibility(); // Ensure the frame is tall enough to show 5 rows in the bottom table. // pack() sizes to preferred; we nudge the height up slightly after packing. @@ -1194,5 +1197,25 @@ public void adjustSensitivity() { exportMenu.setEnabled(App.benchmark != null); } } + updateProgressPanelVisibility(); + } + + /** + * The Total Tx progress bar is shown on the Benchmark tab, or on any tab + * while a benchmark or batch is in progress; otherwise its space is given + * to the bottom tabbed pane. + */ + private void updateProgressPanelVisibility() { + boolean busy = App.state == App.State.DISK_TEST_STATE || App.batchRunning; + boolean onBenchmarkTab = false; + if (Gui.mainTabPane != null) { + int sel = Gui.mainTabPane.getSelectedIndex(); + onBenchmarkTab = sel >= 0 && Tabs.TOP_BENCHMARK.equals(Gui.mainTabPane.getTitleAt(sel)); + } + boolean visible = busy || onBenchmarkTab; + if (progressPanel.isVisible() != visible) { + progressPanel.setVisible(visible); + if (progressPanel.getParent() != null) progressPanel.getParent().revalidate(); + } } } From 10d27dba2851cc71327ab2813e9d4e958b098843 Mon Sep 17 00:00:00 2001 From: James Mark Chan Date: Sun, 4 Oct 2026 20:03:29 -0700 Subject: [PATCH 2/2] #232 decluple normal progress from batch progress --- CHANGELOG.md | 8 ++++++-- jdm-core/docs/design.md | 2 +- jdm-core/src/main/java/jdiskmark/MainFrame.java | 4 ++-- pom.xml | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a842345..b79594c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,14 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] — v1.0.0 -### Planned +### added +- #232 dynamic hiding of benchmark progress bar + +### Planned/Proposed - [#118](https://github.com/JDiskMark/jdm-java/issues/118) test interlock or OAuth upload +- refactor package classes -## [0.9.0] - in development +## [0.9.0] - #205 drive dropdown linux - #209 usb support linux - #213 usb support macos diff --git a/jdm-core/docs/design.md b/jdm-core/docs/design.md index 7e34a19..810b813 100644 --- a/jdm-core/docs/design.md +++ b/jdm-core/docs/design.md @@ -6,7 +6,7 @@ - the top-left section of the benchmark tab is called the settings controls - the top-right section of the benchmark is the chart - the bottom section is the historical list of runs and common status output -- the Total Tx progress bar below the bottom tabs is visible only on the Benchmark tab or while a benchmark/batch is running; otherwise it is hidden and its space goes to the bottom tabs (`MainFrame.updateProgressPanelVisibility`) +- the Total Tx progress bar below the bottom tabs is visible only on the Benchmark tab or while a non-batch benchmark is running; batch runs use their own progress view. Otherwise it is hidden and its space goes to the bottom tabs (`MainFrame.updateProgressPanelVisibility`) # Active design trades diff --git a/jdm-core/src/main/java/jdiskmark/MainFrame.java b/jdm-core/src/main/java/jdiskmark/MainFrame.java index b32c2bb..4658900 100644 --- a/jdm-core/src/main/java/jdiskmark/MainFrame.java +++ b/jdm-core/src/main/java/jdiskmark/MainFrame.java @@ -1202,11 +1202,11 @@ public void adjustSensitivity() { /** * The Total Tx progress bar is shown on the Benchmark tab, or on any tab - * while a benchmark or batch is in progress; otherwise its space is given + * while a non batch benchmark is in progress; otherwise its space is given * to the bottom tabbed pane. */ private void updateProgressPanelVisibility() { - boolean busy = App.state == App.State.DISK_TEST_STATE || App.batchRunning; + boolean busy = App.state == App.State.DISK_TEST_STATE; boolean onBenchmarkTab = false; if (Gui.mainTabPane != null) { int sel = Gui.mainTabPane.getSelectedIndex(); diff --git a/pom.xml b/pom.xml index 6264586..b3a0271 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ - 0.9.0 + 0.10.0-SNAPSHOT UTF-8 25 jdiskmark.App @@ -41,7 +41,7 @@ format — no letters, no -SNAPSHOT. This is an MSI format restriction, not jpackage itself. Linux packages (DEB/RPM) can use the full project.version. Update this alongside project.version when cutting a release. --> - 0.9.0 + 0.10.0 ${app.name} ${project.version} ${pkg.name}-${msi.version}