use of javafx.scene.layout.StackPane in project jgnash by ccavanaugh.
the class MainView method start.
public void start(final Stage stage, @Nullable final File dataFile, final char[] password, @Nullable final String host, final int port) throws Exception {
ThemeManager.restoreLastUsedTheme();
primaryStage = stage;
busyPane = new BusyPane();
final FXMLLoader fxmlLoader = new FXMLLoader(MenuBarController.class.getResource("MainMenuBar.fxml"), resources);
menuBar = fxmlLoader.load();
final ToolBar mainToolBar = FXMLLoader.load(MainToolBarController.class.getResource("MainToolBar.fxml"), resources);
tabViewPane = new TabViewPane();
final VBox top = new VBox();
top.getChildren().addAll(menuBar, mainToolBar);
top.setFillWidth(true);
statusBar = new StatusBar();
final BorderPane borderPane = new BorderPane();
borderPane.setTop(top);
borderPane.setCenter(tabViewPane);
borderPane.setBottom(statusBar);
final StackPane stackPane = new StackPane();
stackPane.getChildren().addAll(borderPane, busyPane);
final Scene scene = new Scene(stackPane, 640, 480);
scene.getStylesheets().add(DEFAULT_CSS);
scene.getRoot().styleProperty().bind(ThemeManager.styleProperty());
stage.setTitle(title);
stage.getIcons().add(StaticUIMethods.getApplicationIcon());
stage.setScene(scene);
stage.setResizable(true);
// enforce a min width to prevent it from disappearing with a bad click and drag
stage.setMinWidth(640);
stage.setMinHeight(480);
installHandlers();
MessageBus.getInstance().registerListener(this, MessageChannel.SYSTEM);
StageUtils.addBoundsListener(stage, MainView.class);
stage.show();
Engine.addLogHandler(statusBarLogHandler);
EngineFactory.addLogHandler(statusBarLogHandler);
YahooParser.addLogHandler(statusBarLogHandler);
UpdateFactory.addLogHandler(statusBarLogHandler);
// listen to my own logger
logger.addHandler(statusBarLogHandler);
stage.toFront();
stage.requestFocus();
if (host != null) {
// connect to a remote server instead of loading a local file
new Thread(() -> {
try {
Thread.sleep(BootEngineTask.FORCED_DELAY);
backgroundExecutor.execute(() -> JavaFXUtils.runLater(() -> BootEngineTask.initiateBoot(null, password, true, host, port)));
} catch (InterruptedException e) {
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
}
}).start();
} else if (dataFile != null) {
// Load the specified file, this overrides the last open file
new Thread(() -> {
try {
Thread.sleep(BootEngineTask.FORCED_DELAY);
backgroundExecutor.execute(() -> JavaFXUtils.runLater(() -> BootEngineTask.initiateBoot(dataFile.getAbsolutePath(), password, false, null, 0)));
} catch (InterruptedException e) {
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
}
}).start();
} else if (Options.openLastProperty().get()) {
// Load the last open file if enabled
new Thread(() -> {
try {
Thread.sleep(BootEngineTask.FORCED_DELAY);
backgroundExecutor.execute(() -> JavaFXUtils.runLater(BootEngineTask::openLast));
} catch (InterruptedException e) {
logger.log(Level.SEVERE, e.getLocalizedMessage(), e);
}
}).start();
}
loadPlugins();
checkForLatestRelease();
}
use of javafx.scene.layout.StackPane in project Gargoyle by callakrsos.
the class AbstractGoogleTrendChart method fillChartData.
/**
* 차트 그리는 작업 처리
* @작성자 : KYJ
* @작성일 : 2016. 11. 2.
*/
protected void fillChartData() {
IGargoyleChartAdapter<T, C> adapter = this.adapter;
String title = adapter.getTitle(this.json.get());
setTitle(title);
//this.getJson();
T json = this.json.get();
if (ValueUtil.isNotEmpty(json)) {
int columnCount = adapter.getColumnCount();
for (int i = 0; i < columnCount; i++) {
String columnName = adapter.getColumnName(i);
ObservableList<Data<String, Number>> data = FXCollections.observableArrayList();
javafx.scene.chart.XYChart.Series<String, Number> series = new Series<>(columnName, data);
getData().add(series);
int valueCount = adapter.getValueCount(columnName);
for (int v = 0; v < valueCount; v++) {
Data<String, Number> value = adapter.getValue(i, columnName, v);
if (value == null)
continue;
StackPane s = new StackPane(new Rectangle());
value.setNode(s);
s.setUserData(new ChartOverTooltip(i, columnName, value));
data.add(value);
}
}
}
}
use of javafx.scene.layout.StackPane in project Gargoyle by callakrsos.
the class XY method convert.
public static ScrollPane convert(Node target) {
StackPane stackPane = new StackPane();
ScrollPane scrollPane = new ScrollPane(stackPane);
stackPane.getChildren().add(target);
stackPane.getChildren().add(draw());
return scrollPane;
}
use of javafx.scene.layout.StackPane in project Gargoyle by callakrsos.
the class SVNViewer method setDataNode.
private void setDataNode(SVNLogEntry entry, Data<String, String> data) {
Group group = new Group();
group.setManaged(false);
Text value = new Text(entry.getRevision() + "");
value.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
value.translateYProperty().set(-15);
Circle circle = new Circle(4, Color.WHITE);
circle.setNodeOrientation(NodeOrientation.LEFT_TO_RIGHT);
circle.setStroke(Color.web("#f3622d"));
StackPane stackPane = new StackPane(value, circle);
stackPane.setPrefSize(30, 60);
group.getChildren().add(stackPane);
data.setNode(group);
}
use of javafx.scene.layout.StackPane in project jabref by JabRef.
the class EntryEditor method addSpecialTabs.
private void addSpecialTabs() {
// MathSciNet Review
entry.getField(FieldName.MR_NUMBER).flatMap(MathSciNetId::parse).ifPresent(mrNumber -> {
JFXPanel reviewPane = new JFXPanel();
tabbed.addTab(Localization.lang("MathSciNet Review"), reviewPane);
tabs.add(reviewPane);
Platform.runLater(() -> {
StackPane root = new MathSciNetPaneView(mrNumber).getPane();
reviewPane.setScene(new Scene(root));
});
});
}
Aggregations