diff --git a/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java b/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java index daa445ecb9..fea7deb3cc 100644 --- a/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java +++ b/designer-realize/src/main/java/com/fr/start/common/SplashPane4WinAndJDK11.java @@ -28,15 +28,19 @@ public class SplashPane4WinAndJDK11 extends SplashPane{ */ private boolean isDouble = false; + private static final String IMAGE_SPLASH = "splash_10.png"; + + private static final String IMAGE_SPLASH_DOUBLE = "splash_10@2x.png"; + public SplashPane4WinAndJDK11() { this.imagePath = getSplashPath4WinAndJdk11(); } private String getSplashPath4WinAndJdk11() { String path = (String) LocaleCenter.getMark(SplashMark.class).getValue(); - if (path.contains("splash_10.png")) { + if (path.contains(IMAGE_SPLASH)) { // 为图片加上"@2x" - String pathOfDouble = path.replace("splash_10.png", "splash_10@2x.png"); + String pathOfDouble = path.replace(IMAGE_SPLASH, IMAGE_SPLASH_DOUBLE); // 某些定制jar里面没有两倍图,判断一下,如果文件不存在,就返回一倍图的path if (IOUtils.readResource(pathOfDouble) != null) { this.isDouble = true;