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 e1c075f..810b813 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 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 3133781..4658900 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 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; + 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(); + } } } 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}