use of org.develnext.jphp.ext.javafx.support.tray.models.CustomStage in project jphp by jphp-compiler.
the class TrayNotification method initStage.
private void initStage() {
stage = new CustomStage(rootNode, horGap, verGap);
rootNode.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null)));
stage.getScene().setRoot(rootNode);
setLocation(NotificationLocation.BOTTOM_RIGHT);
EventHandler<MouseEvent> value = new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
if (onClickCallback != null) {
onClickCallback.handle(new ActionEvent(this, null));
}
dismiss();
}
};
lblClose.setOnMouseClicked(value);
stage.getScene().setOnMouseClicked(value);
}
Aggregations