@Override public Integer getValue() { return delegate.getValue(); }
@Override default OptionalInt getDecimalDigits() { final Integer value = decimalDigitsProperty().getValue(); if (value == null) { return OptionalInt.empty(); } else { return OptionalInt.of(value); } } }
@Override default OptionalInt getColumnSize() { final Integer value = columnSizeProperty().getValue(); if (value == null) { return OptionalInt.empty(); } else { return OptionalInt.of(value); } } }
@Override public final OptionalInt getAsInt(String key) { final IntegerProperty prop = (IntegerProperty) properties.get(key); if (prop == null) { return OptionalInt.empty(); } else { return OptionalUtil.ofNullable(prop.getValue()); } }
public void decSelectedIndex() { if (selectedIndex.getValue() > 0) { selectedIndex.set(getSelectedIndex()-1); } }
/** * Creates a new {@link IntegerField} with the given property. * * @param binding * The property from the model to be bound with. * * @return Returns a new {@link IntegerField}. */ public static IntegerField ofIntegerType(IntegerProperty binding) { return new IntegerField(new SimpleIntegerProperty(binding.getValue()), new SimpleIntegerProperty(binding.getValue())).bind(binding); }
public void incSelectedIndex() { if (selectedIndex.getValue() < getOptions().size() -1) { selectedIndex.set(getSelectedIndex()+1); } } public void decSelectedIndex() {
/** * The constructor of {@code IntegerField}. * * @param valueProperty * The property that is used to store the current valid value * of the field. * @param persistentValueProperty * The property that is used to store the latest persisted * value of the field. */ protected IntegerField(SimpleIntegerProperty valueProperty, SimpleIntegerProperty persistentValueProperty) { super(valueProperty, persistentValueProperty); stringConverter = new AbstractStringConverter<Integer>() { @Override public Integer fromString(String string) { return Integer.parseInt(string); } }; renderer = new SimpleIntegerControl(); userInput.set(stringConverter.toString(value.getValue())); }
public int getValue() { return value.getValue(); } public void setValue(int newValue) { value.setValue(newValue); } public IntegerProperty valueProperty() { return value; }
public class AStringAndAnInt{ private StringProperty str = new SimpleStringProperty(); private IntegerProperty integer = new SimpleIntegerProperty(); public String getStr() { return str.getValue(); } public void setStr(String value) { str.set(value); } public StringProperty strProperty() { return str; } public int getInteger() { return integer.getValue(); } public void setInteger(int value) { integer.set(value); } public IntegerProperty integerProperty() { return integer; } }
/** * 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"); } }
public int getValue() { return value.getValue(); } public void setValue(int newValue) { value.setValue(newValue); } public IntegerProperty valueProperty() { return value; }
exercise.setDistance(distance.getValue()); exercise.setAvgSpeed(speedConverter.stringSpeedToFloat(avgSpeed.getValue())); exercise.setDuration(duration.getValue()); exercise.setAvgHeartRate(avgHeartRate.getValue()); exercise.setAscent(ascent.getValue()); exercise.setDescent(descent.getValue()); exercise.setCalories(calories.getValue()); exercise.setEquipment(equipment.getValue());
} else { searchField.pseudoClassStateChanged(failed, false); matchLabel.setText(nbMatchFound.format(new Object[] {matcher.currentMatchProperty.getValue() + 1, newValue})); matchLabel.setText(nbMatchFound.format(new Object[] {newValue.intValue() + 1, matcher.nbMatchesProperty().getValue()})); textArea.select(matcher.currentMatchStart(), matcher.currentMatchEnd());