enableConnectionUrl.selectedProperty().not() );
@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; }
@Override public BooleanBinding not() { return delegate.not(); }
public void toggle() { active.setValue(active.not().get()); }
/** * Sets up bindings for all radio buttons. */ protected void setupRadioButtonBindings() { for (RadioButton radio : radioButtons) { radio.disableProperty().bind(field.editableProperty().not()); } }
/** * Sets up bindings for all checkboxes. */ protected void setupCheckboxBindings() { for (CheckBox checkbox : checkboxes) { checkbox.disableProperty().bind(field.editableProperty().not()); } }
private void setUpInteractionButtons() { interactionBox.visibleProperty().bind(embeddedProperty.not()); interactionBox.managedProperty().bind(embeddedProperty.not()); easyFxml.loadNode(TWEET_INTERACTION_BOX, Pane.class, TweetInteractionPaneController.class) .afterControllerLoaded(tipc -> tipc.targetStatusProperty().bind(currentStatus)) .getNode() .recover(ExceptionHandler::fromThrowable) .onSuccess(interactionBox::setCenter); }
/** * {@inheritDoc} */ @Override public void setupBindings() { super.setupBindings(); checkBox.disableProperty().bind(field.editableProperty().not()); fieldLabel.textProperty().bind(field.labelProperty()); }
/** * {@inheritDoc} */ @Override public void setupBindings() { super.setupBindings(); fieldLabel.textProperty().bind(field.labelProperty()); listView.disableProperty().bind(field.editableProperty().not()); }
iv.visibleProperty().bind(hideProperty.not());
@Override public void setupBindings() { super.setupBindings(); picker.disableProperty().bind(field.editableProperty().not()); readOnlyLabel.visibleProperty().bind(field.editableProperty().not()); picker.getEditor().textProperty().bindBidirectional(field.userInputProperty()); fieldLabel.textProperty().bind(field.labelProperty()); picker.promptTextProperty().bind(field.placeholderProperty()); picker.managedProperty().bind(picker.visibleProperty()); }
@Override // This method is called by the FXMLLoader when initialization is complete public void initialize(URL fxmlFileLocation, ResourceBundle resources) { assert password != null : "fx:id=\"password\" was not injected: check your FXML file 'Login.fxml'."; assert serverAddress != null : "fx:id=\"serverAddress\" was not injected: check your FXML file 'Login.fxml'."; assert serverRadioButton != null : "fx:id=\"serverRadioButton\" was not injected: check your FXML file 'Login.fxml'."; assert startButton != null : "fx:id=\"startButton\" was not injected: check your FXML file 'Login.fxml'."; assert user != null : "fx:id=\"user\" was not injected: check your FXML file 'Login.fxml'."; ToggleGroup groupConnection = new ToggleGroup(); serverRadioButton.setSelected(true); serverRadioButton.setToggleGroup(groupConnection); user.disableProperty().bind(serverRadioButton.selectedProperty().not()); password.disableProperty().bind(serverRadioButton.selectedProperty().not()); serverAddress.disableProperty().bind(serverRadioButton.selectedProperty().not()); startButton.disableProperty().bind(serverAddress.textProperty().isEqualTo("")); startButton.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { try { if (serverRadioButton.isSelected()) { cleanup(); mainFactory.setHttpGuiCopperDataProvider(serverAddress.getText(), user.getText(), password.getText()); } } catch (Exception e) { throw new RuntimeException(e); } } }); serverAddress.textProperty().bindBidirectional(settingsModelSingleton.lastConnectedServer); }
exerciseViewModel.sportTypeRecordDistance.not())); tfAvgSpeed.disableProperty().bind(Bindings.or( rbAutoCalcAvgSpeed.selectedProperty(), exerciseViewModel.sportTypeRecordDistance.not())); rbAutoCalcDistance.disableProperty().bind(exerciseViewModel.sportTypeRecordDistance.not()); rbAutoCalcAvgSpeed.disableProperty().bind(exerciseViewModel.sportTypeRecordDistance.not()); rbAutoCalcDuration.disableProperty().bind(exerciseViewModel.sportTypeRecordDistance.not());
/** * {@inheritDoc} */ @Override public void setupBindings() { super.setupBindings(); fieldLabel.textProperty().bind(field.labelProperty()); comboBox.visibleProperty().bind(field.editableProperty()); readOnlyLabel.visibleProperty().bind(field.editableProperty().not()); readOnlyLabel.textProperty().bind(comboBox.valueProperty().asString()); }
/** * {@inheritDoc} */ @Override public void setupBindings() { super.setupBindings(); editableSpinner.visibleProperty().bind(field.editableProperty()); readOnlyLabel.visibleProperty().bind(field.editableProperty().not()); editableSpinner.getEditor().textProperty().bindBidirectional(field.userInputProperty()); readOnlyLabel.textProperty().bind(field.userInputProperty()); fieldLabel.textProperty().bind(field.labelProperty()); }
/** * Setup of the binding between the view model and the UI controls. */ private void setupBinding() { tfName.textProperty().bindBidirectional(sportTypeViewModel.name); cbRecordDistance.selectedProperty().bindBidirectional(sportTypeViewModel.recordDistance); cbSpeedMode.valueProperty().bindBidirectional(sportTypeViewModel.speedMode); cpColor.valueProperty().bindBidirectional(sportTypeViewModel.color); // the record distance mode can only be changed, when no exercises exists for // this sport type => disable checkbox, when such exercises were found Optional<Exercise> oExercise = document.getExerciseList().stream() .filter(exercise -> exercise.getSportType().getId() == sportTypeViewModel.id) .findFirst(); cbRecordDistance.setDisable(oExercise.isPresent()); // speed mode can only be configured when distance is being recorded cbSpeedMode.disableProperty().bind(cbRecordDistance.selectedProperty().not()); // Edit and Delete buttons must be disabled when there is no selection in the appropriate list final BooleanBinding sportSubtypeSelected = Bindings.isNull( liSportSubtypes.getSelectionModel().selectedItemProperty()); btSportSubtypeEdit.disableProperty().bind(sportSubtypeSelected); btSportSubtypeDelete.disableProperty().bind(sportSubtypeSelected); final BooleanBinding equipmentSelected = Bindings.isNull( liEquipments.getSelectionModel().selectedItemProperty()); btEquipmentEdit.disableProperty().bind(equipmentSelected); btEquipmentDelete.disableProperty().bind(equipmentSelected); }
/** * {@inheritDoc} */ @Override public void setupBindings() { super.setupBindings(); editableArea.visibleProperty().bind(Bindings.and(field.editableProperty(), field.multilineProperty())); editableField.visibleProperty().bind(Bindings.and(field.editableProperty(), field.multilineProperty().not())); readOnlyLabel.visibleProperty().bind(field.editableProperty().not()); editableField.textProperty().bindBidirectional(field.userInputProperty()); editableArea.textProperty().bindBidirectional(field.userInputProperty()); readOnlyLabel.textProperty().bind(field.userInputProperty()); fieldLabel.textProperty().bind(field.labelProperty()); editableField.promptTextProperty().bind(field.placeholderProperty()); editableArea.promptTextProperty().bind(field.placeholderProperty()); editableArea.managedProperty().bind(editableArea.visibleProperty()); editableField.managedProperty().bind(editableField.visibleProperty()); }
@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; }
closeTab.disableProperty().bind(selectionTab.getSelectedItem().closableProperty().not());
/** * {@inheritDoc} */ @Override public void setupBindings() { super.setupBindings(); editableField.visibleProperty().bind(field.editableProperty()); readOnlyLabel.visibleProperty().bind(field.editableProperty().not()); editableField.textProperty().bindBidirectional(field.userInputProperty()); obfuscatedUserInputBinding = Bindings.createStringBinding(() -> obfuscate(field.getUserInput()), field.userInputProperty()); readOnlyLabel.textProperty().bind(obfuscatedUserInputBinding); fieldLabel.textProperty().bind(field.labelProperty()); editableField.promptTextProperty().bind(field.placeholderProperty()); editableField.managedProperty().bind(editableField.visibleProperty()); }