diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.form b/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.form
index 6168f9f..1700000 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.form
@@ -29,7 +29,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.java b/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.java
index 69d0198..83807a2 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.java
@@ -45,6 +45,7 @@ public class CpuForm {
private JLabel freqLabel;
private JLabel InterruptsLabel;
private JLabel contextSwitchesLabel;
+ private JScrollPane scrollPaneLeft;
private static final Log logger = LogFactory.get();
@@ -282,12 +283,12 @@ public class CpuForm {
final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 0), -1, -1));
splitPane1.setLeftComponent(panel2);
- final JScrollPane scrollPane1 = new JScrollPane();
- panel2.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
- scrollPane1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
+ scrollPaneLeft = new JScrollPane();
+ panel2.add(scrollPaneLeft, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
+ scrollPaneLeft.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
final JPanel panel3 = new JPanel();
panel3.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
- scrollPane1.setViewportView(panel3);
+ scrollPaneLeft.setViewportView(panel3);
scuPanel = new JPanel();
scuPanel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
panel3.add(scuPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.form b/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.form
index 8da566c..f44d9a6 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.form
@@ -8,7 +8,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.java b/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.java
index 889d1f2..d1e07f2 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.java
@@ -7,7 +7,7 @@ import com.intellij.uiDesigner.core.GridConstraints;
import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import com.luoboduner.moo.info.App;
-import com.luoboduner.moo.info.ui.UiConsts;
+import com.luoboduner.moo.info.util.ScrollUtil;
import lombok.Getter;
import oshi.hardware.GlobalMemory;
import oshi.hardware.PhysicalMemory;
@@ -51,6 +51,7 @@ public class MemoryForm {
private JLabel jvmAvailableLabel;
private JTextPane physicalMemoryInfoTextPane;
private JLabel physicalMemoryInfoLabel;
+ private JScrollPane scrollPane;
public static MemoryForm getInstance() {
if (memoryForm == null) {
@@ -68,6 +69,8 @@ public class MemoryForm {
ScheduledExecutorService serviceStartPerSecond = Executors.newSingleThreadScheduledExecutor();
serviceStartPerSecond.scheduleAtFixedRate(MemoryForm::initMemoryProgressInfo, 0, 1, TimeUnit.SECONDS);
+ ScrollUtil.smoothPane(memoryForm.getScrollPane());
+
}
private static void initPhysicalMemoryInfo() {
@@ -178,12 +181,12 @@ public class MemoryForm {
private void $$$setupUI$$$() {
mainPanel = new JPanel();
mainPanel.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
- final JScrollPane scrollPane1 = new JScrollPane();
- mainPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
- scrollPane1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
+ scrollPane = new JScrollPane();
+ mainPanel.add(scrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
+ scrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(7, 1, new Insets(0, 0, 0, 0), -1, -1));
- scrollPane1.setViewportView(panel1);
+ scrollPane.setViewportView(panel1);
final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(3, 3, new Insets(10, 10, 10, 10), -1, -1));
panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.form b/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.form
index 60a90f6..dfab81c 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.form
@@ -8,7 +8,7 @@
-
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.java b/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.java
index af91b27..89f33eb 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/OverviewForm.java
@@ -10,6 +10,7 @@ import com.intellij.uiDesigner.core.GridLayoutManager;
import com.intellij.uiDesigner.core.Spacer;
import com.luoboduner.moo.info.App;
import com.luoboduner.moo.info.ui.Style;
+import com.luoboduner.moo.info.util.ScrollUtil;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
import oshi.hardware.*;
@@ -58,6 +59,7 @@ public class OverviewForm {
private JLabel powerSourceInfoLabel;
private JLabel firmwareInfoLabel;
private JLabel firmwareLabel;
+ private JScrollPane scrollPane;
public static OverviewForm getInstance() {
if (overviewForm == null) {
@@ -98,6 +100,8 @@ public class OverviewForm {
overviewForm.getSoundCardLabel().setIcon(new FlatSVGIcon("icons/sound.svg"));
overviewForm.getPowerSourceLabel().setIcon(new FlatSVGIcon("icons/battery.svg"));
overviewForm.getFirmwareLabel().setIcon(new FlatSVGIcon("icons/firmware.svg"));
+
+ ScrollUtil.smoothPane(overviewForm.getScrollPane());
}
private static void initInfo() {
@@ -327,12 +331,12 @@ public class OverviewForm {
private void $$$setupUI$$$() {
mainPanel = new JPanel();
mainPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
- final JScrollPane scrollPane1 = new JScrollPane();
- mainPanel.add(scrollPane1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
- scrollPane1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
+ scrollPane = new JScrollPane();
+ mainPanel.add(scrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
+ scrollPane.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
final JPanel panel1 = new JPanel();
panel1.setLayout(new GridLayoutManager(4, 1, new Insets(10, 10, 10, 10), -1, -1));
- scrollPane1.setViewportView(panel1);
+ scrollPane.setViewportView(panel1);
final JPanel panel2 = new JPanel();
panel2.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));