Person(String firstName, String lastName, int age) { this.firstName = new SimpleStringProperty(firstName); this.lastName = new SimpleStringProperty(lastName); this.age = new SimpleIntegerProperty(age); }
this.customValue = new SimpleIntegerProperty().asObject(); this.min = min; this.max = max;
/** * Creates a new {@link IntegerField} with the given default value. * * @param defaultValue * The initial value and persistent value of the field. * * @return Returns a new {@link IntegerField}. */ public static IntegerField ofIntegerType(int defaultValue) { return new IntegerField(new SimpleIntegerProperty(defaultValue), new SimpleIntegerProperty(defaultValue)); }
@Nonnull public IntegerProperty valueIntegerProperty() { if (value == null) { value = new SimpleIntegerProperty(this, "value"); } return value; } }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
/** * add the given Value * * @param integerValue * @return - the value */ public IntegerValue addValue(IntegerValue integerValue) { this.addCanProperty(integerValue, new SimpleIntegerProperty()); return integerValue; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
public IntegerProperty iconSizeProperty() { if (iconSize == null) { iconSize = new SimpleIntegerProperty(this, "iconSize", 16); iconSize.addListener(iconSizeChangeListener); } return iconSize; }
/** * Constructor using the base.css style sheet and the supplied style class to define the font. */ public DecoratedText(String styleClass) { super(Orientation.HORIZONTAL); wrappingWidth = new SimpleIntegerProperty(this, "wrappingWidth", 0); getStylesheets().add(getClass().getResource(getClass().getSimpleName()+".css").toExternalForm()); getStylesheets().add(this.getClass().getResource("/styles/base.css").toExternalForm()); getStyleClass().add(styleClass); prefWidthProperty().bindBidirectional(wrappingWidth); } /**
/** * Create a JavaFX {@link javafx.beans.property.IntegerProperty} as a wrapper for a remoting property * * @param remotingProperty the remoting property * @return the JavaFX property */ public static IntegerProperty wrapIntProperty(final Property<Integer> remotingProperty) { Assert.requireNonNull(remotingProperty, "remotingProperty"); final IntegerProperty property = new SimpleIntegerProperty(); FXBinder.bind(property).bidirectionalToNumeric(remotingProperty); return property; }
private EventHandler<MouseEvent> createPreviousAction(EWare ware) { return evt -> { try { office.move(ware, 1); IntegerProperty donated = availableMap.get(ware); availableMap.put(ware, new SimpleIntegerProperty(donated.subtract(1).intValue())); } catch (RuntimeException e) { logger.error("Failed to move wares", e); } }; }
private EventHandler<MouseEvent> createNextAction(EWare ware) { return evt -> { try { office.move(ware, -1); IntegerProperty donated = availableMap.get(ware); availableMap.put(ware, new SimpleIntegerProperty(donated.add(1).intValue())); } catch (RuntimeException e) { logger.error("Failed to move wares", e); } }; }
@Override protected int computeValue() { int availableAmount = getAmountInArmory(weapon).get(); int buyAmount = transferUtil.calculateAvailableAmount(ETransferAmount.ONE, availableAmount); if (buyAmount>0) { return computablePrice.buyPrice(weapon, new SimpleIntegerProperty(availableAmount), new StaticIntegerBinding(buyAmount)) * 2; } else { return 0; } } };
@Override protected int computeValue() { if (amountToSell.get() > 0) { int availableAmount = weaponsDealer.amountAvailableProperty(weapon).getValue(); // that should be the amount of the dealer return computablePrice.sellPrice(weapon, new SimpleIntegerProperty(availableAmount), amountToSell); // amountToSell is the amount stored on ship/office } else { return 0; } } };
@Override protected int computeValue() { int availableAmount = getAmountInArmory(weapon).get(); int buyAmount = transferUtil.calculateAvailableAmount(ETransferAmount.ONE, availableAmount); if (buyAmount>0) { return computablePrice.buyPrice(weapon, new SimpleIntegerProperty(availableAmount), new StaticIntegerBinding(buyAmount)) * 2; } else { return 0; } } };
public BaleAmount() { super(); IntegerProperty intAmount = new SimpleIntegerProperty(); intAmount.bind(new StringToIntegerBinding(amountProperty())); visibleProperty().bind(new ZeroAmountBooleanBinding(intAmount)); } }
public CoinPrice() { super(); IntegerProperty intAmount = new SimpleIntegerProperty(); intAmount.bind(new StringToIntegerBinding(amountProperty())); visibleProperty().bind(new ZeroAmountBooleanBinding(intAmount)); } }
public BarrelAmount() { super(); IntegerProperty intAmount = new SimpleIntegerProperty(); intAmount.bind(new StringToIntegerBinding(amountProperty())); visibleProperty().bind(new ZeroAmountBooleanBinding(intAmount)); } }