Skip to content

Commit 1300a9f

Browse files
committed
1.移除多余方法
1 parent baeb188 commit 1300a9f

7 files changed

Lines changed: 2 additions & 228 deletions

File tree

src/main/java/com/xwintop/xJavaFxTool/XJavaFxToolApplication.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public void start(Stage primaryStage) throws Exception {
3636

3737
// 初始化 JavaFX 全局设置
3838
FxApp.init(primaryStage, LOGO_PATH);
39-
FxApp.setupIcon(primaryStage);
4039
FxApp.styleSheets.add(XJavaFxToolApplication.class.getResource("/css/jfoenix-main.css").toExternalForm());
4140

4241
primaryStage.setResizable(true);
@@ -51,7 +50,6 @@ public void start(Stage primaryStage) throws Exception {
5150

5251
StageUtils.loadPrimaryStageBound(primaryStage);
5352
primaryStage.show();
54-
StageUtils.updateStageStyle(primaryStage);
5553
}
5654

5755
private void loadClassicUI(Stage primaryStage) throws IOException {

src/main/java/com/xwintop/xJavaFxTool/model/PluginJarInfo.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ public File getFile() {
8181

8282
@JSONField(serialize = false)
8383
public String getDefaultIconPath() {
84-
return bundleName == null ? "" :
85-
(bundleName.replace("locale.", "/logo/") + ".png");
84+
return bundleName == null ? "" : (bundleName.replace("locale.", "/logo/") + ".png");
8685
}
8786
}

src/main/java/com/xwintop/xJavaFxTool/newui/NewLauncherService.java

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/main/java/com/xwintop/xJavaFxTool/utils/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class Config {
1616

1717
public static Locale defaultLocale = Locale.getDefault();// 设置系统语言
1818

19-
public static final String xJavaFxToolVersions = "V0.2.3";// xJavaFxTool版本信息
19+
public static final String xJavaFxToolVersions = "V0.3.1";// xJavaFxTool版本信息
2020

2121
///////////////////////////////////////////////////////////////
2222

src/main/java/com/xwintop/xJavaFxTool/utils/FxmlUtils.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/main/java/com/xwintop/xJavaFxTool/utils/ResourceBundleUtils.java

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/main/java/com/xwintop/xJavaFxTool/utils/StageUtils.java

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
package com.xwintop.xJavaFxTool.utils;
22

3-
import com.sun.javafx.tk.TKStage;
4-
import com.sun.jna.LastErrorException;
5-
import com.sun.jna.Native;
6-
import com.sun.jna.Platform;
7-
import com.sun.jna.Pointer;
8-
import com.sun.jna.platform.win32.User32;
9-
import com.sun.jna.platform.win32.WinDef;
10-
import com.sun.jna.platform.win32.WinUser;
11-
import com.sun.jna.win32.StdCallLibrary;
12-
import com.sun.jna.win32.W32APIOptions;
133
import com.xwintop.xJavaFxTool.utils.Config.Keys;
144
import javafx.stage.Stage;
155
import lombok.extern.slf4j.Slf4j;
166

17-
import java.lang.reflect.Method;
18-
197
/**
208
* @ClassName: StageUtils
219
* @Description: 更新场景工具类(解决点击任务栏图标无法最小化问题)
@@ -25,45 +13,6 @@
2513

2614
@Slf4j
2715
public class StageUtils {
28-
29-
// static interface ExtUser32 extends StdCallLibrary, User32 {
30-
//
31-
// ExtUser32 INSTANCE = (ExtUser32) Native.loadLibrary("user32", ExtUser32.class, W32APIOptions.DEFAULT_OPTIONS);
32-
//
33-
// WinDef.LRESULT CallWindowProcW(Pointer lpWndProc, Pointer hWnd, int msg, WinDef.WPARAM wParam, WinDef.LPARAM lParam);
34-
//
35-
// int SetWindowLong(HWND hWnd, int nIndex, com.sun.jna.Callback wndProc) throws LastErrorException;
36-
// }
37-
38-
// update default javafx stage style
39-
public static void updateStageStyle(Stage stage) {
40-
if (Platform.isWindows()) {
41-
// Pointer pointer = getWindowPointer(stage);
42-
// WinDef.HWND hwnd = new WinDef.HWND(pointer);
43-
//
44-
// final User32 user32 = User32.INSTANCE;
45-
// int oldStyle = user32.GetWindowLong(hwnd, WinUser.GWL_STYLE);
46-
// int newStyle = oldStyle | 0x00020000; // WS_MINIMIZEBOX
47-
// user32.SetWindowLong(hwnd, WinUser.GWL_STYLE, newStyle);
48-
}
49-
}
50-
51-
// private static Pointer getWindowPointer(Stage stage) {
52-
// try {
53-
// TKStage tkStage = stage.impl_getPeer();
54-
// Method getPlatformWindow = tkStage.getClass().getDeclaredMethod("getPlatformWindow");
55-
// getPlatformWindow.setAccessible(true);
56-
// Object platformWindow = getPlatformWindow.invoke(tkStage);
57-
// Method getNativeHandle = platformWindow.getClass().getMethod("getNativeHandle");
58-
// getNativeHandle.setAccessible(true);
59-
// Object nativeHandle = getNativeHandle.invoke(platformWindow);
60-
// return new Pointer((Long) nativeHandle);
61-
// } catch (Throwable e) {
62-
// e.printStackTrace();
63-
// return null;
64-
// }
65-
// }
66-
6716
//加载Stage边框位置
6817
public static void loadPrimaryStageBound(Stage stage) {
6918
try {

0 commit comments

Comments
 (0)