List of usage examples for javafx.beans.property SimpleStringProperty SimpleStringProperty
public SimpleStringProperty()
From source file:Main.java
public static void main(String[] args) { User contact = new User("Jame", "Bind"); StringProperty fname = new SimpleStringProperty(); fname.bindBidirectional(contact.firstNameProperty()); contact.firstNameProperty().set("new value"); fname.set("New First Name"); System.out.println("firstNameProperty = " + contact.firstNameProperty().get()); System.out.println("fname = " + fname.get()); }
From source file:Main.java
public static void main(String[] args) { Student contact = new Student("FirstName", "LastName"); StringProperty fname = new SimpleStringProperty(); fname.bindBidirectional(contact.firstNameProperty()); StringProperty lname = new SimpleStringProperty(); lname.bindBidirectional(contact.lastNameProperty()); System.out.println(fname.getValue() + " " + lname.getValue()); System.out.println(contact.getFirstName() + " " + contact.getLastName()); fname.setValue("new FirstName"); lname.setValue("new LastName"); System.out.println(fname.getValue() + " " + lname.getValue()); System.out.println(contact.getFirstName() + " " + contact.getLastName()); }
From source file:Main.java
@Override public void start(Stage primaryStage) { primaryStage.setTitle("Keyboard"); Group root = new Group(); Scene scene = new Scene(root, 530, 300, Color.WHITE); final StringProperty statusProperty = new SimpleStringProperty(); InnerShadow iShadow = InnerShadowBuilder.create().offsetX(3.5f).offsetY(3.5f).build(); final Text status = TextBuilder.create().effect(iShadow).x(100).y(50).fill(Color.LIME) .font(Font.font(null, FontWeight.BOLD, 35)).translateY(50).build(); status.textProperty().bind(statusProperty); statusProperty.set("Line\nLine2\nLine"); root.getChildren().add(status);/*from w ww .j a v a2 s . c om*/ primaryStage.setScene(scene); primaryStage.show(); }
From source file:Person.java
public StringProperty aliasNameProperty() { if (aliasName == null) { aliasName = new SimpleStringProperty(); } return aliasName; }
From source file:employees.Employees.java
@Override public void start(Stage stage) throws Exception { // Parent root = FXMLLoader.load(getClass().getResource("MainUI.fxml")); // /* w w w . j a v a2s .c o m*/ // Scene scene = new Scene(root); // // stage.setScene(scene); // stage.show(); //new LoginStage(); Task<String> inittask = inittasks.pingServer(); StringProperty pingResponse = new SimpleStringProperty(); StringProperty messages = new SimpleStringProperty(); pingResponse.bind(inittask.valueProperty()); messages.bind(inittask.messageProperty()); inittask.stateProperty().addListener((workerState, oldState, newState) -> { if (newState == Worker.State.SUCCEEDED) { String response = pingResponse.get(); JSONObject obj = new JSONObject(response); String Status = obj.getString("Status"); if (Status.equals("OK")) { AlertDialog ad = new AlertDialog(); ad.showDialog(AlertTypes.Types.INFORMATION, "Successfull", "PING OK", "Connection Successfull"); } } else if (newState == Worker.State.CANCELLED) { AlertDialog ad = new AlertDialog(); ad.showDialog(AlertTypes.Types.WARNING, "Operation Aborted", "Operation Aborted", "Task Was Cancelled,The System Will Now Exit"); System.exit(0); } else if (newState == Worker.State.FAILED) { StringBuilder errstr = new StringBuilder(); errstr.append( "An Error Has Occured While Connecting to The Server, A Description of the Error is Shown Below : \n"); errstr.append(messages.toString()); AlertDialog ad = new AlertDialog(); ad.showDialog(AlertTypes.Types.ERROR, "An Error Occurred While Connecting to The Server", "Error", messages.get()); Optional<ButtonType> response = AlertDialog.showConfirmation( "Unable to Connect to The Server: Would you Like To Review Your Network Settings?", "Connection Settings Review", "Review Connection Settings?"); if (response.get() == ButtonType.OK) { try { new initSettingsStage(); } catch (IOException ex) { Logger.getLogger(Employees.class.getName()).log(Level.SEVERE, null, ex); } } } }); new Thread(inittask).start(); }
From source file:mesclasses.model.Punition.java
public Punition() { super();/*from w w w. ja va2 s . c o m*/ this.id = RandomStringUtils.randomAlphanumeric(5); this.texte = new SimpleStringProperty(); this.closed = new SimpleBooleanProperty(false); }
From source file:Person.java
public StringProperty firstNameProperty() { if (firstName == null) { firstName = new SimpleStringProperty(); } return firstName; }
From source file:org.ramidore.bean.GvStatTable.java
public GvStatTable() { guildName = new SimpleIntegerProperty(); charaName = new SimpleStringProperty(); killCount = new SimpleIntegerProperty(0); deathCount = new SimpleIntegerProperty(0); point = new SimpleIntegerProperty(0); note = new SimpleStringProperty(StringUtils.EMPTY); }
From source file:Person.java
public StringProperty lastNameProperty() { if (lastName == null) { lastName = new SimpleStringProperty(); } return lastName; }
From source file:mesclasses.model.Cours.java
public Cours() { this.id = RandomStringUtils.randomAlphanumeric(5); day = new SimpleStringProperty(); classe = new SimpleObjectProperty<>(); room = new SimpleStringProperty(""); week = new SimpleStringProperty(); startHour = new SimpleIntegerProperty(8); startMin = new SimpleIntegerProperty(0); endHour = new SimpleIntegerProperty(9); endMin = new SimpleIntegerProperty(0); ponctuel = new SimpleBooleanProperty(false); }