|
|
@ -28,15 +28,19 @@ public class SplashPane4WinAndJDK11 extends SplashPane{ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private boolean isDouble = false; |
|
|
|
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() { |
|
|
|
public SplashPane4WinAndJDK11() { |
|
|
|
this.imagePath = getSplashPath4WinAndJdk11(); |
|
|
|
this.imagePath = getSplashPath4WinAndJdk11(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String getSplashPath4WinAndJdk11() { |
|
|
|
private String getSplashPath4WinAndJdk11() { |
|
|
|
String path = (String) LocaleCenter.getMark(SplashMark.class).getValue(); |
|
|
|
String path = (String) LocaleCenter.getMark(SplashMark.class).getValue(); |
|
|
|
if (path.contains("splash_10.png")) { |
|
|
|
if (path.contains(IMAGE_SPLASH)) { |
|
|
|
// 为图片加上"@2x"
|
|
|
|
// 为图片加上"@2x"
|
|
|
|
String pathOfDouble = path.replace("splash_10.png", "splash_10@2x.png"); |
|
|
|
String pathOfDouble = path.replace(IMAGE_SPLASH, IMAGE_SPLASH_DOUBLE); |
|
|
|
// 某些定制jar里面没有两倍图,判断一下,如果文件不存在,就返回一倍图的path
|
|
|
|
// 某些定制jar里面没有两倍图,判断一下,如果文件不存在,就返回一倍图的path
|
|
|
|
if (IOUtils.readResource(pathOfDouble) != null) { |
|
|
|
if (IOUtils.readResource(pathOfDouble) != null) { |
|
|
|
this.isDouble = true; |
|
|
|
this.isDouble = true; |
|
|
|