commit
989812223e
113
pom.xml
113
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>com.luoboduner.moo.info</groupId>
|
||||
<artifactId>MooInfo</artifactId>
|
||||
<version>1.1.2</version>
|
||||
<version>1.1.3</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>MooInfo</name>
|
||||
|
@ -15,22 +15,22 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
|
||||
<logback.version>1.2.10</logback.version>
|
||||
<logback.version>1.4.5</logback.version>
|
||||
<forms_rt.version>7.0.3</forms_rt.version>
|
||||
<lombok.version>1.18.22</lombok.version>
|
||||
<junit-jupiter-api.version>5.8.2</junit-jupiter-api.version>
|
||||
<lombok.version>1.18.24</lombok.version>
|
||||
<junit-jupiter-api.version>5.9.1</junit-jupiter-api.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
<guava.version>31.0.1-jre</guava.version>
|
||||
<okhttp.version>4.9.3</okhttp.version>
|
||||
<flatlaf.version>2.1</flatlaf.version>
|
||||
<flatlaf-extras.version>2.1</flatlaf-extras.version>
|
||||
<flatlaf-intellij-themes.version>2.1</flatlaf-intellij-themes.version>
|
||||
<hutool-all.version>5.7.21</hutool-all.version>
|
||||
<fastjson.version>1.2.79</fastjson.version>
|
||||
<oshi-core.version>6.1.5</oshi-core.version>
|
||||
<guava.version>31.1-jre</guava.version>
|
||||
<okhttp.version>4.10.0</okhttp.version>
|
||||
<flatlaf.version>3.1.1</flatlaf.version>
|
||||
<flatlaf-extras.version>3.1.1</flatlaf-extras.version>
|
||||
<flatlaf-intellij-themes.version>3.1.1</flatlaf-intellij-themes.version>
|
||||
<hutool-all.version>5.8.11</hutool-all.version>
|
||||
<fastjson.version>2.0.22</fastjson.version>
|
||||
<oshi-core.version>6.4.4</oshi-core.version>
|
||||
<jfreechart.version>1.5.3</jfreechart.version>
|
||||
</properties>
|
||||
|
||||
|
@ -78,12 +78,12 @@
|
|||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>${okhttp.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<!-- <exclusions>-->
|
||||
<!-- <exclusion>-->
|
||||
<!-- <artifactId>kotlin-stdlib</artifactId>-->
|
||||
<!-- <groupId>org.jetbrains.kotlin</groupId>-->
|
||||
<!-- </exclusion>-->
|
||||
<!-- </exclusions>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -134,56 +134,58 @@
|
|||
<plugin>
|
||||
<groupId>io.github.fvarrui</groupId>
|
||||
<artifactId>javapackager</artifactId>
|
||||
<version>1.6.5</version>
|
||||
<version>1.7.2</version>
|
||||
<configuration>
|
||||
<bundleJre>true</bundleJre>
|
||||
<mainClass>com.luoboduner.moo.info.App</mainClass>
|
||||
<generateInstaller>true</generateInstaller>
|
||||
</configuration>
|
||||
<executions>
|
||||
<!-- <execution>-->
|
||||
<!-- <id>bundling-for-windows</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>package</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <platform>windows</platform>-->
|
||||
<!-- <createZipball>true</createZipball>-->
|
||||
<!-- <!– <administratorRequired>true</administratorRequired>–>-->
|
||||
<!-- <winConfig>-->
|
||||
|
||||
<!-- <!– general properties –>-->
|
||||
<!-- <generateSetup>true</generateSetup>-->
|
||||
<!-- <generateMsi>true</generateMsi>-->
|
||||
<!-- <generateMsm>true</generateMsm>-->
|
||||
|
||||
<!-- <!– setup generation properties –>-->
|
||||
<!-- <setupMode>installForAllUsers</setupMode>-->
|
||||
<!-- <createDesktopIconTask>true</createDesktopIconTask>-->
|
||||
<!-- <disableDirPage>false</disableDirPage>-->
|
||||
<!-- <disableFinishedPage>false</disableFinishedPage>-->
|
||||
<!-- <removeOldLibs>true</removeOldLibs>-->
|
||||
<!-- <setupLanguages>-->
|
||||
<!-- <english>compiler:Default.isl</english>-->
|
||||
<!-- <!– <spanish>compiler:Languages\Chinese.isl</spanish>–>-->
|
||||
<!-- </setupLanguages>-->
|
||||
<!-- </winConfig>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
<execution>
|
||||
<id>bundling-for-linux</id>
|
||||
<id>bundling-for-windows</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>package</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<platform>linux</platform>
|
||||
<createTarball>true</createTarball>
|
||||
<!-- <jdkPath>X:\\path\to\linux\jdk</jdkPath>-->
|
||||
<platform>windows</platform>
|
||||
<createZipball>true</createZipball>
|
||||
<additionalModules>jdk.crypto.ec</additionalModules>
|
||||
<!-- <administratorRequired>true</administratorRequired>-->
|
||||
<winConfig>
|
||||
|
||||
<!-- general properties -->
|
||||
<generateSetup>true</generateSetup>
|
||||
<generateMsi>true</generateMsi>
|
||||
<generateMsm>true</generateMsm>
|
||||
|
||||
<!-- setup generation properties -->
|
||||
<setupMode>installForAllUsers</setupMode>
|
||||
<createDesktopIconTask>true</createDesktopIconTask>
|
||||
<disableDirPage>false</disableDirPage>
|
||||
<disableFinishedPage>false</disableFinishedPage>
|
||||
<removeOldLibs>true</removeOldLibs>
|
||||
<setupLanguages>
|
||||
<english>compiler:Default.isl</english>
|
||||
<!-- <spanish>compiler:Languages\Chinese.isl</spanish>-->
|
||||
</setupLanguages>
|
||||
</winConfig>
|
||||
</configuration>
|
||||
</execution>
|
||||
<!-- <execution>-->
|
||||
<!-- <id>bundling-for-linux</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>package</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <platform>linux</platform>-->
|
||||
<!-- <createTarball>true</createTarball>-->
|
||||
<!-- <additionalModules>jdk.crypto.ec</additionalModules>-->
|
||||
<!-- <!– <jdkPath>X:\\path\to\linux\jdk</jdkPath>–>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>bundling-for-mac</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
|
@ -192,6 +194,7 @@
|
|||
<!-- <configuration>-->
|
||||
<!-- <platform>mac</platform>-->
|
||||
<!-- <createTarball>true</createTarball>-->
|
||||
<!-- <additionalModules>jdk.crypto.ec</additionalModules>-->
|
||||
<!-- <!– <jdkPath>X:\\path\to\mac\jdk</jdkPath>–>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </execution>-->
|
||||
|
|
|
@ -42,9 +42,7 @@ public class App {
|
|||
System.setProperty("apple.laf.useScreenMenuBar", "true");
|
||||
System.setProperty("apple.awt.application.name", "MooInfo");
|
||||
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "MooInfo");
|
||||
if (UIUtil.isDarkLaf()) {
|
||||
System.setProperty("apple.awt.application.appearance", "system");
|
||||
}
|
||||
|
||||
FlatDesktop.setAboutHandler(() -> {
|
||||
try {
|
||||
|
|
|
@ -3,11 +3,14 @@ package com.luoboduner.moo.info.ui;
|
|||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.log.Log;
|
||||
import cn.hutool.log.LogFactory;
|
||||
import com.formdev.flatlaf.*;
|
||||
import com.formdev.flatlaf.FlatDarculaLaf;
|
||||
import com.formdev.flatlaf.FlatDarkLaf;
|
||||
import com.formdev.flatlaf.FlatIntelliJLaf;
|
||||
import com.formdev.flatlaf.FlatLightLaf;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.formdev.flatlaf.intellijthemes.FlatCyanLightIJTheme;
|
||||
import com.formdev.flatlaf.intellijthemes.FlatDarkPurpleIJTheme;
|
||||
import com.formdev.flatlaf.intellijthemes.FlatLightFlatIJTheme;
|
||||
import com.formdev.flatlaf.intellijthemes.*;
|
||||
import com.formdev.flatlaf.themes.FlatMacDarkLaf;
|
||||
import com.formdev.flatlaf.themes.FlatMacLightLaf;
|
||||
import com.luoboduner.moo.info.App;
|
||||
import com.luoboduner.moo.info.ui.component.TopMenuBar;
|
||||
import com.luoboduner.moo.info.ui.form.*;
|
||||
|
@ -111,7 +114,18 @@ public class Init {
|
|||
case "IntelliJ Light":
|
||||
FlatLightFlatIJTheme.setup();
|
||||
break;
|
||||
|
||||
case "Xcode-Dark":
|
||||
FlatXcodeDarkIJTheme.setup();
|
||||
break;
|
||||
case "Vuesion":
|
||||
FlatVuesionIJTheme.setup();
|
||||
break;
|
||||
case "Flat macOS Light":
|
||||
FlatMacLightLaf.setup();
|
||||
break;
|
||||
case "Flat macOS Dark":
|
||||
FlatMacDarkLaf.setup();
|
||||
break;
|
||||
default:
|
||||
FlatDarculaLaf.setup();
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.awt.*;
|
|||
public class UiConsts {
|
||||
|
||||
public static final String APP_NAME = "MooInfo";
|
||||
public static final String APP_VERSION = "1.1.2";
|
||||
public static final String APP_VERSION = "1.1.3";
|
||||
|
||||
public static final int TABLE_ROW_HEIGHT = 36;
|
||||
|
||||
|
|
|
@ -53,7 +53,11 @@ public class TopMenuBar extends JMenuBar {
|
|||
"Flat Darcula(Recommended)",
|
||||
"Dark purple",
|
||||
"IntelliJ Cyan",
|
||||
"IntelliJ Light"};
|
||||
"IntelliJ Light",
|
||||
"Xcode-Dark",
|
||||
"Vuesion",
|
||||
"Flat macOS Light",
|
||||
"Flat macOS Dark"};
|
||||
|
||||
private static String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<border type="empty"/>
|
||||
<children>
|
||||
<grid id="3215c" layout-manager="GridLayoutManager" row-count="9" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="10" left="10" bottom="0" right="0"/>
|
||||
<constraints/>
|
||||
<properties/>
|
||||
<border type="empty"/>
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.luoboduner.moo.info.ui.dialog;
|
|||
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import com.formdev.flatlaf.extras.FlatSVGIcon;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
|
@ -9,6 +10,7 @@ import com.luoboduner.moo.info.App;
|
|||
import com.luoboduner.moo.info.ui.UiConsts;
|
||||
import com.luoboduner.moo.info.util.ComponentUtil;
|
||||
import com.luoboduner.moo.info.util.ScrollUtil;
|
||||
import com.luoboduner.moo.info.util.SystemUtil;
|
||||
import com.luoboduner.moo.info.util.UpgradeUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
|
@ -47,6 +49,15 @@ public class AboutDialog extends JDialog {
|
|||
setContentPane(contentPane);
|
||||
setModal(true);
|
||||
|
||||
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
|
||||
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
|
||||
gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
|
||||
}
|
||||
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
|
@ -359,7 +370,7 @@ public class AboutDialog extends JDialog {
|
|||
contentPane.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(9, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.setLayout(new GridLayoutManager(9, 2, new Insets(10, 10, 0, 0), -1, -1));
|
||||
scrollPane.setViewportView(panel1);
|
||||
panel1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
|
||||
logoLabel = new JLabel();
|
||||
|
|
|
@ -2,12 +2,14 @@ package com.luoboduner.moo.info.ui.dialog;
|
|||
|
||||
import cn.hutool.log.Log;
|
||||
import cn.hutool.log.LogFactory;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
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.util.ComponentUtil;
|
||||
import com.luoboduner.moo.info.util.ScrollUtil;
|
||||
import com.luoboduner.moo.info.util.SystemUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
@ -35,6 +37,15 @@ public class SettingDialog extends JDialog {
|
|||
setContentPane(contentPane);
|
||||
setModal(true);
|
||||
|
||||
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
|
||||
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
|
||||
gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
|
||||
}
|
||||
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="0" left="0" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package com.luoboduner.moo.info.ui.dialog;
|
||||
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
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.util.ComponentUtil;
|
||||
import com.luoboduner.moo.info.util.SystemUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
@ -26,6 +28,15 @@ public class SystemEnvResultDialog extends JDialog {
|
|||
setModal(true);
|
||||
getRootPane().setDefaultButton(buttonOK);
|
||||
|
||||
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
|
||||
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
|
||||
gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
|
||||
}
|
||||
|
||||
buttonOK.addActionListener(e -> onOK());
|
||||
|
||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||
|
@ -73,7 +84,7 @@ public class SystemEnvResultDialog extends JDialog {
|
|||
contentPane = new JPanel();
|
||||
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 10, 10), -1, -1));
|
||||
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="0" left="0" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.intellij.uiDesigner.core.Spacer;
|
|||
import com.luoboduner.moo.info.App;
|
||||
import com.luoboduner.moo.info.util.ComponentUtil;
|
||||
import com.luoboduner.moo.info.util.ConsoleUtil;
|
||||
import com.luoboduner.moo.info.util.SystemUtil;
|
||||
import oshi.SystemInfo;
|
||||
import oshi.hardware.*;
|
||||
import oshi.software.os.*;
|
||||
|
@ -38,6 +39,15 @@ public class SystemInfoTestDialog extends JDialog {
|
|||
setModal(true);
|
||||
getRootPane().setDefaultButton(buttonOK);
|
||||
|
||||
if (SystemUtil.isMacOs() && com.formdev.flatlaf.util.SystemInfo.isMacFullWindowContentSupported) {
|
||||
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
|
||||
gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
|
||||
}
|
||||
|
||||
buttonOK.addActionListener(e -> onOK());
|
||||
|
||||
buttonCancel.addActionListener(e -> onCancel());
|
||||
|
@ -420,7 +430,7 @@ public class SystemInfoTestDialog extends JDialog {
|
|||
contentPane = new JPanel();
|
||||
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 10, 10), -1, -1));
|
||||
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="0" left="0" bottom="10" right="10"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
|
|
|
@ -4,11 +4,13 @@ import cn.hutool.core.io.FileUtil;
|
|||
import cn.hutool.core.io.StreamProgress;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
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.util.ComponentUtil;
|
||||
import com.luoboduner.moo.info.util.SystemUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -44,6 +46,15 @@ public class UpdateDialog extends JDialog {
|
|||
setModal(true);
|
||||
getRootPane().setDefaultButton(buttonOK);
|
||||
|
||||
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
|
||||
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
|
||||
gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
|
||||
}
|
||||
|
||||
ComponentUtil.setPreferSizeAndLocateToCenter(this, 600, 200);
|
||||
|
||||
buttonOK.addActionListener(e -> onOK());
|
||||
|
@ -102,7 +113,7 @@ public class UpdateDialog extends JDialog {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void progress(long progressSize) {
|
||||
public void progress(long progressSize, long totalSize) {
|
||||
progressBarDownload.setValue((int) progressSize);
|
||||
statusLabel.setText("Already download:" + FileUtil.readableFileSize(progressSize));
|
||||
}
|
||||
|
@ -150,7 +161,7 @@ public class UpdateDialog extends JDialog {
|
|||
contentPane = new JPanel();
|
||||
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 10, 10), -1, -1));
|
||||
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="94766" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="0" left="0" bottom="10" right="0"/>
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
|
@ -55,7 +55,7 @@
|
|||
</children>
|
||||
</grid>
|
||||
<grid id="e3588" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<margin top="10" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.luoboduner.moo.info.ui.dialog;
|
||||
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.intellij.uiDesigner.core.Spacer;
|
||||
|
@ -46,6 +47,15 @@ public class UpdateInfoDialog extends JDialog {
|
|||
setModal(true);
|
||||
getRootPane().setDefaultButton(buttonOK);
|
||||
|
||||
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
|
||||
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) contentPane.getLayout();
|
||||
gridLayoutManager.setMargin(new Insets(28, 0, 0, 0));
|
||||
}
|
||||
|
||||
ComponentUtil.setPreferSizeAndLocateToCenter(this, 0.4, 0.64);
|
||||
|
||||
buttonOK.addActionListener(e -> onOK());
|
||||
|
@ -121,7 +131,7 @@ public class UpdateInfoDialog extends JDialog {
|
|||
contentPane = new JPanel();
|
||||
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 10, 0), -1, -1));
|
||||
final JPanel panel1 = new JPanel();
|
||||
panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 10, 0), -1, -1));
|
||||
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||
final Spacer spacer1 = new Spacer();
|
||||
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
|
@ -137,7 +147,7 @@ public class UpdateInfoDialog extends JDialog {
|
|||
final Spacer spacer2 = new Spacer();
|
||||
panel1.add(spacer2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||
final JPanel panel3 = new JPanel();
|
||||
panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
panel3.setLayout(new GridLayoutManager(1, 1, new Insets(10, 0, 0, 0), -1, -1));
|
||||
contentPane.add(panel3, 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));
|
||||
final JScrollPane scrollPane1 = new JScrollPane();
|
||||
panel3.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));
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package com.luoboduner.moo.info.ui.form;
|
||||
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.intellij.uiDesigner.core.GridConstraints;
|
||||
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||
import com.luoboduner.moo.info.util.SystemUtil;
|
||||
import lombok.Getter;
|
||||
|
||||
import javax.swing.*;
|
||||
|
@ -44,6 +46,11 @@ public class MainWindow {
|
|||
|
||||
public void init() {
|
||||
mainWindow = getInstance();
|
||||
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
|
||||
GridLayoutManager gridLayoutManager = (GridLayoutManager) mainPanel.getLayout();
|
||||
gridLayoutManager.setMargin(new Insets(20, 0, 0, 0));
|
||||
}
|
||||
|
||||
mainWindow.getOverviewPanel().add(OverviewForm.getInstance().getMainPanel(), gridConstraints);
|
||||
mainWindow.getDetailPanel().add(DetailForm.getInstance().getMainPanel(), gridConstraints);
|
||||
mainWindow.getMemoryPanel().add(MemoryForm.getInstance().getMainPanel(), gridConstraints);
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package com.luoboduner.moo.info.ui.frame;
|
||||
|
||||
import com.formdev.flatlaf.extras.FlatSVGUtils;
|
||||
import com.formdev.flatlaf.util.SystemInfo;
|
||||
import com.luoboduner.moo.info.ui.UiConsts;
|
||||
import com.luoboduner.moo.info.ui.component.TopMenuBar;
|
||||
import com.luoboduner.moo.info.ui.listener.FrameListener;
|
||||
import com.luoboduner.moo.info.util.ComponentUtil;
|
||||
import com.luoboduner.moo.info.util.SystemUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
|
@ -26,6 +28,13 @@ public class MainFrame extends JFrame {
|
|||
setJMenuBar(topMenuBar);
|
||||
ComponentUtil.setPreferSizeAndLocateToCenter(this, 0.6, 0.8);
|
||||
|
||||
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
|
||||
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
|
||||
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
|
||||
}
|
||||
|
||||
FrameListener.addListeners();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"currentVersion": "1.1.2",
|
||||
"currentVersion": "1.1.3",
|
||||
"versionIndex": {
|
||||
"0.0.0": "0",
|
||||
"1.0.0": "1",
|
||||
"1.1.0": "2",
|
||||
"1.1.1": "3",
|
||||
"1.1.2": "4"
|
||||
"1.1.2": "4",
|
||||
"1.1.3": "5"
|
||||
},
|
||||
"versionDetailList": [
|
||||
{
|
||||
|
@ -32,6 +33,11 @@
|
|||
"version": "1.1.2",
|
||||
"title": "update flatlaf to 2.1",
|
||||
"log": "● update flatlaf to 2.1\n● update oshi-core to 6.1.5\n● optimization of cpu indicator\n● update dependencies\n"
|
||||
},
|
||||
{
|
||||
"version": "1.1.3",
|
||||
"title": "Optimize performance under macOS",
|
||||
"log": "● Optimize performance under macOS\n● update oshi to 6.4.4\n● new theme:Flat macOS,Xcode-Dark,Vuesion\n● update dependencies\n"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue