/** * @return the initial tree items count ( add / remove items should be handled manually for now ) */ public final int getCurrentItemsCount() { return this.currentItemsCountProperty().get(); }
/** * @return -1 if no limit on grid columns, else returns the maximum number of columns to be used in the grid */ public final int getLimitColumn() { return this.limitColumnProperty().get(); }
/** * @return -1 if no limit on grid rows, else returns the maximum number of rows to be used in the grid */ public final int getLimitRow() { return this.limitRowProperty().get(); }
public final int getCellLimit() { return cellLimitProperty().get(); } public final IntegerProperty cellLimitProperty() { return cellLimit; }
private void setupReadOnlyTableView() { setupCellValueFactory(firstNameColumn, Person::firstNameProperty); setupCellValueFactory(lastNameColumn, Person::lastNameProperty); setupCellValueFactory(ageColumn, p -> p.age.asObject()); ObservableList<Person> dummyData = generateDummyData(100); treeTableView.setRoot(new RecursiveTreeItem<>(dummyData, RecursiveTreeObject::getChildren)); treeTableView.setShowRoot(false); treeTableViewCount.textProperty() .bind(Bindings.createStringBinding(() -> PREFIX + treeTableView.getCurrentItemsCount() + POSTFIX, treeTableView.currentItemsCountProperty())); treeTableViewAdd.disableProperty() .bind(Bindings.notEqual(-1, treeTableView.getSelectionModel().selectedIndexProperty())); treeTableViewRemove.disableProperty() .bind(Bindings.equal(-1, treeTableView.getSelectionModel().selectedIndexProperty())); treeTableViewAdd.setOnMouseClicked((e) -> { dummyData.add(createNewRandomPerson()); final IntegerProperty currCountProp = treeTableView.currentItemsCountProperty(); currCountProp.set(currCountProp.get() + 1); }); treeTableViewRemove.setOnMouseClicked((e) -> { dummyData.remove(treeTableView.getSelectionModel().selectedItemProperty().get().getValue()); final IntegerProperty currCountProp = treeTableView.currentItemsCountProperty(); currCountProp.set(currCountProp.get() - 1); }); searchField.textProperty().addListener(setupSearchField(treeTableView)); }
/** * @return current number of line */ public int getLineCount() { return this.lineCount.get(); }
/** * @return the index in the list of possible values of the iterated parameter from which this service will start iterating */ public int getStartValueIndex() { return startValueIndexProperty.get(); }
void previousMatch() { int currentMatch = currentMatchProperty.get(); if (currentMatch > 0) { currentMatchProperty.set(currentMatch - 1); } }
/** * @return the current height hint */ public int getHeightHint() { return heightHintProperty().get(); }
/** * @return The current vertical indent */ public int getVerticalIndent() { return verticalIndentProperty().get(); }
/** * @return the current height */ public int getHeight() { return heightProperty().get(); }
/** * @return Margin on the top and bottom */ public final int getMarginHeight() { return marginHeightProperty().get(); }
/** * @return The margin on the right */ public final int getMarginRight() { return marginRightProperty().get(); }
/** * @return The margin on the bottom */ public final int getMarginBottom() { return marginBottomProperty().get(); }
/** * @return the horizontal indent */ public int getHorizontalIndent() { return horizontalIndentProperty().get(); }
/** * @return the current minimum height */ public int getMinimumHeight() { return minimumHeightProperty().get(); }
/** * @return the current vertical span */ public int getVerticalSpan() { return verticalSpanProperty().get(); }
private DecoratedText createLoanAggreement(List<Double> interestLevels, IntegerProperty selectedInterestLevel) { final double interestSmall = interestLevels.get(selectedInterestLevel.get()); String interest = String.format("%.1f", interestSmall * 100); final int sum = selectedRequest.get().getSum(); int paybacksum = (int) ((1 + interestSmall) * sum); return addDecoratedText("ch.sahits.game.openpatrician.display.dialog.LoanerGiveLoanDialog.loanAgreement", "loanAgreement", sum, selectedRequest.get().getDurationInWeeks(), interest, paybacksum); }
@Nonnull public static Label labelInteger(@Nonnull IntegerProperty integerProperty) { Label label = new Label(); minWidth2pref(label); NumberStringConverterForIntegers converter = new NumberStringConverterForIntegers(); integerProperty.addListener((observable, oldValue, newValue) -> label.setText(converter.toString(newValue))); label.setText(converter.toString(integerProperty.get())); return label; }