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 1084119..7a8b0bf 100644 --- a/src/main/java/com/luoboduner/moo/info/ui/Init.java +++ b/src/main/java/com/luoboduner/moo/info/ui/Init.java @@ -202,6 +202,8 @@ public class Init { ThreadUtil.execute(OverviewForm::init); ThreadUtil.execute(DetailForm::init); + ThreadUtil.execute(MemoryForm::init); + ThreadUtil.execute(CpuForm::init); ThreadUtil.execute(NetworkForm::init); ThreadUtil.execute(UsbForm::init); ThreadUtil.execute(VariablesForm::init); 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 new file mode 100644 index 0000000..9a0f23f --- /dev/null +++ b/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.form @@ -0,0 +1,12 @@ + +
+ + + + + + + + + +
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 new file mode 100644 index 0000000..8e68ede --- /dev/null +++ b/src/main/java/com/luoboduner/moo/info/ui/form/CpuForm.java @@ -0,0 +1,70 @@ +package com.luoboduner.moo.info.ui.form; + +import cn.hutool.log.Log; +import cn.hutool.log.LogFactory; +import com.intellij.uiDesigner.core.GridLayoutManager; +import lombok.Getter; + +import javax.swing.*; +import java.awt.*; + +/** + * CpuForm + * + * @author RememBerBer + * @since 2021/11/16. + */ +@Getter +public class CpuForm { + private JPanel mainPanel; + + private static final Log logger = LogFactory.get(); + + private static CpuForm cpuForm; + + public static CpuForm getInstance() { + if (cpuForm == null) { + cpuForm = new CpuForm(); + } + return cpuForm; + } + + public static void init() { + cpuForm = getInstance(); + + initUi(); + initInfo(); + } + + private static void initUi() { + } + + private static void 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)); + } + + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return mainPanel; + } +} 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 4f59f7f..3f7afd6 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 @@ -37,7 +37,7 @@ - + @@ -46,7 +46,7 @@ - + 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 f9a40e2..8fa6700 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 @@ -24,6 +24,8 @@ public class MainWindow { private JPanel VariablesPanel; private JPanel processesPanel; private JPanel diskPanel; + private JPanel memoryPanel; + private JPanel cpuPanel; private static MainWindow mainWindow; @@ -43,6 +45,8 @@ public class MainWindow { mainWindow = getInstance(); mainWindow.getOverviewPanel().add(OverviewForm.getInstance().getMainPanel(), gridConstraints); mainWindow.getDetailPanel().add(DetailForm.getInstance().getMainPanel(), gridConstraints); + mainWindow.getMemoryPanel().add(MemoryForm.getInstance().getMainPanel(), gridConstraints); + mainWindow.getCpuPanel().add(CpuForm.getInstance().getMainPanel(), gridConstraints); mainWindow.getNetworkPanel().add(NetworkForm.getInstance().getMainPanel(), gridConstraints); mainWindow.getUsbPanel().add(UsbForm.getInstance().getMainPanel(), gridConstraints); mainWindow.getVariablesPanel().add(VariablesForm.getInstance().getMainPanel(), gridConstraints); @@ -77,12 +81,12 @@ public class MainWindow { detailPanel = new JPanel(); detailPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); tabbedPane.addTab("Detail", detailPanel); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - tabbedPane.addTab("Memory", panel1); - final JPanel panel2 = new JPanel(); - panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - tabbedPane.addTab("CPU", panel2); + memoryPanel = new JPanel(); + memoryPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + tabbedPane.addTab("Memory", memoryPanel); + cpuPanel = new JPanel(); + cpuPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + tabbedPane.addTab("CPU", cpuPanel); diskPanel = new JPanel(); diskPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); tabbedPane.addTab("Disk", diskPanel); 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 new file mode 100644 index 0000000..146b830 --- /dev/null +++ b/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.form @@ -0,0 +1,12 @@ + +
+ + + + + + + + + +
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 new file mode 100644 index 0000000..79cd762 --- /dev/null +++ b/src/main/java/com/luoboduner/moo/info/ui/form/MemoryForm.java @@ -0,0 +1,69 @@ +package com.luoboduner.moo.info.ui.form; + +import cn.hutool.log.Log; +import cn.hutool.log.LogFactory; +import com.intellij.uiDesigner.core.GridLayoutManager; +import lombok.Getter; + +import javax.swing.*; +import java.awt.*; + +/** + * MemoryForm + * + * @author RememBerBer + * @since 2021/11/16. + */ +@Getter +public class MemoryForm { + private static final Log logger = LogFactory.get(); + + private static MemoryForm memoryForm; + private JPanel mainPanel; + + public static MemoryForm getInstance() { + if (memoryForm == null) { + memoryForm = new MemoryForm(); + } + return memoryForm; + } + + public static void init() { + memoryForm = getInstance(); + + initUi(); + initInfo(); + } + + private static void initUi() { + } + + private static void 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)); + } + + /** + * @noinspection ALL + */ + public JComponent $$$getRootComponent$$$() { + return mainPanel; + } +}