use of org.develnext.jphp.ext.javafx.support.ImageViewEx in project jphp by jphp-compiler.
the class UXImageArea method __construct.
@Signature
public void __construct(@Nullable Image image) {
__wrappedObject = new ImageViewEx();
getWrappedObject().setImage(image);
}
use of org.develnext.jphp.ext.javafx.support.ImageViewEx in project jphp by jphp-compiler.
the class FXLauncher method readConfig.
@Override
protected void readConfig() {
super.readConfig();
Memory fxSplash = getConfigValue("fx.splash");
if (fxSplash.toBoolean()) {
InputStream fxSplashStream = getClass().getResourceAsStream(fxSplash.toString());
if (fxSplashStream == null) {
System.err.println("Failed to load 'fx.splash': " + fxSplash.toString());
return;
}
new JFXPanel();
Platform.runLater(() -> {
Image image = new Image(fxSplashStream);
ImageViewEx imageView = new ImageViewEx();
imageView.setAutoSize(true);
imageView.setImage(image);
splashStage = new Stage(StageStyle.TRANSPARENT);
VBox root = new VBox(imageView);
root.setBackground(null);
Scene scene = new Scene(root);
scene.setFill(null);
splashStage.setScene(scene);
Memory opacity = getConfigValue("fx.splash.opacity");
if (opacity.isNotNull()) {
splashStage.setOpacity(opacity.toDouble());
}
Memory alwaysOnTop = getConfigValue("fx.splash.alwaysOnTop");
if (alwaysOnTop.isNotNull()) {
splashStage.setAlwaysOnTop(alwaysOnTop.toBoolean());
}
splashStage.centerOnScreen();
splashStage.show();
splashStage.centerOnScreen();
});
}
}
Aggregations