BooleanProperty target = new SimpleBooleanProperty();//value is false BooleanProperty source = new SimpleBooleanProperty(true);//value is true target.bindBidirectional(source);//target.get() will now return true target.set(false);//both values are now false source.set(true);//both values are now true
this.isSelected = new SimpleBooleanProperty(isSelected);
private BooleanProperty booleanProperty = new SimpleBooleanProperty(true);
private BooleanProperty selected = new SimpleBooleanProperty(false);
@Override public ObservableValue<Boolean> call(String item) { BooleanProperty observable = new SimpleBooleanProperty(); observable.addListener((obs, wasSelected, isNowSelected) -> System.out.println("Check box for "+item+" changed from "+wasSelected+" to "+isNowSelected)
/** * When true, indicates the current high value of this RangeSlider is changing. * It provides notification that the high value is changing. Once the high * value is computed, it is set back to false. */ public final BooleanProperty highValueChangingProperty() { if (highValueChanging == null) { highValueChanging = new SimpleBooleanProperty(this, "highValueChanging", false); //$NON-NLS-1$ } return highValueChanging; } private BooleanProperty highValueChanging;
public static BooleanBinding conjunction(ObservableList<BooleanProperty> list){ BooleanBinding and = new SimpleBooleanProperty(true).and(list.get(0)); for(int i = 1; i < list.size(); i++){ and = and.and(list.get(i)); } return and; }
/** * Default Constructor */ public DataFxService() { cancelable = new SimpleBooleanProperty(true); }
/** * Creates a new {@link BooleanField} with the given default value. * * @param defaultValue * The initial value and persistent value of the field. * * @return Returns a new {@link BooleanField}. */ public static BooleanField ofBooleanType(boolean defaultValue) { return new BooleanField(new SimpleBooleanProperty(defaultValue), new SimpleBooleanProperty(defaultValue)); }
private final BooleanProperty on = new SimpleBooleanProperty();
this.married = new SimpleBooleanProperty(isMarried); this.hasChildren = new SimpleBooleanProperty(hasChildren); this.favoriteMovie = new SimpleStringProperty(favoriteMovie);
byNode.setCursor(Cursor.MOVE); }); final BooleanProperty inDrag = new SimpleBooleanProperty(false);
public BooleanProperty pauseReadingProperty() { if (pauseReadingProperty == null) { pauseReadingProperty = new SimpleBooleanProperty(this, "pauseReadingProperty", false); pauseReadingProperty.addListener(this::togglePause); } return pauseReadingProperty; }
TestPerson(String firstName, String lastName, boolean telecommuter, double balance) { this.userID = userIDCounter++; this.firstNameProperty = new SimpleStringProperty(this, "firstName", firstName); this.telecommuterProperty = new SimpleBooleanProperty(this, "telecommuter", telecommuter); }
/** * add the given Value * * @param booleanValue * @return - the value */ public BooleanValue addValue(BooleanValue booleanValue) { this.addCanProperty(booleanValue, new SimpleBooleanProperty()); return booleanValue; }
/** * Creates a new {@link BooleanField} with the given property. * * @param binding * The property from the model to be bound with. * * @return Returns a new {@link BooleanField}. */ public static BooleanField ofBooleanType(BooleanProperty binding) { return new BooleanField(new SimpleBooleanProperty(binding.getValue()), new SimpleBooleanProperty(binding.getValue())).bind(binding); }
public BooleanProperty readingProperty() { if (readingProperty == null) { readingProperty = new SimpleBooleanProperty(this, "readLogProperty", false); readingProperty.addListener(this::toggleReading); } return readingProperty; }
private final BooleanProperty searchmode = new SimpleBooleanProperty(false); public final boolean isSearchmode() { return searchmodeProperty().get(); } public final void setSearchmode(boolean searchmode) { searchmodeProperty().set(searchmode); } public BooleanProperty searchmodeProperty() { return searchmode ; }
@Override public ObservableValue<Boolean> call(TableColumn.CellDataFeatures<TransientTableRow, Boolean> p) { final TransientTableRow value = p.getValue(); return new SimpleBooleanProperty(value != null); } }
/** * Create a JavaFX {@link javafx.beans.property.BooleanProperty} as a wrapper for a remoting property * * @param remotingProperty the remoting property * @return the JavaFX property */ public static BooleanProperty wrapBooleanProperty(final Property<Boolean> remotingProperty) { Assert.requireNonNull(remotingProperty, "remotingProperty"); final BooleanProperty property = new SimpleBooleanProperty(); FXBinder.bind(property).bidirectionalTo(remotingProperty); return property; }