List of usage examples for javafx.beans.property SimpleStringProperty SimpleStringProperty
public SimpleStringProperty()
From source file:mesclasses.model.Eleve.java
public Eleve() { super();//from www .j a v a2 s . co m this.id = RandomStringUtils.randomAlphanumeric(5); this.firstName = new SimpleStringProperty(); this.lastName = new SimpleStringProperty(); this.actif = new SimpleBooleanProperty(true); this.data = FXCollections.observableArrayList(); this.punitions = FXCollections.observableArrayList(); this.devoirs = FXCollections.observableArrayList(); this.mots = FXCollections.observableArrayList(); this.changementsClasse = FXCollections.observableArrayList(); }
From source file:mesclasses.model.EleveData.java
public EleveData() { super();//from w w w . j a v a2s. co m this.id = "donnee_" + RandomStringUtils.randomAlphanumeric(10); date = new SimpleObjectProperty<>(); retard = new SimpleIntegerProperty(); absent = new SimpleBooleanProperty(); travailPasFait = new SimpleBooleanProperty(); devoir = new SimpleBooleanProperty(); motCarnet = new SimpleBooleanProperty(); motSigne = new SimpleBooleanProperty(); exclus = new SimpleBooleanProperty(); oubliMateriel = new SimpleStringProperty(); motif = new SimpleStringProperty(); }
From source file:de.perdian.apps.tagtiger.fx.handlers.batchupdate.UpdateFileNamesFromTagsActionEventHandler.java
@Override protected BatchUpdateDialog createDialog() { ObservableList<UpdateFileNamesFromTagsItem> items = FXCollections.observableArrayList( this.getOtherFiles().stream().map(UpdateFileNamesFromTagsItem::new).collect(Collectors.toList())); StringProperty patternFieldProperty = new SimpleStringProperty(); List<String> patternItems = Arrays.asList("${track} ${title}"); ComboBox<String> patternBox = new ComboBox<>(FXCollections.observableArrayList(patternItems)); patternBox.setEditable(true);/*from w ww . j a v a 2s . co m*/ patternBox.setMaxWidth(Double.MAX_VALUE); Bindings.bindBidirectional(patternFieldProperty, patternBox.editorProperty().get().textProperty()); HBox.setHgrow(patternBox, Priority.ALWAYS); Button executeButton = new Button(this.getLocalization().executeRename(), new ImageView(new Image(UpdateFileNamesFromTagsActionEventHandler.class.getClassLoader() .getResourceAsStream("icons/16/save.png")))); executeButton.setDisable(true); patternFieldProperty .addListener((o, oldValue, newValue) -> executeButton.setDisable(newValue.length() <= 0)); HBox patternFieldPane = new HBox(10, patternBox, executeButton); patternFieldPane.setPadding(new Insets(5, 5, 5, 5)); TitledPane patternFieldTitlePane = new TitledPane(this.getLocalization().fileNamePattern(), patternFieldPane); patternFieldTitlePane.setCollapsible(false); TableView<?> newFileNamesPane = this.createNewFileNamesPane(items); newFileNamesPane.setPrefHeight(400); VBox.setVgrow(newFileNamesPane, Priority.ALWAYS); VBox actionPane = new VBox(10, patternFieldTitlePane, newFileNamesPane); // Create the dialog and finish BatchUpdateDialog dialog = new BatchUpdateDialog(); dialog.setDialogPrefWidth(800); dialog.setDialogTitle(this.getLocalization().updateFileNames()); dialog.setActionPane(actionPane); dialog.setLegendPane(this.createLegendPane()); // Add listeners this.getOtherFiles().addListener( new WeakListChangeListener<>((Change<? extends TaggableFile> change) -> items.setAll(change .getList().stream().map(UpdateFileNamesFromTagsItem::new).collect(Collectors.toList())))); patternFieldProperty.addListener((o, oldValue, newValue) -> this.computeNewFileNames(items, newValue)); executeButton.setOnAction(event -> { this.updateNewFileNames(items); ((Stage) executeButton.getScene().getWindow()).close(); }); return dialog; }
From source file:gndata.app.ui.metadata.manage.AddRDFInstanceCtrl.java
public AddRDFInstanceCtrl(ProjectState projState, MetadataNavState navigationState, Resource extRes) { projectState = projState;/*from w ww . j ava2 s . co m*/ navState = navigationState; oh = projectState.getMetadata().ontmanager; preSelNewClass = extRes; currInsets = new SimpleObjectProperty<>(new Insets(5)); labelText = new SimpleStringProperty(); newClassesList = FXCollections.observableArrayList(); newClasses = new SimpleObjectProperty<>(); selectedNewClass = new SimpleObjectProperty<>(); newPredicatesList = FXCollections.observableArrayList(); newPredicates = new SimpleObjectProperty<>(); additionalPredicatesList = FXCollections.observableArrayList(); additionalPredicates = new SimpleObjectProperty<>(); selectedPredicate = new SimpleObjectProperty<>(); addPredValue = new SimpleStringProperty(); addPredType = new SimpleObjectProperty<>(); addPredPromptText = new SimpleStringProperty(); // Update the contents of the DataProperty table, if a new class has been selected selectedNewClass.addListener((observable, oldValue, newValue) -> { if (selectedNewClass.get().getValue() != null) { newPredicatesList.clear(); oh.listDatatypeProperties(selectedNewClass.get().getValue()).stream().forEach(c -> { //TODO take care of the case of multiple datatypes Set<RDFDatatype> dts = oh.getRange(c.asDatatypeProperty()); RDFDatatype dt = dts.iterator().next(); newPredicatesList.add(new DataPropertyTableItem(c.asProperty(), dt)); }); } }); // Listen on the selected new predicate and set the corresponding RDF DataType accordingly selectedPredicate.addListener((observable, oldValue, newValue) -> { addPredPromptText.set(""); if (observable != null && newValue != null) { //TODO take care of the case of multiple datatypes Set<RDFDatatype> dts = oh.getRange(observable.getValue()); RDFDatatype dt = dts.iterator().next(); addPredType.set(dt); addPredPromptText .set("Enter " + (dt == null ? "String" : dt.getJavaClass().getSimpleName()) + " value"); } }); // Handle list of additional DataType properties newPredicatesList.addListener((ListChangeListener<DataPropertyTableItem>) change -> { // Reset list of additional DataType properties additionalPredicatesList.clear(); // Get all available datatype properties for selected class oh.listDatatypeProperties(selectedNewClass.get().getValue()).stream() .forEach(c -> additionalPredicatesList.add(c.asDatatypeProperty())); // TODO implement check for DataType Properties which can be added // TODO multiple times // Remove all datatype properties which already exist in the table newPredicatesList.stream().forEach(c -> { if (additionalPredicatesList.contains(c.getProperty())) { additionalPredicatesList.remove(c.getProperty()); } }); }); }
From source file:benedict.zhang.addon.soundmanager.controller.SoundManagerConfigureController.java
/** * Initializes the controller class.//from ww w . j a v a 2 s .c o m */ @Override public void initialize(URL url, ResourceBundle rb) { // TODO currentMode = new SimpleStringProperty(); sound = new Sound(); oriSound = new Sound(); isUpdatingOrSaving = new SimpleBooleanProperty(false); this.setMode(null); initDataBinding(); currentMode.addListener(new ViewModeChangeListener(this)); }
From source file:com.rvantwisk.cnctools.operations.customgcode.GCodeTaskModel.java
public Object readResolve() { if (gCodeFile == null) { gCodeFile = new SimpleStringProperty(); }//from w w w . j a v a 2 s . co m if (referencedFile == null) { referencedFile = new SimpleBooleanProperty(); } return this; }
From source file:gov.va.isaac.gui.preferences.plugins.properties.PreferencesPluginTextFieldProperty.java
public PreferencesPluginTextFieldProperty(Label label, boolean emptyStringAllowed) { super(label, new TextField(), new SimpleStringProperty(), null, // validator handled below new StringConverter<String>() { @Override//from ww w . java 2 s . c om public String convertToString(String value) { return value != null ? value.toString() : null; } }, new PropertyAction<String, TextField>() { @Override public void apply(PreferencesPluginProperty<String, TextField> property) { property.getProperty().bind(property.getControl().textProperty()); } }, new PropertyAction<String, TextField>() { @Override public void apply(PreferencesPluginProperty<String, TextField> property) { property.getControl().textProperty().set(property.readFromPersistedPreferences()); } }, new PropertyAction<String, TextField>() { @Override public void apply(PreferencesPluginProperty<String, TextField> property) { GridPane.setHgrow(property.getLabel(), Priority.NEVER); GridPane.setFillWidth(property.getControl(), true); GridPane.setHgrow(property.getControl(), Priority.ALWAYS); } }); validator = new ValidBooleanBinding() { { bind(getProperty()); setComputeOnInvalidate(true); } @Override protected boolean computeValue() { if (!emptyStringAllowed && StringUtils.isBlank(getProperty().getValue())) { this.setInvalidReason("unspecified value for " + name); logger.debug(getReasonWhyInvalid().get()); TextErrorColorHelper.setTextErrorColor(label); return false; } else { TextErrorColorHelper.clearTextErrorColor(label); } this.clearInvalidReason(); return true; } }; }
From source file:mesclasses.view.RapportEleveController.java
/** * Initializes the controller class./*from www .j av a 2 s . c o m*/ */ @Override public void initialize(URL url, ResourceBundle rb) { name = "Rapport Classe Ctrl"; super.initialize(url, rb); trimestreIndex = new SimpleIntegerProperty(); selectedTrimestre = new SimpleStringProperty(); selectedFileType = new SimpleStringProperty(); selectBulletin(); selectedFileType.addListener((observable, oldValue, newValue) -> { refreshGrid(); }); trimestreLabel.textProperty().bind(selectedTrimestre); previousBtn.disableProperty() .bind(Bindings.or(Bindings.size(trimestres).lessThan(2), trimestreIndex.isEqualTo(0))); Btns.makeLeft(previousBtn); nextBtn.disableProperty().bind(Bindings.or(Bindings.size(trimestres).lessThan(2), trimestreIndex.isEqualTo(trimestres.size() - 1))); Btns.makeRight(nextBtn); bulletinBtn.prefWidthProperty().bind(bulletinPane.widthProperty()); vieScolaireBtn.prefWidthProperty().bind(vieScolairePane.widthProperty()); orientationBtn.prefWidthProperty().bind(orientationPane.widthProperty()); }
From source file:com.cooksys.postmaster.PostmasterModelSingleton.java
public void createTransientPropertyInstances() { //instantiate our model objects incomingMessagesList = FXCollections.observableArrayList(); savedResponsesList = FXCollections.observableArrayList(); incomingMethod = new SimpleStringProperty(); incomingUriPath = new SimpleStringProperty(); incomingUriParams = FXCollections.observableArrayList(); incomingHeaders = FXCollections.observableArrayList(); incomingMessageBody = new SimpleStringProperty(); messageConsole = new SimpleStringProperty(); }
From source file:com.panemu.tiwulfx.form.BaseControl.java
private StringProperty getErrorMessage() { if (errorMessage == null) { errorMessage = new SimpleStringProperty(); } return errorMessage; }