本文整理汇总了Java中com.vaadin.data.util.ObjectProperty类的典型用法代码示例。如果您正苦于以下问题:Java ObjectProperty类的具体用法?Java ObjectProperty怎么用?Java ObjectProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectProperty类属于com.vaadin.data.util包,在下文中一共展示了ObjectProperty类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sourceData
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
protected void sourceData(String key, Object val) {
if (val instanceof String) {
if (viewData.getItemProperty(key) == null) {
viewData.addItemProperty(key, new ObjectProperty<String>((String) val));
} else {
viewData.getItemProperty(key).setValue(val);
}
} else {
// Creates the options container and add given options to it
final Container c = new IndexedContainer();
if (val != null) {
c.addContainerProperty("name", String.class, "");
for (final Iterator<?> i = ((List) val).iterator(); i.hasNext();) {
Item item = c.addItem(i.next());
}
}
if (viewData.getItemProperty(key) == null) {
viewData.addItemProperty(key, new ObjectProperty<Container>(c));
} else {
viewData.getItemProperty(key).setValue(c);
}
}
}
开发者ID:rah003,项目名称:neat-tweaks,代码行数:25,代码来源:ConfigStatusPresenter.java
示例2: AlfrescoProcessInstanceTableItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public AlfrescoProcessInstanceTableItem(final ProcessInstance processInstance) {
addItemProperty(PROPERTY_ID, new ObjectProperty<String>(processInstance.getId(), String.class));
if (processInstance.getBusinessKey() != null) {
addItemProperty(PROPERTY_BUSINESSKEY, new ObjectProperty<String>(processInstance.getBusinessKey(), String.class));
}
Button viewProcessInstanceButton = new Button(ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_ACTION_VIEW));
viewProcessInstanceButton.addStyleName(Reindeer.BUTTON_LINK);
viewProcessInstanceButton.addListener(new ClickListener() {
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
ExplorerApp.get().getViewManager().showProcessInstancePage(processInstance.getId());
}
});
viewProcessInstanceButton.setIcon(Images.MAGNIFIER_16);
addItemProperty(PROPERTY_ACTIONS, new ObjectProperty<Component>(viewProcessInstanceButton, Component.class));
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:20,代码来源:AlfrescoProcessInstanceTableItem.java
示例3: GroupItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public GroupItem(final Group group) {
Button idButton = new Button(group.getId());
idButton.addStyleName(Reindeer.BUTTON_LINK);
idButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
ExplorerApp.get().getViewManager().showGroupPage(group.getId());
}
});
addItemProperty("id", new ObjectProperty<Button>(idButton, Button.class));
if (group.getName() != null) {
addItemProperty("name", new ObjectProperty<String>(group.getName(), String.class));
}
if (group.getType() != null) {
addItemProperty("type", new ObjectProperty<String>(group.getType(), String.class));
}
Embedded deleteIcon = new Embedded(null, Images.DELETE);
deleteIcon.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
deleteIcon.addListener(new DeleteMembershipListener(identityService, userId, group.getId(), userDetailPanel));
addItemProperty("actions", new ObjectProperty<Embedded>(deleteIcon, Embedded.class));
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:23,代码来源:GroupsForUserQuery.java
示例4: prepareView
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
protected void prepareView(SolrManagementAppView view) {
viewData.removeItemProperty(SOLR_SERVER_STATUS);
viewData.removeItemProperty(SOLR_SERVER_NUMBER_OF_DOCUMENTS);
String solrServerUrl = solrServerConfig.getBaseURL();
String solrServerStatus = i18n.translate("solr.app.serverInformation")
+ " " + solrServerUrl + " " +
(solrServerUp ? i18n.translate("solr.app.serverInformation.running") :
i18n.translate("solr.app.serverInformation.notRunning"));
viewData.addItemProperty(SOLR_SERVER_STATUS, new ObjectProperty<>(solrServerStatus));
String solrIndexSize = i18n.translate("solr.app.serverInformation.indexSizeUnknown");
if (solrServerUp) {
solrIndexSize = Long.toString(getNumberOfDocumentsInSolrIndex());
}
viewData.addItemProperty(SOLR_SERVER_NUMBER_OF_DOCUMENTS,
new ObjectProperty<>(solrIndexSize));
view.setDataSource(viewData);
view.setListener(this);
}
开发者ID:infonl,项目名称:solr-app-magnolia-module,代码行数:21,代码来源:SolrManagementSubApp.java
示例5: getFragment
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
@Override
public Component getFragment() {
VerticalLayout vl = new VerticalLayout();
Property<Integer> numberOfClicks = new ObjectProperty<>(0);
Label clickedTimes = new Label(numberOfClicks);
vl.addComponent(new Button("Click me", new Button.ClickListener() {
/**
*
*/
private static final long serialVersionUID = 7830684640567884545L;
@Override
public void buttonClick(ClickEvent event) {
Notification.show("Thank you for clicking!");
int oldNum = numberOfClicks.getValue();
numberOfClicks.setValue(++oldNum);
}
}));
vl.addComponent(clickedTimes);
return vl;
}
开发者ID:vaadin,项目名称:osgi-bridge-and-fragmentedui-demo,代码行数:27,代码来源:FragmentFactoryImpl1.java
示例6: createSaleContent
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
/**
* Продажа процесса: наименование продажи.
* Возможно нужно сделать возможносьть создать продажу, если она еще не создана в рамкех БП.
*
* @return созданный контент
*/
private Component createSaleContent(final String processId) {
// Запрос данных
final Sale sale = querySale(processId);
if (sale != null) {
final SaleField saleField = new SaleField("Продажа");
saleField.setPropertyDataSource(new ObjectProperty(sale));
return saleField;
} else {
final Label label = new Label("Нет связанной с процессом продажи.");
label.setCaption("Продажа");
return label;
}
}
开发者ID:ExtaSoft,项目名称:extacrm,代码行数:22,代码来源:TaskEditForm.java
示例7: getProperty
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
private Property getProperty(final Object rootItemId, final Object propId) {
Property prop;
if (getTableHolder().isGeneratedColumn(propId)) {
prop = getTableHolder().getPropertyForGeneratedColumn(propId, rootItemId);
} else {
prop = getTableHolder().getContainerDataSource().getContainerProperty(rootItemId, propId);
if (useTableFormatPropertyValue) {
if (getTableHolder().isExportableFormattedProperty()) {
final String formattedProp = getTableHolder().getFormattedPropertyValue(rootItemId, propId, prop);
if (null == prop) {
prop = new ObjectProperty<String>(formattedProp, String.class);
} else {
final Object val = prop.getValue();
if (null == val) {
prop = new ObjectProperty<String>(formattedProp, String.class);
} else {
if (!val.toString().equals(formattedProp)) {
prop = new ObjectProperty<String>(formattedProp, String.class);
}
}
}
}
}
}
return prop;
}
开发者ID:ExtaSoft,项目名称:extacrm,代码行数:27,代码来源:MyExcelExport.java
示例8: Main
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public Main(ObjectProperty<Example> currentExample){
this.currentExample = currentExample;
setSizeFull();
setStyleName("main");
currentExample.addValueChangeListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent valueChangeEvent) {
Example example = (Example)valueChangeEvent.getProperty().getValue();
if(example != null){
setExample(example);
}
else {
//since example is null, just show the home screen
removeAllComponents();
addComponent(homeView);
}
}
});
}
开发者ID:nelsond6,项目名称:vaadan-playground,代码行数:22,代码来源:Main.java
示例9: TestDataItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public TestDataItem(String code, String description, Integer sequence, int obsolete) {
super();
properties.put("code", new ObjectProperty<>(code, String.class));
properties.put("description", new ObjectProperty<>(description, String.class));
properties.put("sequence", new ObjectProperty<>(sequence, Integer.class));
properties.put("obsolete", new ObjectProperty<>(obsolete, int.class));
}
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:8,代码来源:TestDataItem.java
示例10: getItemProperty
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public Property getItemProperty(Object id) {
Object obj = map.get(id);
if (obj == null) {
return null;
}
return new ObjectProperty<Object>(obj);
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:8,代码来源:MapItem.java
示例11: DeploymentListitem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public DeploymentListitem(Deployment deployment) {
addItemProperty("id", new ObjectProperty<String>(deployment.getId(), String.class));
if(deployment.getName() != null) {
addItemProperty("name", new ObjectProperty<String>(deployment.getName(), String.class));
} else {
addItemProperty("name", new ObjectProperty<String>(ExplorerApp.get().getI18nManager().getMessage(Messages.DEPLOYMENT_NO_NAME), String.class));
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:9,代码来源:DeploymentListQuery.java
示例12: GroupListItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public GroupListItem(Group group) {
addItemProperty("id", new ObjectProperty<String>(group.getId(), String.class));
if (group.getName() != null) {
addItemProperty("name", new ObjectProperty<String>(group.getName()
+ " (" + group.getName() + ")", String.class));
} else {
addItemProperty("name", new ObjectProperty<String>("(" + group.getId() + ")", String.class));
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:10,代码来源:GroupListQuery.java
示例13: GroupMemberItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public GroupMemberItem(final User user) {
// id
Button idButton = new Button(user.getId());
idButton.addStyleName(Reindeer.BUTTON_LINK);
idButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
ExplorerApp.get().getViewManager().showUserPage(user.getId());
}
});
addItemProperty("id", new ObjectProperty<Button>(idButton, Button.class));
// name
if (user.getFirstName() != null) {
addItemProperty("firstName", new ObjectProperty<String>(user.getFirstName(), String.class));
}
if (user.getLastName() != null) {
addItemProperty("lastName", new ObjectProperty<String>(user.getLastName(), String.class));
}
// email
if (user.getEmail() != null) {
addItemProperty("email", new ObjectProperty<String>(user.getEmail(), String.class));
}
// Delete
Embedded deleteIcon = new Embedded(null, Images.DELETE);
deleteIcon.addStyleName(ExplorerLayout.STYLE_CLICKABLE);
deleteIcon.addListener(new DeleteMembershipListener(identityService, user.getId(), groupId, memberShipChangeListener));
addItemProperty("actions", new ObjectProperty<Embedded>(deleteIcon, Embedded.class));
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:31,代码来源:GroupMembersQuery.java
示例14: GroupSelectionItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
public GroupSelectionItem(Group group) {
addItemProperty("id", new ObjectProperty<String>(group.getId(), String.class));
if (group.getName() != null) {
addItemProperty("name", new ObjectProperty<String>(group.getName(), String.class));
}
if (group.getType() != null) {
addItemProperty("type", new ObjectProperty<String>(group.getType(), String.class));
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:10,代码来源:GroupSelectionQuery.java
示例15: createItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
protected ProcessInstanceItem createItem(HistoricProcessInstance processInstance) {
ProcessInstanceItem item = new ProcessInstanceItem();
item.addItemProperty("id", new ObjectProperty<String>(processInstance.getId(), String.class));
ProcessDefinition processDefinition = getProcessDefinition(processInstance.getProcessDefinitionId());
String itemName = getProcessDisplayName(processDefinition) + " (" + processInstance.getId() + ")";
item.addItemProperty("name", new ObjectProperty<String>(itemName, String.class));
return item;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:11,代码来源:MyProcessInstancesListQuery.java
示例16: createItem
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
protected ProcessDefinitionListItem createItem(ProcessDefinition processDefinition) {
ProcessDefinitionListItem item = new ProcessDefinitionListItem();
item.addItemProperty("id", new ObjectProperty<String>(processDefinition.getId(), String.class));
item.addItemProperty("name", new ObjectProperty<String>(getProcessDisplayName(processDefinition), String.class));
item.addItemProperty("key", new ObjectProperty<String>(processDefinition.getKey(), String.class));
return item;
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:8,代码来源:ProcessDefinitionListQuery.java
示例17: addProperties
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
protected void addProperties(String prefix, Object bean)
{
// special case for String
if (bean instanceof String)
{
properties.put(PROP_VALUE, new ObjectProperty<Object>(bean));
}
else
{
addFieldProperties(prefix, bean);
addMethodProperties(prefix, bean);
}
}
开发者ID:sensiasoft,项目名称:sensorhub,代码行数:14,代码来源:MyBeanItem.java
示例18: testIntGt
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
@Test
public void testIntGt() {
Container.Filter expected = new Compare.Greater(INT_PROPID, 100);
Container.Filter filter = filterFactory.createFilter(int.class, INT_PROPID, ">100");
assertEquals(expected, filter);
Item target = new PropertysetItem();
target.addItemProperty(INT_PROPID, new ObjectProperty(110));
assertTrue(filter.passesFilter(0, target));
target.getItemProperty(INT_PROPID).setValue(90);
assertFalse(filter.passesFilter(0, target));
}
开发者ID:tyl,项目名称:field-binder,代码行数:15,代码来源:TestDefaultFilterFactory.java
示例19: setPropertyDataSource
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
@Override
public void setPropertyDataSource(Property newDataSource) {
Date value = (Date) newDataSource.getValue();
if (value != null) {
DateTime jodaTime = new DateTime(value);
jodaTime = jodaTime.toDateTime(DateTimeZone.forTimeZone(UserUIContext.getUserTimeZone()));
int hrs = jodaTime.getHourOfDay();
int min = jodaTime.getMinuteOfHour();
String timeFormat = "AM";
if (hrs > 12) {
hrs -= 12;
timeFormat = "PM";
}
if ((hrs > 0 || min > 0) && hideTimeOption) {
toggleHideTimeOption(false);
}
popupDateField.setPropertyDataSource(new ObjectProperty(jodaTime.toDate()));
if (!hideTimeOption) {
hourPickerComboBox.setPropertyDataSource(new ObjectProperty((hrs < 10) ? "0" + hrs : "" + hrs));
minutePickerComboBox.setPropertyDataSource(new ObjectProperty((min < 10) ? "0" + min : "" + min));
timeFormatComboBox.setPropertyDataSource(new ObjectProperty(timeFormat));
}
}
super.setPropertyDataSource(newDataSource);
}
开发者ID:MyCollab,项目名称:mycollab,代码行数:28,代码来源:DateTimeOptionField.java
示例20: createLastTaskContent
import com.vaadin.data.util.ObjectProperty; //导入依赖的package包/类
/**
* Последняя выполненная задача: название, время начала, время завершения, ответственный.
*
* @return созданный контент
*/
private Component createLastTaskContent(final String processId) {
// Запрос данных
final HistoricTaskInstance task = queryLastTask(processId);
final Panel panel = new Panel("Последняя завершенная задача");
final HorizontalLayout container = new HorizontalLayout();
container.setSpacing(true);
container.addStyleName(ExtaTheme.BORDERED_ITEMS);
if (task != null) {
// Имя задачи
final Label nameField = new Label(task.getName());
nameField.setCaption("Имя задачи");
container.addComponent(nameField);
// Старт задачи
final SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy hh:mm");
final Label startField = new Label(dateFormat.format(task.getStartTime()));
startField.setCaption("Старт задачи");
container.addComponent(startField);
// Завершение задачи
final Label endField = new Label(dateFormat.format(task.getEndTime()));
endField.setCaption("Завершение задачи");
container.addComponent(endField);
// Ответственный
final Label ownerField = new Label(new ObjectProperty(task.getAssignee()));
ownerField.setCaption("Ответственный");
ownerField.setConverter(lookup(LoginToUserNameConverter.class));
container.addComponent(ownerField);
} else {
container.addComponent(new Label("Нет последней выполненой задачи."));
}
container.setReadOnly(true);
panel.setContent(container);
return panel;
}
开发者ID:ExtaSoft,项目名称:extacrm,代码行数:42,代码来源:BPStatusForm.java
注:本文中的com.vaadin.data.util.ObjectProperty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论