当前位置: 首页>>代码示例>>Java>>正文


Java SimpleStringProperty类代码示例

本文整理汇总了Java中javafx.beans.property.SimpleStringProperty的典型用法代码示例。如果您正苦于以下问题:Java SimpleStringProperty类的具体用法?Java SimpleStringProperty怎么用?Java SimpleStringProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SimpleStringProperty类属于javafx.beans.property包,在下文中一共展示了SimpleStringProperty类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: UpdateDialog

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public UpdateDialog(List<CurseFullProject.CurseFile> files) {
	super(files);
	TableColumn<CurseFullProject.CurseFile, String> columnName = new TableColumn<>("Files");
	columnName.setCellValueFactory(cell -> new SimpleStringProperty(cell.getValue().getFileName()));

	TableColumn<CurseFullProject.CurseFile, String> columnVersion = new TableColumn<>("Version");
	columnVersion.setCellValueFactory(cell -> new SimpleStringProperty(cell.getValue().getGameVersion().stream().collect(Collectors.joining(", "))));
	TableColumn<CurseFullProject.CurseFile, Date> columnDate = new TableColumn<>("Release Date");
	columnDate.setCellValueFactory(cell -> new SimpleObjectProperty<>(cell.getValue().getDate()));

	table.getColumns().addAll(columnName, columnVersion, columnDate);

	setTitle("File Update Dialog");
	dialogPane.setHeaderText("Please Choose a File Version");
	dialogPane.getStyleClass().add("pack-update-dialog");
	dialogPane.getButtonTypes().addAll(ButtonType.OK, ButtonType.CANCEL);
}
 
开发者ID:HearthProject,项目名称:OneClient,代码行数:19,代码来源:UpdateDialog.java

示例2: GlobalConfig

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
/**
 * Creates a default configuration. Paths are set to <tt>[Path to ... Executable]</tt>.
 */
public GlobalConfig() {
  verificationTimeout = new SimpleIntegerProperty(3600);
  simulationTimeout = new SimpleIntegerProperty(60);
  windowMaximized = new SimpleBooleanProperty(true);
  windowHeight = new SimpleIntegerProperty(600);
  windowWidth = new SimpleIntegerProperty(800);
  editorFontSize = new SimpleIntegerProperty(12);
  maxLineRollout = new SimpleIntegerProperty(50);
  editorFontFamily = new SimpleStringProperty("DejaVu Sans Mono");
  showLineNumbers = new SimpleBooleanProperty(true);
  uiLanguage = new SimpleStringProperty("EN");
  nuxmvFilename = new SimpleStringProperty(
      ExecutableLocator.findExecutableFileAsString("nuXmv")
          .orElse("[Path to nuXmv Executable]"));
  z3Path = new SimpleStringProperty(
      ExecutableLocator.findExecutableFileAsString("z3")
      .orElse("[Path to Z3 Executable]"));
  getetaCommand =
      new SimpleStringProperty("java -jar /path/to/geteta.jar -c ${code} -t ${spec} -x");
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:24,代码来源:GlobalConfig.java

示例3: Medicine

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
public Medicine(int code, String name, String salt, String company, String type, String hsn, String batch, String expiry, int quantity, float mrp, float cost, int sgst, int cgst, int igst) {
    this.code = new SimpleIntegerProperty(code);
    this.name = new SimpleStringProperty(name);
    this.salt = new SimpleStringProperty(salt);
    this.company = new SimpleStringProperty(company);
    this.type = new SimpleStringProperty(type);
    this.hsn = new SimpleStringProperty(hsn);
    this.batch = new SimpleStringProperty(batch);
    this.expiry = new SimpleStringProperty(expiry);
    this.quantity = new SimpleIntegerProperty(quantity);
    this.mrp = new SimpleFloatProperty(mrp);
    this.cost = new SimpleFloatProperty(cost);
    this.sgst = new SimpleIntegerProperty(sgst);
    this.cgst = new SimpleIntegerProperty(cgst);
    this.igst = new SimpleIntegerProperty(igst);
}
 
开发者ID:alchemsynergy,项目名称:alchem,代码行数:17,代码来源:Medicine.java

示例4: Music

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
public Music(File f)
{
    file = f;
    
    String path = StringUtil.convertToFileURL(file.toURI().getRawPath());
    String url = StringUtil.convertToFileURL(file.getAbsolutePath());
    String[] split = url.split("/");
    String uri = url.split("/")[split.length - 1];
    String[] sp = uri.split("\\.");
    format = new SimpleStringProperty(sp[sp.length - 1]);
    sp[sp.length - 1] = "";
    name = new SimpleStringProperty(String.join(".", sp));
    media = new MediaPlayer(new Media(path));
    duration = new SimpleStringProperty("");
    
    
}
 
开发者ID:Aruisehu,项目名称:SupPlayer,代码行数:18,代码来源:Music.java

示例5: JavaDialog

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
public JavaDialog() {
	super(JavaUtil.getAvailableInstalls());

	TableColumn<JavaUtil.JavaInstall, String> paths = new TableColumn<>("Paths");
	paths.setCellValueFactory(cell -> new SimpleStringProperty(cell.getValue().path));
	table.getColumns().addAll(paths);
	setTitle("Java Detection");
	dialogPane.setHeaderText("Please Choose a Java Version");
	dialogPane.getStyleClass().add("java-dialog");
	dialogPane.getButtonTypes().addAll(ButtonType.OK, ButtonType.CANCEL);
}
 
开发者ID:HearthProject,项目名称:OneClient,代码行数:12,代码来源:JavaDialog.java

示例6: Data

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
public Data(String name, String lastName, String regNr, String dateFound, String timeFound, String brand, String lugType, String arrivedFlight, String locFound, String mainCol, String size, String weight, String otherChar, String lugTag) {
    this.name = new SimpleStringProperty(name);
    this.lastName = new SimpleStringProperty(lastName);
    this.regNr = new SimpleStringProperty(regNr);
    this.dateFound = new SimpleStringProperty(dateFound);
    this.timeFound = new SimpleStringProperty(timeFound);
    this.brand = new SimpleStringProperty(brand);
    this.lugType = new SimpleStringProperty(lugType);
    this.arrivedFlight = new SimpleStringProperty(arrivedFlight);
    this.locFound = new SimpleStringProperty(locFound);
    this.mainCol = new SimpleStringProperty(mainCol);
    this.size = new SimpleStringProperty(size);
    this.weight = new SimpleStringProperty(weight);
    this.otherChar = new SimpleStringProperty(otherChar);
    this.lugTag = new SimpleStringProperty(lugTag);
}
 
开发者ID:dewarian,项目名称:FYS_T3,代码行数:17,代码来源:Data.java

示例7: addBigString

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
/**
 * Add a large String to a wizard step. A TextArea will be used to represent
 * it.
 *
 * @param fieldName
 * @param defaultValue
 *            the default String the textfield will contains.
 * @param prompt
 *            the text to show on the textfield prompt String.
 * @return
 */
@SuppressWarnings("unchecked")
public WizardStepBuilder addBigString(final String fieldName, final String defaultValue, final String prompt)
{
    final JFXTextArea text = new JFXTextArea();
    text.setPromptText(prompt);
    text.setText(defaultValue);
    this.current.getData().put(fieldName, new SimpleStringProperty());
    this.current.getData().get(fieldName).bind(text.textProperty());
    text.setMaxWidth(400);

    final Label label = new Label(fieldName);
    GridPane.setHalignment(label, HPos.RIGHT);
    GridPane.setHalignment(text, HPos.LEFT);
    this.current.add(label, 0, this.current.getData().size() - 1);
    this.current.add(text, 1, this.current.getData().size() - 1);
    return this;
}
 
开发者ID:Leviathan-Studio,项目名称:MineIDE,代码行数:29,代码来源:WizardStepBuilder.java

示例8: SpecificationRow

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
/**
 * Create a SpecificationRow from a given number of cells and an extractor. The extractor is
 * required for "deep observing", i.e. the registering of change listeners on the contents of an
 * observable collection (here, the collection of cells - to fire change events not only when
 * cells are added or removed, but also when properties in the cells change). For more information
 * on extractors, see https://docs.oracle
 * .com/javase/8/javafx/api/javafx/collections/FXCollections.html.
 *
 * @param cells The initial cells of the row
 * @param extractor The extractor to be used for deep observing on the cells
 */
public SpecificationRow(Map<String, C> cells, Callback<C, Observable[]> extractor) {
  this.cells = FXCollections.observableMap(cells);
  this.cells.addListener(this::cellsMapChanged);
  this.listeners = new ArrayList<>();
  this.comment = new SimpleStringProperty("");
  this.extractor = extractor;

  this.cells.addListener(this::listenRowInvalidation);
  comment.addListener(this::listenRowInvalidation);
  cells.values().forEach(this::subscribeToCell);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:23,代码来源:SpecificationRow.java

示例9: testBindBidirectionalWithConverter

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
@Test
public void testBindBidirectionalWithConverter() {
  // given
  Property<String> str = new SimpleStringProperty("-42");
  Property<Number> num = new SimpleDoubleProperty(1.23);

  // when
  PropertyUtils.bindBidirectionalWithConverter(str, num, Double::parseDouble, Object::toString);

  // then (initial conditions)
  assertAll(
      () -> assertEquals("1.23", str.getValue(), "String was not set correctly"),
      () -> assertEquals(1.23, num.getValue().doubleValue(), "Binding target should not have changed")
  );

  // when changing one value
  str.setValue("89");
  // then
  assertEquals(89, num.getValue().doubleValue(), "Number was not set correctly");

  // when changing the other value
  num.setValue(10.01);
  // then
  assertEquals("10.01", str.getValue(), "String was not set correctly");
}
 
开发者ID:wpilibsuite,项目名称:shuffleboard,代码行数:26,代码来源:PropertyUtilsTest.java

示例10: DesignVariable

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
public DesignVariable(DesignVariable dv) {
	this.container = new SimpleStringProperty(dv.container.get());
	this.group = new SimpleStringProperty(dv.group.get());
	this.name = new SimpleStringProperty(dv.name.get());
	this.id = new SimpleStringProperty(dv.id.get());
	this.value = new SimpleStringProperty(dv.value.get());
	this.xpath = new SimpleStringProperty(dv.xpath.get());
	this.state = new SimpleStringProperty(dv.state.get());
	this.vspValue = new SimpleStringProperty(dv.vspValue.get());
	this.checked = new SimpleBooleanProperty(dv.checked.get());
	this.fullName = dv.fullName;
}
 
开发者ID:nasa,项目名称:OpenVSP3Plugin,代码行数:13,代码来源:DesignVariable.java

示例11: initKey

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
private void initKey() {
    commandColumn.setCellValueFactory(cdf -> new SimpleStringProperty(cdf.getValue().getDescribe()));
    bindingColumn.setCellValueFactory(cdf -> CacheUtil.cache(OptionsController.this,
        cdf.getValue(), () -> new SimpleObjectProperty<>(cdf.getValue().get())));
//    bindingColumn.setCellValueFactory(cdf -> new SimpleObjectProperty<>(cdf.getValue().get()));

    bindingColumn.setEditable(true);
    bindingColumn.setCellFactory(column -> new KeyEditField());

    keyTable.getItems().setAll(Options.KEY.getChildren(KeyCombination.class));
    onSubmit.add(() -> keyTable.getItems().forEach(key -> key.set(bindingColumn.getCellData(key))));
  }
 
开发者ID:XDean,项目名称:CSS-Editor-FX,代码行数:13,代码来源:OptionsController.java

示例12: Entry

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
public Entry(String entry, String username, String password) throws Exception {
	this.entryTitle = new SimpleStringProperty(entry);
	this.entryUsername = new SimpleStringProperty(username);
	this.entryPassword = new SimpleStringProperty(password);
	this.originalPassword = Crypt.encrypt(password);
	
	LocalDateTime date = LocalDateTime.now();
	DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yy-MM-dd HH:mm");
	String formattedDate = date.format(formatter);
	
	this.entryDate = new SimpleStringProperty(formattedDate);
}
 
开发者ID:yc45,项目名称:kanphnia2,代码行数:13,代码来源:Entry.java

示例13: Code

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
/**
 * Creates a codefile which is invalidated.
 *
 * @param filename name of the codefile
 * @param sourcecode content of the codefile
 */
public Code(String filename, String sourcecode) {
  this.filename = new SimpleStringProperty(filename);
  this.sourceCodeProperty = new SimpleStringProperty(sourcecode);
  this.parsedCode = new NullableProperty<>();
  this.tokens = FXCollections.observableArrayList();
  this.syntaxErrors = FXCollections.observableArrayList();
  invalidate();
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:15,代码来源:Code.java

示例14: CourseTableDataType

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
/**
* Data type used in the TreeTableview for
*/
  public CourseTableDataType(String title, String id, int time, int stars) {
      this.title = new SimpleStringProperty(title);
      this.id = new SimpleStringProperty(id);
      this.time = new SimpleIntegerProperty(time);
      this.stars = new SimpleIntegerProperty(stars);
  }
 
开发者ID:Seil0,项目名称:cemu_UI,代码行数:10,代码来源:CourseTableDataType.java

示例15: SimpleBookmark

import javafx.beans.property.SimpleStringProperty; //导入依赖的package包/类
/**
 * Constructs a new {@link SimpleBookmark} instance.
 *
 * @param bookmark bookmark associated with this {@link SimpleBookmark}
 * @param onClick  {@link Runnable} that can be retrieved by calling {@link #getOnClick()}
 * @throws GfaParseException if unable to get the sequence of the node in the bookmark
 */
public SimpleBookmark(final Bookmark bookmark, final Runnable onClick) throws GfaParseException {
    this.bookmark = bookmark;
    this.onClick = onClick;

    nodeIdProperty = new SimpleIntegerProperty(bookmark.getNodeId());
    baseOffsetProperty = new SimpleIntegerProperty(bookmark.getBaseOffset());
    descriptionProperty = new SimpleStringProperty(bookmark.getDescription());
    radiusProperty = new SimpleIntegerProperty(bookmark.getRadius());
}
 
开发者ID:ProgrammingLife2017,项目名称:hygene,代码行数:17,代码来源:SimpleBookmark.java


注:本文中的javafx.beans.property.SimpleStringProperty类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。