com.vaadin.v7.ui.Table.addContainerProperty()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(386)

本文整理了Java中com.vaadin.v7.ui.Table.addContainerProperty()方法的一些代码示例,展示了Table.addContainerProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.addContainerProperty()方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:addContainerProperty

Table.addContainerProperty介绍

[英]Adds a new property to the table and show it as a visible column.
[中]向表中添加新属性并将其显示为可见列。

代码示例

代码示例来源:origin: viritin/viritin

  1. public MultiSelectTable<ET> withProperties(String... visibleProperties) {
  2. visProps = visibleProperties;
  3. if (isContainerInitialized()) {
  4. table.setVisibleColumns((Object[]) visibleProperties);
  5. } else {
  6. for (String string : visibleProperties) {
  7. table.addContainerProperty(string, String.class, "");
  8. }
  9. }
  10. return this;
  11. }

代码示例来源:origin: viritin/viritin

  1. public MultiSelectTable<ET> withColumnHeaders(
  2. String... columnNamesForVisibleProperties) {
  3. if (isContainerInitialized()) {
  4. table.setColumnHeaders(columnNamesForVisibleProperties);
  5. } else {
  6. pendingHeaders = columnNamesForVisibleProperties;
  7. // Add headers to temporary indexed container, in case table is initially
  8. // empty
  9. for (String prop : columnNamesForVisibleProperties) {
  10. table.addContainerProperty(prop, String.class, "");
  11. }
  12. }
  13. return this;
  14. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. Object defaultValue, String columnHeader, Resource columnIcon,
  2. Align columnAlignment) throws UnsupportedOperationException {
  3. if (!this.addContainerProperty(propertyId, type, defaultValue)) {
  4. return false;

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

  1. private Layout createPublicInstancesSection() {
  2. VerticalLayout layout = new VerticalLayout();
  3. StaticField fieldsetTitle = createStaticField(null, i18n.translate("activationMonitor.publicInstances.fieldset.label"));
  4. fieldsetTitle.addStyleName("fieldset-title");
  5. layout.addComponent(fieldsetTitle);
  6. if (activationStorage.getSubscriberResponseTimes().size() > 0) {
  7. Table table = new Table();
  8. table.setSelectable(false);
  9. table.setMultiSelect(false);
  10. table.setImmediate(false);
  11. table.setWidth("100%");
  12. table.setPageLength(5);
  13. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.subscriber.label"), String.class, null);
  14. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.max.label"), Long.class, null);
  15. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.min.label"), Long.class, null);
  16. table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.avg.label"), Long.class, null);
  17. int i = 0;
  18. for (Map.Entry<String, ResponseTimeEntry> entry : activationStorage.getSubscriberResponseTimes().entrySet()) {
  19. String subscriber = entry.getKey();
  20. long max = entry.getValue().getMax();
  21. long min = entry.getValue().getMin();
  22. long avg = entry.getValue().getAvg();
  23. table.addItem(new Object[]{subscriber, max, min, avg}, i++);
  24. }
  25. layout.addComponent(table);
  26. } else {
  27. layout.addComponent(createStaticField(null, i18n.translate("activationMonitor.publicInstances.noActivations.label")));
  28. }
  29. return layout;
  30. }

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

  1. table.setPageLength(10);
  2. table.addContainerProperty(StringUtils.EMPTY, Label.class, null);
  3. table.addContainerProperty(i18n.translate("activationMonitor.errorLog.date.label"), String.class, null);
  4. table.addContainerProperty(i18n.translate("activationMonitor.errorLog.user.label"), String.class, null);
  5. table.addContainerProperty(i18n.translate("activationMonitor.errorLog.workspace.label"), String.class, null);
  6. table.addContainerProperty(i18n.translate("activationMonitor.errorLog.path.label"), String.class, null);
  7. table.addContainerProperty(i18n.translate("activationMonitor.errorLog.subscriber.label"), String.class, null);
  8. table.addContainerProperty(i18n.translate("activationMonitor.errorLog.error.label"), String.class, null);
  9. table.addContainerProperty(i18n.translate("activationMonitor.errorLog.cause.label"), String.class, null);

代码示例来源:origin: OpenNMS/opennms

  1. table.addContainerProperty(EDGE_COLUMN, String.class, null);
  2. table.addContainerProperty(STATUS_COLUMN, Label.class, null);
  3. table.addContainerProperty(WEIGHT_COLUMN, Integer.class, Edge.DEFAULT_WEIGHT);
  4. table.addContainerProperty(WEIGHT_FACTOR, String.class, null);
  5. table.addContainerProperty(Status.CRITICAL, String.class, null);
  6. table.addContainerProperty(Status.MAJOR, String.class, null);
  7. table.addContainerProperty(Status.MINOR, String.class, null);
  8. table.addContainerProperty(Status.WARNING, String.class, null);
  9. table.addContainerProperty(Status.NORMAL, String.class, null);

代码示例来源:origin: info.magnolia.activation/magnolia-module-activation

  1. table.setPageLength(10);
  2. table.addContainerProperty(StringUtils.EMPTY, Label.class, null);
  3. table.addContainerProperty(i18n.translate("activationMonitor.activationLog.date.label"), String.class, null);
  4. table.addContainerProperty(i18n.translate("activationMonitor.activationLog.user.label"), String.class, null);
  5. table.addContainerProperty(i18n.translate("activationMonitor.activationLog.workspace.label"), String.class, null);
  6. table.addContainerProperty(i18n.translate("activationMonitor.activationLog.path.label"), String.class, null);
  7. table.addContainerProperty(i18n.translate("activationMonitor.activationLog.subscriber.label"), String.class, null);

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. pIds.add(id);
  2. addContainerProperty(id, String.class, null);

代码示例来源:origin: OpenNMS/opennms

  1. table.setImmediate(true);
  2. table.addContainerProperty("Key", String.class, "");
  3. table.addContainerProperty("Value", String.class, "");

代码示例来源:origin: com.haulmont.cuba/cuba-web

  1. component.addContainerProperty(columnId, column.getType(), null);

代码示例来源:origin: OpenNMS/opennms

  1. categoriesTable.setCaption("Categories");
  2. categoriesTable.setSortEnabled(true);
  3. categoriesTable.addContainerProperty("name", String.class, "");
  4. categoriesTable.setColumnHeader("name", "Category");
  5. categoriesTable.setColumnExpandRatio("Category", 1.0f);

相关文章

Table类方法