diff --git a/src/main/java/com/luoboduner/moo/info/ui/Init.java b/src/main/java/com/luoboduner/moo/info/ui/Init.java
index 7a8b0bf..c0ff2e4 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/Init.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/Init.java
@@ -209,6 +209,7 @@ public class Init {
ThreadUtil.execute(VariablesForm::init);
ThreadUtil.execute(ProcessesForm::init);
ThreadUtil.execute(DiskForm::init);
+ ThreadUtil.execute(PowerSourceForm::init);
// Check the new version
if (App.config.isAutoCheckUpdate()) {
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.form b/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.form
index 3f7afd6..a8283fa 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.form
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.form
@@ -100,6 +100,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java b/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java
index 8fa6700..9b84c70 100644
--- a/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/MainWindow.java
@@ -26,6 +26,7 @@ public class MainWindow {
private JPanel diskPanel;
private JPanel memoryPanel;
private JPanel cpuPanel;
+ private JPanel powerPanel;
private static MainWindow mainWindow;
@@ -52,6 +53,7 @@ public class MainWindow {
mainWindow.getVariablesPanel().add(VariablesForm.getInstance().getMainPanel(), gridConstraints);
mainWindow.getProcessesPanel().add(ProcessesForm.getInstance().getMainPanel(), gridConstraints);
mainWindow.getDiskPanel().add(DiskForm.getInstance().getMainPanel(), gridConstraints);
+ mainWindow.getPowerPanel().add(PowerSourceForm.getInstance().getMainPanel(), gridConstraints);
mainWindow.getMainPanel().updateUI();
}
@@ -102,6 +104,9 @@ public class MainWindow {
usbPanel = new JPanel();
usbPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
tabbedPane.addTab("USB Devices", usbPanel);
+ powerPanel = new JPanel();
+ powerPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
+ tabbedPane.addTab("Power", powerPanel);
}
/**
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/PowerSourceForm.form b/src/main/java/com/luoboduner/moo/info/ui/form/PowerSourceForm.form
new file mode 100644
index 0000000..0f7b998
--- /dev/null
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/PowerSourceForm.form
@@ -0,0 +1,29 @@
+
+
diff --git a/src/main/java/com/luoboduner/moo/info/ui/form/PowerSourceForm.java b/src/main/java/com/luoboduner/moo/info/ui/form/PowerSourceForm.java
new file mode 100644
index 0000000..2f96f5d
--- /dev/null
+++ b/src/main/java/com/luoboduner/moo/info/ui/form/PowerSourceForm.java
@@ -0,0 +1,73 @@
+package com.luoboduner.moo.info.ui.form;
+
+import cn.hutool.log.Log;
+import cn.hutool.log.LogFactory;
+import com.intellij.uiDesigner.core.GridConstraints;
+import com.intellij.uiDesigner.core.GridLayoutManager;
+import lombok.Getter;
+
+import javax.swing.*;
+import javax.swing.border.TitledBorder;
+import java.awt.*;
+
+/**
+ * NetworkForm
+ *
+ * @author RememBerBer
+ * @since 2021/11/21.
+ */
+@Getter
+public class PowerSourceForm {
+ private JPanel mainPanel;
+
+ private static final Log logger = LogFactory.get();
+
+ private static PowerSourceForm powerSourceForm;
+
+ public static PowerSourceForm getInstance() {
+ if (powerSourceForm == null) {
+ powerSourceForm = new PowerSourceForm();
+ }
+ return powerSourceForm;
+ }
+
+ public static void init() {
+ powerSourceForm = getInstance();
+
+// initUi();
+// initInfo();
+ }
+
+ {
+// GUI initializer generated by IntelliJ IDEA GUI Designer
+// >>> IMPORTANT!! <<<
+// DO NOT EDIT OR ADD ANY CODE HERE!
+ $$$setupUI$$$();
+ }
+
+ /**
+ * Method generated by IntelliJ IDEA GUI Designer
+ * >>> IMPORTANT!! <<<
+ * DO NOT edit this method OR call it in your code!
+ *
+ * @noinspection ALL
+ */
+ 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));
+ final JPanel panel1 = new JPanel();
+ panel1.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
+ scrollPane1.setViewportView(panel1);
+ }
+
+ /**
+ * @noinspection ALL
+ */
+ public JComponent $$$getRootComponent$$$() {
+ return mainPanel;
+ }
+
+}