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

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

本文整理了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

public MultiSelectTable<ET> withProperties(String... visibleProperties) {
  visProps = visibleProperties;
  if (isContainerInitialized()) {
    table.setVisibleColumns((Object[]) visibleProperties);
  } else {
    for (String string : visibleProperties) {
      table.addContainerProperty(string, String.class, "");
    }
  }
  return this;
}

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

public MultiSelectTable<ET> withColumnHeaders(
    String... columnNamesForVisibleProperties) {
  if (isContainerInitialized()) {
    table.setColumnHeaders(columnNamesForVisibleProperties);
  } else {
    pendingHeaders = columnNamesForVisibleProperties;
    // Add headers to temporary indexed container, in case table is initially
    // empty
    for (String prop : columnNamesForVisibleProperties) {
      table.addContainerProperty(prop, String.class, "");
    }
  }
  return this;
}

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

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

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

private Layout createPublicInstancesSection() {
  VerticalLayout layout = new VerticalLayout();
  StaticField fieldsetTitle = createStaticField(null, i18n.translate("activationMonitor.publicInstances.fieldset.label"));
  fieldsetTitle.addStyleName("fieldset-title");
  layout.addComponent(fieldsetTitle);
  if (activationStorage.getSubscriberResponseTimes().size() > 0) {
    Table table = new Table();
    table.setSelectable(false);
    table.setMultiSelect(false);
    table.setImmediate(false);
    table.setWidth("100%");
    table.setPageLength(5);
    table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.subscriber.label"), String.class, null);
    table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.max.label"), Long.class, null);
    table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.min.label"), Long.class, null);
    table.addContainerProperty(i18n.translate("activationMonitor.publicInstances.avg.label"), Long.class, null);
    int i = 0;
    for (Map.Entry<String, ResponseTimeEntry> entry : activationStorage.getSubscriberResponseTimes().entrySet()) {
      String subscriber = entry.getKey();
      long max = entry.getValue().getMax();
      long min = entry.getValue().getMin();
      long avg = entry.getValue().getAvg();
      table.addItem(new Object[]{subscriber, max, min, avg}, i++);
    }
    layout.addComponent(table);
  } else {
    layout.addComponent(createStaticField(null, i18n.translate("activationMonitor.publicInstances.noActivations.label")));
  }
  return layout;
}

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

table.setPageLength(10);
table.addContainerProperty(StringUtils.EMPTY, Label.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.errorLog.date.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.errorLog.user.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.errorLog.workspace.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.errorLog.path.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.errorLog.subscriber.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.errorLog.error.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.errorLog.cause.label"), String.class, null);

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

table.addContainerProperty(EDGE_COLUMN, String.class, null);
table.addContainerProperty(STATUS_COLUMN, Label.class, null);
table.addContainerProperty(WEIGHT_COLUMN, Integer.class, Edge.DEFAULT_WEIGHT);
table.addContainerProperty(WEIGHT_FACTOR, String.class, null);
table.addContainerProperty(Status.CRITICAL, String.class, null);
table.addContainerProperty(Status.MAJOR, String.class, null);
table.addContainerProperty(Status.MINOR, String.class, null);
table.addContainerProperty(Status.WARNING, String.class, null);
table.addContainerProperty(Status.NORMAL, String.class, null);

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

table.setPageLength(10);
table.addContainerProperty(StringUtils.EMPTY, Label.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.activationLog.date.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.activationLog.user.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.activationLog.workspace.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.activationLog.path.label"), String.class, null);
table.addContainerProperty(i18n.translate("activationMonitor.activationLog.subscriber.label"), String.class, null);

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

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

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

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

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

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

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

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

相关文章

微信公众号

最新文章

更多

Table类方法