From 87cba68fcf1ea002d6918557e561f919e579e433 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 5 Jul 2019 02:54:48 -0400 Subject: [PATCH] ChartScoll - human index & label mouse over tooltip --- java_console/ui/src/com/rusefi/Launcher.java | 2 +- java_console/ui/src/com/rusefi/ui/ChartScrollControl.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index bd2e7f6d23..2aeb17896d 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -46,7 +46,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig; * @see EngineSnifferPanel */ public class Launcher { - public static final int CONSOLE_VERSION = 20190701; + public static final int CONSOLE_VERSION = 20190705; public static final boolean SHOW_STIMULATOR = false; public static final String INPUT_FILES_PATH = ".."; private static final String TAB_INDEX = "main_tab"; diff --git a/java_console/ui/src/com/rusefi/ui/ChartScrollControl.java b/java_console/ui/src/com/rusefi/ui/ChartScrollControl.java index 6da0386cc3..8345d9ff59 100644 --- a/java_console/ui/src/com/rusefi/ui/ChartScrollControl.java +++ b/java_console/ui/src/com/rusefi/ui/ChartScrollControl.java @@ -22,6 +22,7 @@ public class ChartScrollControl { public ChartScrollControl(final ChartRepository.ChartRepositoryListener listener) { this.listener = listener; + info.setToolTipText("Current page index / total pages count"); content.setBorder(BorderFactory.createLineBorder(Color.red)); @@ -104,7 +105,8 @@ public class ChartScrollControl { } private void setInfoText(AtomicInteger index) { - info.setText(index.get() + "/" + ChartRepository.getInstance().getSize()); + int humanIndex = index.get() + 1; + info.setText(humanIndex + "/" + ChartRepository.getInstance().getSize()); } public void reset() {