/** * Sets the amount of columns the field takes up inside the section grid. * * @param newValue * The new number of columns. * * @return Returns the current field to allow for chaining. */ public E span(int newValue) { span.setValue(newValue); return (E) this; }
@Override public void setValue(Number v) { delegate.setValue(v); }
public void setRequired(int required) { this.required.setValue(required); }
/** * Sets the amount of columns the field takes up inside the section grid. * * @param newValue * The new span fraction. * * @return Returns the current field to allow for chaining. */ public E span(ColSpan newValue) { span.setValue(newValue.valueOf()); return (E) this; }
@Override public void setPort(Integer port) { document().portProperty().setValue(port); }
@Override default void setOrdinalPosition(Integer ordinalPosition) { document().ordinalPositionProperty().setValue(ordinalPosition); } }
public void setValue(int newValue) { value.setValue(newValue); } public IntegerProperty valueProperty() { return value; } } else { if (newValue.intValue() < intField.minValue) { value.setValue(intField.minValue); return; value.setValue(intField.maxValue); return; @Override public void changed(ObservableValue<? extends String> observableValue, String oldValue, String newValue) { if (newValue == null || "".equals(newValue)) { value.setValue(0); return;
/** * set the value (needs to be run on JavaFX thread!) * * @param value */ private void setValue(T value) { property.setValue(value); this.updateCountProperty.setValue(canValue.getUpdateCount()); setMinMax(value); }
public void setValue(int newValue) { value.setValue(newValue); } public IntegerProperty valueProperty() { return value; } } else { if (newValue.intValue() < intField.minValue) { value.setValue(intField.minValue); return; value.setValue(intField.maxValue); return; @Override public void changed(ObservableValue<? extends String> observableValue, String oldValue, String newValue) { if (newValue == null || "".equals(newValue)) { value.setValue(0); return;
/** * set the value at the given index (needs to be run on JavaFX thread!) * * @param index * @param value */ private void doSetValue(int index, T value, Date timeStamp) { canValue.setValue(index, value, timeStamp); setMinMax(value); int triggerIndex = canValue.getCANInfo().getMaxIndex() - 1; if (index == triggerIndex) { int newUpdateCount = this.updateCountProperty.getValue() + 1; this.updateCountProperty.setValue(newUpdateCount); if (debug) LOGGER.log(Level.INFO, this.getCANInfo().getName() + " " + newUpdateCount + " updates"); } }
lodableGames.selectedIndexProperty().setValue(0); lodableGames.getStyleClass().add("defaultTextSize24"); lodableGames.setMaxWidth(200);
final int selectedIndex = selectedInterestLevel.get(); if (selectedIndex > 0) { selectedInterestLevel.setValue(selectedIndex - 1); remove(loanAgreement); loanAgreement = createLoanAggreement(interestLevels, selectedInterestLevel); final int selectedIndex = selectedInterestLevel.get(); if (selectedIndex < interestLevels.size() - 1) { selectedInterestLevel.setValue(selectedIndex + 1); remove(loanAgreement); loanAgreement = createLoanAggreement(interestLevels, selectedInterestLevel);
final int amount = city.getCity().getWare(EWare.BRICK).getAmount(); newValue = Math.min(newValue, amount); numberOfBricks.setValue(newValue); }); Label nbBricks = new Label(); int newValue = Math.max(0, numberOfBricks.get() - 1); newValue = Math.min(newValue, city.getCity().getWare(EWare.BRICK).getAmount()); numberOfBricks.setValue(newValue); }); buyBrickBox.getChildren().addAll(text, minusIcon, nbBricks, plusIcon);
lodableGames.selectedIndexProperty().setValue(0); grid.add(lodableGames, 1, 0); GridPane.setHalignment(lodableGames, HPos.LEFT); saveableGames.selectedIndexProperty().setValue(0); grid.add(saveableGames, 1, 1); GridPane.setHalignment(saveableGames, HPos.LEFT); speed.selectedIndexProperty().setValue(index);
int hireNbSailors = sailorsAdditionalOnShip.get(); currentShip.get().setNumberOfSailors(hireNbSailors + currentShip.get().getNumberOfSailors()); sailorsAdditionalOnShip.setValue(0); sailorState.setNumberOfSailors(sailorsInTavern.get()); city.getCity().getCityState().getPopUpdateStatistic().hireSailors(hireNbSailors);
hometown.setMaxWidth(200); hometown.setOptions(FXCollections.observableArrayList(getHomeTowns4Map())); hometown.selectedIndexProperty().setValue(0); map.selectedIndexProperty().addListener((observableValue, number, number2) -> { hometown.setOptions(FXCollections.observableArrayList(getHomeTowns4Map())); difficulty.getStyleClass().addAll("defaultTextSize24"); difficulty.setValues(getDificutlyList()); difficulty.selectedIndexProperty().setValue(0); grid.add(difficulty, 1, 4); GridPane.setHalignment(difficulty, HPos.LEFT); speed.getStyleClass().addAll("defaultTextSize24"); speed.setValues(gameOptions.getGameSpeedList()); speed.selectedIndexProperty().setValue(1); grid.add(speed, 4, 4); GridPane.setHalignment(speed, HPos.LEFT); objective.setMaxWidth(200); objective.setOptions(FXCollections.observableArrayList(getObjectiveList())); objective.selectedIndexProperty().setValue(0); grid.add(objective, 1, 5); GridPane.setHalignment(objective, HPos.LEFT);