bottomBar.setMaxHeight(64); bottomBar.getTransforms().add(scale); scale.pivotYProperty().bind(bottomBar.heightProperty().divide(2)); bottomBar.setPickOnBounds(false);
scale = new Scale(1, 1, 0, 0); rotate = new Rotate(0, 0, 1); rotate.pivotYProperty().bind(selectedTabLine.heightProperty().divide(2));
public void bindHorizontalScrollbar(ScrollBar bar) { bar.setMin(0); DoubleBinding max = this.contentBody.widthProperty().subtract(widthProperty()); DoubleBinding factor = this.contentBody.widthProperty().divide(max); bar.maxProperty().bind(this.contentBody.widthProperty().divide(factor)); bar.visibleAmountProperty().bind(widthProperty().divide(factor)); this.offsetX.bind(bar.valueProperty()); }
private InstallationDetailsPanel createInstallationDetailsPanel() { final InstallationDetailsPanel detailsPanel = new InstallationDetailsPanel(); detailsPanel.setOnClose(this::closeDetailsView); detailsPanel.prefWidthProperty().bind(content.widthProperty().divide(2)); return detailsPanel; }
private ShortcutEditingDetailsPanel createShortcutEditingPanel() { final ShortcutEditingDetailsPanel shortcutEditingDetailsPanel = new ShortcutEditingDetailsPanel(objectMapper); shortcutEditingDetailsPanel.setOnClose(this::closeDetailsView); shortcutEditingDetailsPanel.setOnShortcutChanged(shortcutManager::updateShortcut); shortcutEditingDetailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3)); return shortcutEditingDetailsPanel; }
private ShortcutCreationDetailsPanel createShortcutCreationPanel() { final ShortcutCreationDetailsPanel shortcutCreationDetailsPanel = new ShortcutCreationDetailsPanel(); shortcutCreationDetailsPanel.setOnClose(this::closeDetailsView); shortcutCreationDetailsPanel.setContainersPath(containersPath); shortcutCreationDetailsPanel.setOnCreateShortcut(this::createShortcut); shortcutCreationDetailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3)); return shortcutCreationDetailsPanel; }
private EngineDetailsPanel createEngineDetailsPanel() { final EngineDetailsPanel detailsPanel = new EngineDetailsPanel(); detailsPanel.setOnClose(this::closeDetailsView); detailsPanel.setOnEngineInstall(this::installEngine); detailsPanel.setOnEngineDelete(this::deleteEngine); detailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3)); return detailsPanel; }
/** * Bind a task to a progress property to follow its progression. * * @param task the service task that we need to follow the progression * @param progressBar graphical progress bar */ private void bindProgressProperty(final ServiceTaskBase<?> task, final DoubleProperty progressProperty) { // Perform this binding into the JAT to respect widget and task API JRebirth.runIntoJAT("Bind Progress Property to " + task.getServiceHandlerName(), () -> { // Avoid the progress bar to display 100% at start up task.updateProgress(0, 0); // Bind the progress bar progressProperty.bind(task.workDoneProperty().divide(task.totalWorkProperty())); }); }
private LibraryDetailsPanel createLibraryDetailsPanel() { final LibraryDetailsPanel detailsPanel = new LibraryDetailsPanel(objectMapper, selectedShortcut); detailsPanel.setOnClose(this::closeDetailsView); detailsPanel.setOnShortcutRun(this::runShortcut); detailsPanel.setOnShortcutStop(this::stopShortcut); detailsPanel.setOnShortcutUninstall(this::uninstallShortcut); detailsPanel.prefWidthProperty().bind(content.widthProperty().divide(3)); return detailsPanel; }
/** * Bind a task to a progress bar widget to follow its progression. * * @param task the service task that we need to follow the progression * @param progressBar graphical progress bar */ private void bindProgressBar(final ServiceTaskBase<?> task, final ProgressBar progressBar) { // Perform this binding into the JAT to respect widget and task API JRebirth.runIntoJAT("Bind ProgressBar to " + task.getServiceHandlerName(), () -> { // Avoid the progress bar to display 100% at start up task.updateProgress(0, 0); // Bind the progress bar progressBar.progressProperty().bind(task.workDoneProperty().divide(task.totalWorkProperty())); }); }
private ObjectBinding<ApplicationDetailsPanel> createApplicationDetailsPanel() { final ApplicationDetailsPanel applicationPanel = new ApplicationDetailsPanel(scriptInterpreter, filter, selectedApplication); applicationPanel.setShowScriptSource(javaFxSettingsManager.isViewScriptSource()); applicationPanel.setOnClose(this::closeDetailsView); applicationPanel.webEngineStylesheetProperty().bind(themeManager.webEngineStylesheetProperty()); applicationPanel.prefWidthProperty().bind(content.widthProperty().divide(3)); return Bindings.when(Bindings.isNotNull(selectedApplication)) .then(applicationPanel) .otherwise((ApplicationDetailsPanel) null); }
/** * Constructor */ public NotifsFilter() { //allNotifs.setText(ms.getMessage("ALL_NOTIFICATIONS_LABEL", null, null)); //newNotifs.setText(ms.getMessage("NEW_NOTIFICATIONS_LABEL", null, null)); allNotifs.setText("ALL_NOTIFICATIONS_LABEL"); newNotifs.setText("NEW_NOTIFICATIONS_LABEL"); NodeHelper.setHgrow(allNotifs, newNotifs); allNotifs.getStyleClass().addAll("notifications-filter-button", "transparent-focus", "scale-down-on-click"); newNotifs.getStyleClass().addAll("notifications-filter-button", "transparent-focus", "scale-down-on-click"); allNotifs.prefHeightProperty().bind(heightProperty()); newNotifs.prefHeightProperty().bind(heightProperty()); allNotifs.prefWidthProperty().bind(widthProperty().divide(2)); newNotifs.prefWidthProperty().bind(widthProperty().divide(2)); getChildren().addAll(allNotifs, newNotifs); getStyleClass().add("notifications-filters-container"); allNotifs.setOnAction(e -> filter.setAll(NotificationStatus.NEW, NotificationStatus.READEN)); newNotifs.setOnAction(e -> filter.setAll(NotificationStatus.NEW)); } }
this.icon.layoutXProperty().bind(this.icon.widthProperty().divide(-2)); this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2)); } else if( location == Location.TOP_RIGHT ) { this.icon.layoutXProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getWidth() - this.icon.widthProperty().get() / 2); },this.icon.widthProperty(), c.widthProperty())); this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2)); } else if( location == Location.BOTTOM_LEFT ) { this.icon.layoutXProperty().bind(this.icon.widthProperty().divide(-2)); this.icon.layoutYProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getHeight() - this.icon.heightProperty().get() / 2);
barGroup.setTranslateX(0); barGroup.setTranslateY(0); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.translateYProperty().bind(height); break; barGroup.setTranslateY(0); label.setTranslateX(0); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case RIGHT: barGroup.setTranslateY(0); label.translateXProperty().bind(width.add(10)); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case TOP: barGroup.setTranslateX(0); barGroup.translateYProperty().bind(label.heightProperty()); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.setTranslateY(0); break;
barGroup.setTranslateX(0); barGroup.setTranslateY(0); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.translateYProperty().bind(height); break; barGroup.setTranslateY(0); label.setTranslateX(0); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case RIGHT: barGroup.setTranslateY(0); label.translateXProperty().bind(width.add(10)); label.translateYProperty().bind(height.divide(2).subtract(label.heightProperty().divide(2))); break; case TOP: barGroup.setTranslateX(0); barGroup.translateYProperty().bind(label.heightProperty()); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.setTranslateY(0); break;
panel.prefWidthProperty().bind(this.containersView.getTabPane().widthProperty().divide(3));
bottomBar.setMaxHeight(64); bottomBar.getTransforms().add(scale); scale.pivotYProperty().bind(bottomBar.heightProperty().divide(2)); bottomBar.setPickOnBounds(false);
scale = new Scale(1, 1, 0, 0); rotate = new Rotate(0, 0, 1); rotate.pivotYProperty().bind(selectedTabLine.heightProperty().divide(2));
subScene3D.widthProperty().bind(SCENE_PARENT.widthProperty()); scene3DController.getCenterWinTranslate().xProperty().bind(SCENE_PARENT.widthProperty().divide(3)); scene3DController.getCenterWinTranslate().yProperty().bind(SCENE_PARENT.heightProperty().multiply(2.0 / 3.0));