• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JavaBeanStringPropertyBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ServerPane

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public ServerPane(final ServerData serverData) {
	this.serverData = assertNotNull(serverData, "serverData");
	this.server = assertNotNull(serverData.getServer(), "serverData.server");
	loadDynamicComponentFxml(ServerPane.class, this);

	try {
		url = JavaBeanObjectPropertyBuilder.create().bean(server).name(Server.PropertyEnum.url.name()).build();
		name = JavaBeanStringPropertyBuilder.create().bean(server).name(Server.PropertyEnum.name.name()).build();
	} catch (NoSuchMethodException e) {
		throw new RuntimeException(e);
	}
	urlTextField.textProperty().bindBidirectional(url, new UrlStringConverter());
	nameTextField.textProperty().bindBidirectional(name);

	acceptInvitationCheckBox.selectedProperty().bindBidirectional(serverData.acceptInvitationProperty());
	nameLabel.disableProperty().bind(acceptInvitationCheckBox.selectedProperty());
	nameTextField.disableProperty().bind(acceptInvitationCheckBox.selectedProperty());
	urlLabel.disableProperty().bind(acceptInvitationCheckBox.selectedProperty());
	urlTextField.disableProperty().bind(acceptInvitationCheckBox.selectedProperty());

	addWeakPropertyChangeListener(server, Server.PropertyEnum.url, updateCompletePropertyChangeListener);
	serverData.acceptInvitationProperty().addListener(new WeakInvalidationListener(updateCompleteInvalidationListener));
	updateComplete();
}
 
开发者ID:subshare,项目名称:subshare,代码行数:26,代码来源:ServerPane.java


示例2: ServerListItem

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public ServerListItem(final Server server) {
	this.server = assertNotNull(server, "server");
	try {
		name = JavaBeanStringPropertyBuilder.create()
				.bean(server)
				.name(Server.PropertyEnum.name.name()).build();

		url = JavaBeanObjectPropertyBuilder.create()
				.bean(server)
				.name(Server.PropertyEnum.url.name()).build();
	} catch (NoSuchMethodException e) {
		throw new RuntimeException(e);
	}
	updateSeverity();
}
 
开发者ID:subshare,项目名称:subshare,代码行数:17,代码来源:ServerListItem.java


示例3: bind

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void bind() {
	try {
		name = JavaBeanStringPropertyBuilder.create()
				.bean(localRepo)
				.name(LocalRepo.PropertyEnum.name.name()).build();

		localRoot = JavaBeanObjectPropertyBuilder.create()
				.bean(localRepo)
				.name(LocalRepo.PropertyEnum.localRoot.name()).build();
	} catch (NoSuchMethodException e) {
		throw new RuntimeException(e);
	}
	name.addListener((InvalidationListener) observable -> updateNameShown());
	localRootAsString.bind(localRoot.asString());
}
 
开发者ID:subshare,项目名称:subshare,代码行数:17,代码来源:LocalRepoListItem.java


示例4: stringProperty

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
/**
 * @param bean
 * @param propertyName
 * @return {@link JavaBeanStringProperty}
 */
protected static JavaBeanStringProperty stringProperty(Object bean, String propertyName) {
	Object key = key(bean, propertyName);
	if (STRING_PROPERTIES.containsKey(key)) {
		return STRING_PROPERTIES.get(key);
	}
	try {
		JavaBeanStringProperty property = JavaBeanStringPropertyBuilder.create().bean(bean).name(propertyName).build();
		STRING_PROPERTIES.put(key, property);
		return property;
	} catch (NoSuchMethodException e) {
		throw new IllegalStateException(e);
	}
}
 
开发者ID:chilloutman,项目名称:photo-flow,代码行数:19,代码来源:PhotoFlowController.java


示例5: bind

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void bind() {
	try {
		// nameProperty must be kept as field to prevent garbage-collection!
		nameProperty = JavaBeanStringPropertyBuilder.create()
			    .bean(localRepo)
			    .name(LocalRepo.PropertyEnum.name.name())
			    .build();
		nameTextField.textProperty().bindBidirectional(nameProperty);

		localRootProperty = JavaBeanObjectPropertyBuilder.create()
				.bean(localRepo)
				.name(LocalRepo.PropertyEnum.localRoot.name())
				.build();

		Bindings.bindBidirectional(localRootTextField.textProperty(), localRootProperty, new FileStringConverter());

	} catch (NoSuchMethodException e) {
		throw new RuntimeException(e);
	}

	syncPeriodCheckBox.selectedProperty().addListener((InvalidationListener) observable -> updateSyncPeriodInConfig());
	syncPeriodTimePeriodTextField.timePeriodProperty().addListener((InvalidationListener) observable -> updateSyncPeriodInConfig());

	addWeakPropertyChangeListener(repoSyncDaemon, RepoSyncDaemon.PropertyEnum.activities, activityPropertyChangeListener);
	addWeakPropertyChangeListener(repoSyncDaemon, RepoSyncDaemon.PropertyEnum.states, statePropertyChangeListener);
	addWeakPropertyChangeListener(repoSyncTimer, RepoSyncTimer.PropertyEnum.nextSyncTimestamps, nextSyncPropertyChangeListener);
}
 
开发者ID:subshare,项目名称:subshare,代码行数:29,代码来源:LocalRepoPane.java


示例6: UserPane

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public UserPane(final EditUserManager editUserManager, final User user) {
	this.editUserManager = assertNotNull(editUserManager, "editUserManager");
	this.user = assertNotNull(user, "user");
	loadDynamicComponentFxml(UserPane.class, this);

	try {
		firstNameProperty = JavaBeanStringPropertyBuilder.create()
			    .bean(user)
			    .name(User.PropertyEnum.firstName.name())
			    .build();
		firstNameTextField.textProperty().bindBidirectional(firstNameProperty);

		lastNameProperty = JavaBeanStringPropertyBuilder.create()
			    .bean(user)
			    .name(User.PropertyEnum.lastName.name())
			    .build();
		lastNameTextField.textProperty().bindBidirectional(lastNameProperty);

		addWeakPropertyChangeListener(this.user, User.PropertyEnum.emails, userEmailsPropertyChangeListener);
	} catch (NoSuchMethodException e) {
		throw new RuntimeException(e);
	}

	emailWrappers = FXCollections.observableList(createEmailWrapperList());
	emailWrappers.addListener((ListChangeListener<EmailWrapper>) c -> updateEmails());

	emailsTableView.setItems(emailWrappers);
	emailTableColumn.setCellFactory(cast(TextFieldTableCell.forTableColumn()));

	emailTableColumn.prefWidthProperty().bind(emailsTableView.widthProperty().subtract(10)); // TODO we should find out the scroll-bar-width and subtract this!

	final UserRootPgpKeyTreeItem root = new UserRootPgpKeyTreeItem(pgpKeyTreePane, user);
	pgpKeyTreePane.getTreeTableView().setRoot(root);
	pgpKeyTreePane.getTreeTableView().getSelectionModel().getSelectedItems().addListener((InvalidationListener) observable -> updateDisable());
	updateDisable();
}
 
开发者ID:subshare,项目名称:subshare,代码行数:37,代码来源:UserPane.java


示例7: ServerRepoListItem

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public ServerRepoListItem(final ServerRepo serverRepo) {
	this.serverRepo = assertNotNull(serverRepo, "serverRepo");
	try {
		nameProperty = JavaBeanStringPropertyBuilder.create()
				.bean(serverRepo)
				.name(ServerRepo.PropertyEnum.name.name())
				.build();
	} catch (final NoSuchMethodException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:subshare,项目名称:subshare,代码行数:12,代码来源:ServerRepoListItem.java


示例8: ServerListItem

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public ServerListItem(final Server server) {
	this.server = assertNotNull(server, "server");
	try {
		name = JavaBeanStringPropertyBuilder.create()
				.bean(server)
				.name(Server.PropertyEnum.name.name()).build();

		url = JavaBeanObjectPropertyBuilder.create()
				.bean(server)
				.name(Server.PropertyEnum.url.name()).build();
	} catch (NoSuchMethodException e) {
		throw new RuntimeException(e);
	}
}
 
开发者ID:subshare,项目名称:subshare,代码行数:15,代码来源:ServerListItem.java


示例9: nameProperty

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public synchronized StringProperty nameProperty() {
	if (nameProperty == null) {
		try {
			nameProperty = JavaBeanStringPropertyBuilder.create().bean(this).name(PropertyEnum.name.name()).build();
		} catch (NoSuchMethodException e) {
			throw new RuntimeException(e);
		}
	}
	return nameProperty;
}
 
开发者ID:subshare,项目名称:subshare,代码行数:11,代码来源:FxPgpUserId.java


示例10: emailProperty

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public synchronized StringProperty emailProperty() {
	if (emailProperty == null) {
		try {
			emailProperty = JavaBeanStringPropertyBuilder.create().bean(this).name(PropertyEnum.email.name()).build();
		} catch (NoSuchMethodException e) {
			throw new RuntimeException(e);
		}
	}
	return emailProperty;
}
 
开发者ID:subshare,项目名称:subshare,代码行数:11,代码来源:FxPgpUserId.java


示例11: ServerRepoPane

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public ServerRepoPane(final Server server, final ServerRepo serverRepo) {
	this.server = assertNotNull(server, "server");
	this.serverRepo = assertNotNull(serverRepo, "serverRepo");
	loadDynamicComponentFxml(ServerRepoPane.class, this);

	try {
		nameProperty = new JavaBeanStringPropertyBuilder().bean(serverRepo).name(ServerRepo.PropertyEnum.name.name()).build();
	} catch (NoSuchMethodException e) {
		throw new RuntimeException(e);
	}

	nameTextField.textProperty().bindBidirectional(nameProperty);
}
 
开发者ID:subshare,项目名称:subshare,代码行数:14,代码来源:ServerRepoPane.java


示例12: ItemCompraEntityWrapper

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public ItemCompraEntityWrapper(ItemCompra itemCompra) {
    _itemCompra = itemCompra;

    try {
        JavaBeanStringPropertyBuilder builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemCompra);
        builder.name("codigo");
        codigo = builder.build();

        builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemCompra);
        builder.name("nombre");
        nombre = builder.build();

        JavaBeanObjectPropertyBuilder<BigDecimal> builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemCompra);
        builder1.name("cantidad");
        cantidad = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemCompra);
        builder1.name("costoUnitario");
        costoUnitario = builder1.build();

        importe = new SimpleObjectProperty<BigDecimal>();
        importe.set( new BigDecimal(0) );

        JavaBeanObjectPropertyBuilder<Articulo> builder2 = JavaBeanObjectPropertyBuilder.create();
        builder2.bean(itemCompra);
        builder2.name("articulo");
        articulo = builder2.build();

    } catch (NoSuchMethodException e) {
        logger.error("Invalid method to wrap", e);
    }
}
 
开发者ID:ZooMMX,项目名称:Omoikane,代码行数:37,代码来源:ItemCompraEntityWrapper.java


示例13: stringProp

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public static JavaBeanStringProperty stringProp(Object t, String fieldName) throws NoSuchMethodException {
    return new JavaBeanStringPropertyBuilder().bean(t).name(fieldName).build();
}
 
开发者ID:badvision,项目名称:lawless-legends,代码行数:4,代码来源:PropertyHelper.java


示例14: ItemTraspasoPropWrapper

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public ItemTraspasoPropWrapper(ItemTraspasoSaliente itemConteo) {
    _itemConteo = itemConteo;

    try {
        JavaBeanStringPropertyBuilder builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemConteo);
        builder.name("codigo");
        codigo = builder.build();

        builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemConteo);
        builder.name("nombre");
        nombre = builder.build();

        JavaBeanObjectPropertyBuilder<BigDecimal> builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("cantidad");
        cantidad = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("stockDB");
        stockDB = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("costoUnitario");
        costoUnitario = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("precioPublico");
        precioPublico = builder1.build();

        JavaBeanObjectPropertyBuilder<Articulo> builder2 = JavaBeanObjectPropertyBuilder.create();
        builder2.bean(itemConteo);
        builder2.name("articulo");
        articulo = builder2.build();
    } catch (NoSuchMethodException e) {
        logger.error("Invalid method to wrap", e);
    }
}
 
开发者ID:ZooMMX,项目名称:Omoikane,代码行数:43,代码来源:ItemTraspasoPropWrapper.java


示例15: ItemConteoPropWrapper

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public ItemConteoPropWrapper(ItemConteoInventario itemConteo) {
    _itemConteo = itemConteo;

    try {
        JavaBeanStringPropertyBuilder builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemConteo);
        builder.name("codigo");
        codigo = builder.build();

        builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemConteo);
        builder.name("nombre");
        nombre = builder.build();

        JavaBeanObjectPropertyBuilder<BigDecimal> builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("conteo");
        conteo = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("stockDB");
        stockDB = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("costoUnitario");
        costoUnitario = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("diferencia");
        diferencia = builder1.build();

        JavaBeanObjectPropertyBuilder<Articulo> builder2 = JavaBeanObjectPropertyBuilder.create();
        builder2.bean(itemConteo);
        builder2.name("articulo");
        articulo = builder2.build();
    } catch (NoSuchMethodException e) {
        logger.error("Invalid method to wrap", e);
    }
}
 
开发者ID:ZooMMX,项目名称:Omoikane,代码行数:43,代码来源:ItemConteoPropWrapper.java


示例16: ItemTraspasoPropWrapper

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
public ItemTraspasoPropWrapper(ItemTraspasoEntrante itemConteo) {
    _itemConteo = itemConteo;

    try {
        JavaBeanStringPropertyBuilder builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemConteo);
        builder.name("codigo");
        codigo = builder.build();

        builder = JavaBeanStringPropertyBuilder.create();
        builder.bean(itemConteo);
        builder.name("nombre");
        nombre = builder.build();

        JavaBeanObjectPropertyBuilder<BigDecimal> builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("cantidad");
        cantidad = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("stockDB");
        stockDB = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("costoUnitario");
        costoUnitario = builder1.build();

        builder1 = JavaBeanObjectPropertyBuilder.create();
        builder1.bean(itemConteo);
        builder1.name("precioPublico");
        precioPublico = builder1.build();

        JavaBeanObjectPropertyBuilder<Articulo> builder2 = JavaBeanObjectPropertyBuilder.create();
        builder2.bean(itemConteo);
        builder2.name("articulo");
        articulo = builder2.build();
    } catch (NoSuchMethodException e) {
        logger.error("Invalid method to wrap", e);
    }
}
 
开发者ID:ZooMMX,项目名称:Omoikane,代码行数:43,代码来源:ItemTraspasoPropWrapper.java


示例17: bindString

import javafx.beans.property.adapter.JavaBeanStringPropertyBuilder; //导入依赖的package包/类
/**
 * Binds a Java/Bean String property to a JavaFX property. Note: The JavaFX
 * property observes changes and marks the Cayenne project dirty when a
 * change occurs.
 *
 * @param property
 *            The Java/Bean property to bind to.
 * @return A new JavaFX property bound to the Java/Bean property.
 * @throws NoSuchMethodException
 *             If the specified Java/Bean property does not exist (check the
 *             property's spelling).
 */
public StringProperty bindString(String property) throws NoSuchMethodException
{
    return observePropertyChanges(JavaBeanStringPropertyBuilder.create().bean(getWrappedObject()).name(property).build());
}
 
开发者ID:apache,项目名称:cayenne-modeler,代码行数:17,代码来源:CayennePropertyAdapter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GetJournalCTimeResponseProto类代码示例发布时间:2022-05-22
下一篇:
Java ConcurrentFactoryMap类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap