use of com.kyj.fx.voeditor.visual.component.console.ReadOnlyConsole in project Gargoyle by callakrsos.
the class SystemLayoutViewController method lblDBConsoleOnMouseClick.
@FXML
public void lblDBConsoleOnMouseClick(MouseEvent e) {
if (dbConsoleProperty.get() != null)
return;
try {
ReadOnlyConsole console = ReadOnlySingletonConsole.getInstance();
console.init();
dbConsoleProperty.set(console);
Stage stage = new Stage();
BorderPane root = new BorderPane(console);
Scene scene = new Scene(root, 700, 300);
scene.getStylesheets().add(SkinManager.getInstance().getSkin());
stage.setScene(scene);
double x = SharedMemory.getPrimaryStage().getX();
double y = SharedMemory.getPrimaryStage().getY();
stage.setTitle("Database Console");
stage.setX(x);
stage.setY(y);
stage.setAlwaysOnTop(false);
stage.initOwner(SharedMemory.getPrimaryStage());
stage.centerOnScreen();
stage.addEventHandler(WindowEvent.WINDOW_CLOSE_REQUEST, ev -> {
try {
dbConsoleProperty.set(null);
console.close();
} catch (Exception e1) {
e1.printStackTrace();
}
});
stage.show();
// dbConsoleProperty.set(null);
} catch (Exception ex) {
DialogUtil.showExceptionDailog(ex);
LOGGER.error(ValueUtil.toString(ex));
}
}
use of com.kyj.fx.voeditor.visual.component.console.ReadOnlyConsole in project Gargoyle by callakrsos.
the class SystemLayoutViewController method lblSystemConsoleOnMouseClick.
@FXML
public void lblSystemConsoleOnMouseClick(MouseEvent e) {
if (systemConsoleProperty.get() != null)
return;
ReadOnlyConsole console = null;
try {
console = SystemConsole.getInstance();
console.init();
systemConsoleProperty.set(console);
Stage stage = new Stage();
BorderPane root = new BorderPane(console);
Scene scene = new Scene(root, 700, 300);
scene.getStylesheets().add(SkinManager.getInstance().getSkin());
stage.setScene(scene);
double x = SharedMemory.getPrimaryStage().getX();
double y = SharedMemory.getPrimaryStage().getY();
stage.setTitle("System Console");
stage.setX(x);
stage.setY(y);
stage.setAlwaysOnTop(false);
stage.initOwner(SharedMemory.getPrimaryStage());
stage.centerOnScreen();
stage.setOnCloseRequest(ev -> {
systemConsoleProperty.set(null);
try {
SystemConsole.getInstance().close();
} catch (Exception e1) {
e1.printStackTrace();
}
});
stage.show();
} catch (Exception ex) {
DialogUtil.showExceptionDailog(ex);
LOGGER.error(ValueUtil.toString(ex));
}
}
Aggregations