linesWrapper.clip.widthProperty().bind(linesWrapper.promptContainer.widthProperty().subtract(arrowButton.widthProperty()));
.subtract(logCategoryColumn.getPrefWidth()) .subtract(logDateColumn.getPrefWidth()) .subtract(2)); // makes it work
private void initScrollPane() { // CHECKSTYLE:OFF Magicnumber AH DI MI TOCCA ScrollPaneFactory.wrapNodeOnScrollPane(this.userScrollPane, this.userBorderPane, "Select User", "headerUserPane"); this.treeView.maxHeightProperty().bind(this.tabStackPane.heightProperty().subtract(300)); this.treeView.minHeightProperty().bind(this.tabStackPane.heightProperty().subtract(300)); JFXDepthManager.setDepth(this.userHBox, 1); // CHECKSTYLE:ON Magicnumber AH DI MI TOCCA }
@Override public void showFilteredResult(List<SqlResultModel> filteredResult, SqlFilterModel usedFilter) { resultTable.getColumns().clear(); if (!filteredResult.isEmpty()) { for (int i = 0; i < filteredResult.get(0).rows.size(); i++) { TableColumn<SqlResultModel, String> rowColumn = new TableColumn<SqlResultModel, String>(); rowColumn.setText(filteredResult.get(0).rows.get(i).get()); final int rowIndex = i; rowColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<SqlResultModel, String>, ObservableValue<String>>() { @Override public ObservableValue<String> call(CellDataFeatures<SqlResultModel, String> param) { return param.getValue().rows.get(rowIndex); } });// -3 for the border rowColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).divide(filteredResult.get(0).rows.size())); resultTable.getColumns().add(rowColumn); } ObservableList<SqlResultModel> content = FXCollections.observableArrayList(); content.addAll(filteredResult); content.remove(0); setOriginalItems(resultTable, content); } }
private void addTab(String tabId, MapView mapView) { Tab mapViewTab = xyTabPane.getTab(tabId); mapViewTab.setContent(mapView.getStackPane()); NumberBinding heightAdjust = getScene().heightProperty() .subtract(xyTabPane.getTabSize()); // getMenuBar().heightProperty().add( NumberBinding widthAdjust = getScene().widthProperty() .subtract(xyTabPane.getTabSize()); // mapView.addSizeListener(widthAdjust, heightAdjust); // NumberBinding // heightAdjust=rainTabPane.heightProperty().add(getMenuBar().heightProperty()); mapView.getImageView().fitHeightProperty().bind(heightAdjust); mapView.getImageView().fitWidthProperty().bind(widthAdjust); }
timeColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15)); timeout.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15)); messageColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.45)); idColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.25));
countColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(0.075)); workflowClassColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(0.525)); double totalSpaceForStateColumns = 0.4; tableColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(2).multiply(totalSpaceForStateColumns / WorkflowInstanceState.values().length)); resultTable.getColumns().add(tableColumn);
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()); }
e2.xProperty().bind(this.widthProperty().subtract(arrowWidth)); path.getElements().add(e2);
timeColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.15)); loglevelColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.05)); locationColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.05)); messageColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.73));
public static void startValueSetAnimation(final Pane parent) { final javafx.scene.shape.Rectangle rectangle = new javafx.scene.shape.Rectangle(); Insets margin = BorderPane.getMargin(parent); if (margin == null) { margin = new Insets(0); } rectangle.widthProperty().bind(parent.widthProperty().subtract(margin.getLeft() + margin.getRight())); rectangle.heightProperty().bind(parent.heightProperty().subtract(margin.getTop() + margin.getBottom())); rectangle.setFill(Color.rgb(0, 150, 201)); parent.getChildren().add(rectangle); BoxBlur bb = new BoxBlur(); bb.setWidth(5); bb.setHeight(5); bb.setIterations(3); rectangle.setEffect(bb); FadeTransition ft = new FadeTransition(Duration.millis(250), rectangle); ft.setFromValue(0.2); ft.setToValue(0.8); ft.setCycleCount(2); ft.setAutoReverse(true); ft.play(); ft.setOnFinished(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { parent.getChildren().remove(rectangle); } }); }
idColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.11)); prioritynColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.07)); processorPoolColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); stateColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.07)); timeoutColumn.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); lastActivityTimestamp.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.11)); overallLifetimeInMs.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); startTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); finishTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); lastErrorTime.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.09)); errorInfos.prefWidthProperty().bind(resultTable.widthProperty().subtract(3).multiply(0.1));
circularPane.layoutXProperty().bind( pane.widthProperty().subtract(circularPane.widthProperty())); circularPane.setLayoutY(0); circularPane.layoutXProperty().bind( pane.widthProperty().subtract(circularPane.widthProperty())); circularPane.layoutYProperty().bind( pane.heightProperty().subtract(circularPane.heightProperty())); circularPane.layoutYProperty().bind( pane.heightProperty().subtract(circularPane.heightProperty()));
lClip.widthProperty().bind(this.widthProperty().subtract(label.layoutXProperty())); lClip.heightProperty().bind(this.heightProperty());
contentWidth = new SimpleDoubleProperty(this, "contentWidth", 0.0); DoubleBinding contentWidthBinding = control.contentMaxWidthProperty() .subtract(control.paddingLocalProperty().getValue().getLeft()) .subtract(control.paddingLocalProperty().getValue().getRight()) .subtract(2*DROP_SHADOW_PADDING); control.paddingLocalProperty().addListener((observable, oldValue, newValue) -> { double sideInsets = newValue.getLeft() + newValue.getRight(); contentWidth.set(control.contentMaxWidthProperty().subtract(sideInsets).doubleValue());
linesWrapper.clip.widthProperty().bind(linesWrapper.promptContainer.widthProperty().subtract(arrowButton.widthProperty()));