detail form first step
This commit is contained in:
parent
c7035f87ee
commit
22c29caf90
|
@ -125,7 +125,7 @@
|
||||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<properties>
|
<properties>
|
||||||
<editable value="false"/>
|
<editable value="true"/>
|
||||||
</properties>
|
</properties>
|
||||||
</component>
|
</component>
|
||||||
</children>
|
</children>
|
||||||
|
|
|
@ -7,7 +7,6 @@ import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||||
import com.intellij.uiDesigner.core.Spacer;
|
import com.intellij.uiDesigner.core.Spacer;
|
||||||
import com.luoboduner.moo.info.App;
|
import com.luoboduner.moo.info.App;
|
||||||
import com.luoboduner.moo.info.ui.Style;
|
import com.luoboduner.moo.info.ui.Style;
|
||||||
import com.luoboduner.moo.info.ui.UiConsts;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import oshi.hardware.CentralProcessor;
|
import oshi.hardware.CentralProcessor;
|
||||||
|
|
||||||
|
@ -99,9 +98,12 @@ public class CpuForm {
|
||||||
CpuForm cpuForm = getInstance();
|
CpuForm cpuForm = getInstance();
|
||||||
JTextPane cpuInfoTextPane = cpuForm.getCpuInfoTextPane();
|
JTextPane cpuInfoTextPane = cpuForm.getCpuInfoTextPane();
|
||||||
|
|
||||||
|
CentralProcessor cpu = App.si.getHardware().getProcessor();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(App.si.getHardware().getProcessor());
|
sb.append(cpu);
|
||||||
|
sb.append(cpu.getProcessorIdentifier());
|
||||||
cpuInfoTextPane.setText(sb.toString());
|
cpuInfoTextPane.setText(sb.toString());
|
||||||
|
// cpu.getCurrentFreq()
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initInfo() {
|
private static void initInfo() {
|
||||||
|
@ -231,7 +233,7 @@ public class CpuForm {
|
||||||
panel4.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
panel4.setLayout(new GridLayoutManager(1, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||||
panel3.add(panel4, 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));
|
panel3.add(panel4, 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));
|
||||||
cpuInfoTextPane = new JTextPane();
|
cpuInfoTextPane = new JTextPane();
|
||||||
cpuInfoTextPane.setEditable(false);
|
cpuInfoTextPane.setEditable(true);
|
||||||
panel4.add(cpuInfoTextPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
panel4.add(cpuInfoTextPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||||
final Spacer spacer2 = new Spacer();
|
final Spacer spacer2 = new Spacer();
|
||||||
panel3.add(spacer2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
panel3.add(spacer2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package com.luoboduner.moo.info.ui.frame;
|
package com.luoboduner.moo.info.ui.frame;
|
||||||
|
|
||||||
import cn.hutool.core.thread.ThreadUtil;
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
|
import com.formdev.flatlaf.extras.FlatSVGUtils;
|
||||||
import com.luoboduner.moo.info.ui.UiConsts;
|
import com.luoboduner.moo.info.ui.UiConsts;
|
||||||
import com.luoboduner.moo.info.ui.component.TopMenuBar;
|
import com.luoboduner.moo.info.ui.component.TopMenuBar;
|
||||||
import com.luoboduner.moo.info.ui.listener.FrameListener;
|
import com.luoboduner.moo.info.ui.listener.FrameListener;
|
||||||
import com.luoboduner.moo.info.util.ComponentUtil;
|
import com.luoboduner.moo.info.util.ComponentUtil;
|
||||||
import com.luoboduner.moo.info.util.FrameUtil;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
|
@ -20,7 +20,8 @@ public class MainFrame extends JFrame {
|
||||||
public void init() {
|
public void init() {
|
||||||
this.setName(UiConsts.APP_NAME);
|
this.setName(UiConsts.APP_NAME);
|
||||||
this.setTitle(UiConsts.APP_NAME);
|
this.setTitle(UiConsts.APP_NAME);
|
||||||
FrameUtil.setFrameIcon(this);
|
// FrameUtil.setFrameIcon(this);
|
||||||
|
setIconImages(FlatSVGUtils.createWindowIconImages("/icons/MooInfo.svg"));
|
||||||
TopMenuBar topMenuBar = TopMenuBar.getInstance();
|
TopMenuBar topMenuBar = TopMenuBar.getInstance();
|
||||||
topMenuBar.init();
|
topMenuBar.init();
|
||||||
setJMenuBar(topMenuBar);
|
setJMenuBar(topMenuBar);
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1636192961316" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2939" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024" height="1024"><defs><style type="text/css"></style></defs><path d="M153.6 153.6m81.92 0l552.96 0q81.92 0 81.92 81.92l0 552.96q0 81.92-81.92 81.92l-552.96 0q-81.92 0-81.92-81.92l0-552.96q0-81.92 81.92-81.92Z" fill="#713A91" p-id="2940"></path><path d="M296.96 358.4a61.44 61.44 0 0 1 61.44-61.44h307.2a61.44 61.44 0 0 1 61.44 61.44v307.2a61.44 61.44 0 0 1-61.44 61.44H358.4a61.44 61.44 0 0 1-61.44-61.44V358.4z" fill="#BC7ABC" p-id="2941"></path><path d="M286.72 30.72a40.96 40.96 0 0 0-40.96 40.96v81.92h81.92V71.68a40.96 40.96 0 0 0-40.96-40.96z m153.6 0a40.96 40.96 0 0 0-40.96 40.96v81.92h81.92V71.68a40.96 40.96 0 0 0-40.96-40.96z m112.64 40.96a40.96 40.96 0 0 1 81.92 0v81.92h-81.92V71.68z m194.56-40.96a40.96 40.96 0 0 0-40.96 40.96v81.92h81.92V71.68a40.96 40.96 0 0 0-40.96-40.96zM30.72 286.72a40.96 40.96 0 0 1 40.96-40.96h81.92v81.92H71.68a40.96 40.96 0 0 1-40.96-40.96z m0 153.6a40.96 40.96 0 0 1 40.96-40.96h81.92v81.92H71.68a40.96 40.96 0 0 1-40.96-40.96z m40.96 112.64a40.96 40.96 0 0 0 0 81.92h81.92v-81.92H71.68zM30.72 747.52a40.96 40.96 0 0 1 40.96-40.96h81.92v81.92H71.68a40.96 40.96 0 0 1-40.96-40.96z m962.56-460.8a40.96 40.96 0 0 0-40.96-40.96h-81.92v81.92h81.92a40.96 40.96 0 0 0 40.96-40.96z m0 153.6a40.96 40.96 0 0 0-40.96-40.96h-81.92v81.92h81.92a40.96 40.96 0 0 0 40.96-40.96z m-40.96 112.64a40.96 40.96 0 0 1 0 81.92h-81.92v-81.92h81.92z m40.96 194.56a40.96 40.96 0 0 0-40.96-40.96h-81.92v81.92h81.92a40.96 40.96 0 0 0 40.96-40.96zM245.76 952.32a40.96 40.96 0 0 0 81.92 0v-81.92h-81.92v81.92z m153.6 0a40.96 40.96 0 0 0 81.92 0v-81.92h-81.92v81.92z m194.56 40.96a40.96 40.96 0 0 1-40.96-40.96v-81.92h81.92v81.92a40.96 40.96 0 0 1-40.96 40.96z m112.64-40.96a40.96 40.96 0 0 0 81.92 0v-81.92h-81.92v81.92z" fill="#A349A4" p-id="2942"></path></svg>
|
After Width: | Height: | Size: 2.0 KiB |
Loading…
Reference in New Issue