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


Java JavaBeanStringPropertyBuilder类代码示例

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


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


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