List of usage examples for javafx.beans.property SimpleStringProperty SimpleStringProperty
public SimpleStringProperty(String initialValue)
From source file:Main.java
public static void main(String[] args) { StringProperty password = new SimpleStringProperty("java2s.com"); password.set("example.com"); System.out.println("Modified StringProperty " + password.get()); }
From source file:Main.java
License:asdf
public static void main(String[] args) { StringProperty prop1 = new SimpleStringProperty(""); StringProperty prop2 = new SimpleStringProperty(""); prop2.bindBidirectional(prop1);/*from w w w. j av a 2 s . com*/ System.out.println("prop1.isBound() = " + prop1.isBound()); System.out.println("prop2.isBound() = " + prop2.isBound()); prop1.set("asdf"); System.out.println(prop2.get()); prop2.set(prop2.get()); System.out.println(prop1.get()); }
From source file:com.force.deploy.tools.utils.LogItem.java
public LogItem(String id, String status, String location, String operation, String request, String duration, String logSize) {//from www.ja v a 2s .c om this.id = new SimpleStringProperty(id); this.status = new SimpleStringProperty(status); this.location = new SimpleStringProperty(location); this.operation = new SimpleStringProperty(operation); this.request = new SimpleStringProperty(request); this.duration = new SimpleStringProperty(duration); this.logSize = new SimpleStringProperty(logSize); }
From source file:Main.java
@Override public void start(Stage stage) { final Stage stageRef = stage; Group rootGroup;//ww w . ja v a 2 s.c o m Scene scene = SceneBuilder.create().width(270).height(370) .root(rootGroup = GroupBuilder.create() .children(VBoxBuilder.create().layoutX(30).layoutY(20).spacing(10) .children(textStageX = TextBuilder.create().textOrigin(VPos.TOP).build(), textStageY = TextBuilder.create().textOrigin(VPos.TOP).build(), textStageW = TextBuilder.create().textOrigin(VPos.TOP).build(), textStageH = TextBuilder.create().textOrigin(VPos.TOP).build(), textStageF = TextBuilder.create().textOrigin(VPos.TOP).build()) .build()) .build()) .build(); textStageX.textProperty().bind(new SimpleStringProperty("x: ").concat(stageRef.xProperty().asString())); textStageY.textProperty().bind(new SimpleStringProperty("y: ").concat(stageRef.yProperty().asString())); textStageW.textProperty() .bind(new SimpleStringProperty("width: ").concat(stageRef.widthProperty().asString())); textStageH.textProperty() .bind(new SimpleStringProperty("height: ").concat(stageRef.heightProperty().asString())); textStageF.textProperty() .bind(new SimpleStringProperty("focused: ").concat(stageRef.focusedProperty().asString())); stage.setResizable(true); stage.setScene(scene); stage.titleProperty().bind(title); stage.show(); }
From source file:benedict.zhang.addon.roleplaying.model.RolePlayingConfiguration.java
public RolePlayingConfiguration() { this.addonName = new SimpleStringProperty(""); this.spellCastInQueueMax = new SimpleStringProperty(""); this.spellLockGlobal = new SimpleStringProperty(""); this.spellList = FXCollections.observableArrayList(); this.spells = new ArrayList<>(); this.dateGeneration = new SimpleStringProperty(""); this.addonDigest = new SimpleStringProperty(""); this.generateDate = new Date(); spellList.addListener((ListChangeListener.Change<? extends SpellConfiguration> c) -> { c.next();/*from w w w. j a v a 2 s .c om*/ StringBuilder sb = new StringBuilder(); if (spellList.size() > 0) { sb.append(this.getAddonName()).append(" : "); sb.append("[").append(this.spellList.get(0).getSpellName()); for (int i = 1; i < spellList.size(); i++) { sb.append(",").append(spellList.get(i).getSpellName()); } ; sb.append("]"); } this.setAddonDigest(sb.toString()); sb.delete(0, sb.length()); this.spells.clear(); for (SpellConfiguration spell : this.spellList) { this.spells.add(spell); } }); }
From source file:sonicScream.models.ScriptTest.java
@BeforeClass public static void setUpClass() throws URISyntaxException, IOException { allTestScriptFiles.addAll(FilesEx.listFiles(Paths.get(FOLDER_LOCATION.toURI()))); Category mockCategory = mock(Category.class); when(mockCategory.categoryNameProperty()).thenReturn(new SimpleStringProperty("Test Category")); for (Path p : allTestScriptFiles) { Script script = new Script(p, mockCategory); allTestScripts.add(script);/*from ww w. ja va2s. c o m*/ } }
From source file:benedict.zhang.addon.roleplaying.model.SpellConfiguration.java
public SpellConfiguration() { this.spellName = new SimpleStringProperty(""); this.spellCastAvailable = new SimpleBooleanProperty(false); this.spellCooldownAvailable = new SimpleBooleanProperty(false); this.unitAuraAvailable = new SimpleBooleanProperty(false); this.spellCastLockTimeGlobal = new SimpleStringProperty("3"); this.spellCastLockTimeSelf = new SimpleStringProperty("3"); this.spellCastSoundName = new SimpleStringProperty("Not Selected"); this.spellCooldownLockTimeGlobal = new SimpleStringProperty("3"); this.spellCooldownLockTimeSelf = new SimpleStringProperty("3"); this.spellCooldownReminderBefore = new SimpleStringProperty("5"); this.spellCooldownSoundName = new SimpleStringProperty("Not Selected"); this.unitAuraLockTimeGlobal = new SimpleStringProperty("3"); this.unitAuraLockTimeSelf = new SimpleStringProperty("3"); this.unitAuraSoundName = new SimpleStringProperty("Not Selected"); }
From source file:pl.betoncraft.betonquest.editor.model.PackageSet.java
private PackageSet(String setName) { name = new SimpleStringProperty(setName); }
From source file:context.ui.misc.FileHandler.java
/** * * @param message//from w ww . j a v a 2s. com * @return */ public static FileList openDirectoryChooser(String message) { DirectoryChooser dirChooser = new DirectoryChooser(); dirChooser.setTitle(message); dirChooser.setInitialDirectory(new File(getLastDirectoryLocation())); final File selectedDirectory = dirChooser.showDialog(ContextFXController.getStage()); if (selectedDirectory != null) { selectedDirectory.getAbsolutePath(); // File[] files = selectedDirectory.listFiles(); FileList dir = new FileList(new SimpleStringProperty(selectedDirectory.getName()), selectedDirectory); setLastDirectoryLocation(selectedDirectory.getAbsolutePath()); return dir; } else { System.out.println("Selected Directory is Null"); return null; } }
From source file:Main.java
public Employee(String name, String department) { this.name = new SimpleStringProperty(name); this.department = new SimpleStringProperty(department); }