@Override protected Node createUndecoratedEditor() { final CheckBox box = new CheckBox(); box.setSelected( property.get() ); property.bindBidirectional(box.selectedProperty() ); return box; } }
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
branch.expandedProperty().bindBidirectional(doc.expandedProperty());
@Override protected Node createUndecoratedEditor() { final CheckBox cbNull = new CheckBox(); final Node wrappedCb = ItemUtil.lockDecorator(cbNull, document, ItemUtil.DATABASE_RELATION_TOOLTIP); final Label label = new Label(IMPLEMENTATION_TITLE); final ChoiceBox<ImplementAs> cbImpl = new ChoiceBox<>( observableArrayList(ImplementAs.values()) ); cbImpl.setTooltip(new Tooltip(IMPLEMENTATION_TOOLTIP)); final HBox right = new HBox(label, cbImpl); final HBox left = new HBox(wrappedCb, right); left.setSpacing(16); right.setSpacing(8); right.setAlignment(Pos.CENTER); cbNull.selectedProperty().bindBidirectional(nullable); cbImpl.valueProperty().bindBidirectional(implementation); right.visibleProperty().bind(nullable); right.disableProperty().bind(nullable.not()); return left; }
final CheckMenuItem mi = new CheckMenuItem("_Project Tree"); mi.setGraphic(SpeedmentIcon.APPLICATION_SIDE_TREE.view()); mi.selectedProperty().bindBidirectional(ui.projectTreeVisibleProperty()); return mi; }) final CheckMenuItem mi = new CheckMenuItem("_Workspace"); mi.setGraphic(SpeedmentIcon.APPLICATION_FORM.view()); mi.selectedProperty().bindBidirectional(ui.workspaceVisibleProperty()); return mi; }) final CheckMenuItem mi = new CheckMenuItem("_Output"); mi.setGraphic(SpeedmentIcon.APPLICATION_XP_TERMINAL.view()); mi.selectedProperty().bindBidirectional(ui.outputVisibleProperty()); return mi; });
@Override // This method is called by the FXMLLoader when initialization is complete public void initialize(URL fxmlFileLocation, ResourceBundle resources) { assert ignoreProcessed != null : "fx:id=\"ignoreProcessed\" was not injected: check your FXML file 'MessageFilter.fxml'."; ignoreProcessed.selectedProperty().bindBidirectional(model.ignoreProcessed); }
@Nonnull public static CheckBox checkBox(@Nonnull String text, @Nonnull BooleanProperty selected) { CheckBox checkBox = new CheckBox(text); checkBox.selectedProperty().bindBidirectional(selected); return checkBox; }
@Nonnull public static Node createCheckBox(@Nonnull String label, @Nonnull BooleanProperty booleanProperty) { CheckBox checkBox = new CheckBox(label); checkBox.selectedProperty().bindBidirectional(booleanProperty); return checkBox; }
/** * Constructor */ public BrowserTitlePaneBlocContent() { managedProperty().bindBidirectional(visibleProperty()); }
/** * Constructor */ public DynamicalAttributesFormBlocContent() { getStyleClass().add(FORM_BLOC_CONTENT); managedProperty().bindBidirectional(visibleProperty()); }
/** * Constructor */ public FormBlocContent() { getStyleClass().add(FORM_BLOC_CONTENT); managedProperty().bindBidirectional(visibleProperty()); }
public void initialize(LidarScanLoggerController loggerController) { this.loggerController = loggerController; startReadingToggleButton.selectedProperty().bindBidirectional(loggerController.readingProperty()); startReadingToggleButton.selectedProperty().addListener( (ChangeListener<Boolean>) (observable, oldValue, newValue) -> startReadingToggleButton.setText(newValue ? "Stop Reading" : "Start Reading")); pauseToggleButton.selectedProperty().bindBidirectional(loggerController.pauseReadingProperty()); waitForListenerToggleButton.selectedProperty().bindBidirectional(loggerController.waitForListenerWhenReadingProperty()); }
public void initialize(LidarScanLoggerController loggerController) { this.loggerController = loggerController; startReadingToggleButton.selectedProperty().bindBidirectional(loggerController.readingProperty()); startReadingToggleButton.selectedProperty().addListener( (ChangeListener<Boolean>) (observable, oldValue, newValue) -> startReadingToggleButton.setText(newValue ? "Stop Reading" : "Start Reading")); pauseToggleButton.selectedProperty().bindBidirectional(loggerController.pauseReadingProperty()); waitForListenerToggleButton.selectedProperty().bindBidirectional(loggerController.waitForListenerWhenReadingProperty()); }
/** * Configures a toolbar toggle button with the specified toggle action. * * @param toggleButton the toolbar toggle button to configure * @param action the toggle action * @param iconSize the icon size */ public static void configureToolbarToggleButton(ToggleButton toggleButton, FXToggleAction action, int iconSize) { configureToolbarButton(toggleButton, action, iconSize); toggleButton.selectedProperty().bindBidirectional(action.selectedProperty()); } }
/** * Configures a {@link RadioMenuItem} with the specified toggle action. * * @param menuItem the menu item to configre * @param action the action * @param iconSize the icon size */ public static void configureRadioMenuItem(RadioMenuItem menuItem, FXToggleAction action, int iconSize) { configureMenuItem(menuItem, action, iconSize); menuItem.selectedProperty().bindBidirectional(action.selectedProperty()); }
/** * Configures a {@link CheckMenuItem} with the specified toggle action. * * @param menuItem the menu item to configre * @param action the action * @param iconSize the icon size */ public static void configureCheckMenuItem(CheckMenuItem menuItem, FXToggleAction action, int iconSize) { configureMenuItem(menuItem, action, iconSize); menuItem.selectedProperty().bindBidirectional(action.selectedProperty()); } }
private void addDividerPositionChangeListener(int dividerIndex) { SplitPane.Divider divider = splitPane.getDividers().get(dividerIndex); if (dividerPositionChangeListeners.containsKey(divider)) { throw new IllegalStateException(); } DividerPositionChangeListener dividerPositionChangeListener = new DividerPositionChangeListener(dividerIndex); dividerPositionChangeListener.adjustingProperty().bindBidirectional(adjustingProperty()); dividerPositionChangeListeners.put(divider, dividerPositionChangeListener); divider.positionProperty().addListener(dividerPositionChangeListener); }
@Override protected Node createUndecoratedEditor() { final CheckBox box = new CheckBox(); box.setSelected( property.get() ); property.bindBidirectional(box.selectedProperty() ); return box; } }
@Override public Node createValueVisualisation() { CheckBox checkBox = new CheckBox(); checkBox.selectedProperty().bindBidirectional(observableAttributeValue); checkBox.disableProperty().bind(readOnly); return checkBox; } }
FilterValue(R value, ColumnFilter<T,R> columnFilter) { this.value = value; this.columnFilter = columnFilter; final CheckBox checkBox = new CheckBox(); final Label label = new Label(); label.setText(Optional.ofNullable(value).map(Object::toString).orElse(null)); scopeListener = (Observable v) -> label.textFillProperty().set(getInScopeProperty().get() ? Color.BLACK : Color.LIGHTGRAY); inScope.addListener(new WeakInvalidationListener(scopeListener)); checkBox.selectedProperty().bindBidirectional(selectedProperty()); getChildren().addAll(checkBox,label); }