|
|
@ -9,7 +9,6 @@ import javafx.application.Application; |
|
|
|
import javafx.application.Platform; |
|
|
|
import javafx.application.Platform; |
|
|
|
import javafx.geometry.Rectangle2D; |
|
|
|
import javafx.geometry.Rectangle2D; |
|
|
|
import javafx.scene.Scene; |
|
|
|
import javafx.scene.Scene; |
|
|
|
import javafx.scene.image.Image; |
|
|
|
|
|
|
|
import javafx.scene.image.ImageView; |
|
|
|
import javafx.scene.image.ImageView; |
|
|
|
import javafx.scene.layout.AnchorPane; |
|
|
|
import javafx.scene.layout.AnchorPane; |
|
|
|
import javafx.scene.paint.Color; |
|
|
|
import javafx.scene.paint.Color; |
|
|
@ -51,6 +50,7 @@ public class SplashFxWindow extends Application { |
|
|
|
|
|
|
|
|
|
|
|
private Text moduleInfo; |
|
|
|
private Text moduleInfo; |
|
|
|
private Text thanks; |
|
|
|
private Text thanks; |
|
|
|
|
|
|
|
private FastGifImage image; |
|
|
|
private List<SplashFxActionListener> listeners = new ArrayList<SplashFxActionListener>(); |
|
|
|
private List<SplashFxActionListener> listeners = new ArrayList<SplashFxActionListener>(); |
|
|
|
|
|
|
|
|
|
|
|
private static int uiScale(int i) { |
|
|
|
private static int uiScale(int i) { |
|
|
@ -84,7 +84,7 @@ public class SplashFxWindow extends Application { |
|
|
|
public void start(Stage primaryStage) { |
|
|
|
public void start(Stage primaryStage) { |
|
|
|
AnchorPane root = new AnchorPane(); |
|
|
|
AnchorPane root = new AnchorPane(); |
|
|
|
primaryStage.initStyle(StageStyle.TRANSPARENT); |
|
|
|
primaryStage.initStyle(StageStyle.TRANSPARENT); |
|
|
|
Image image = new FastGifImage(SplashContext.SPLASH_PATH, FRAME_COUNT, WINDOW_WIDTH, WINDOW_HEIGHT); |
|
|
|
image = new FastGifImage(SplashContext.SPLASH_PATH, FRAME_COUNT, WINDOW_WIDTH, WINDOW_HEIGHT); |
|
|
|
|
|
|
|
|
|
|
|
ImageView gif = new ImageView(image); |
|
|
|
ImageView gif = new ImageView(image); |
|
|
|
|
|
|
|
|
|
|
@ -129,6 +129,7 @@ public class SplashFxWindow extends Application { |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
((Stage) moduleInfo.getScene().getWindow()).close(); |
|
|
|
((Stage) moduleInfo.getScene().getWindow()).close(); |
|
|
|
|
|
|
|
image.destroy(); |
|
|
|
fireSplashClose(); |
|
|
|
fireSplashClose(); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FRContext.getLogger().error(e.getMessage(), e); |
|
|
|
FRContext.getLogger().error(e.getMessage(), e); |
|
|
@ -181,8 +182,10 @@ public class SplashFxWindow extends Application { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 添加一个动画状态监听 |
|
|
|
* 添加一个动画状态监听 |
|
|
|
|
|
|
|
* |
|
|
|
* @param listener |
|
|
|
* @param listener |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void addSplashActionListener(SplashFxActionListener listener) { |
|
|
|
public void addSplashActionListener(SplashFxActionListener listener) { |
|
|
|