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; }
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; }
Object defaultValue, String columnHeader, Resource columnIcon, Align columnAlignment) throws UnsupportedOperationException { if (!this.addContainerProperty(propertyId, type, defaultValue)) { return false;
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; }
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);
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);
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);
pIds.add(id); addContainerProperty(id, String.class, null);
table.setImmediate(true); table.addContainerProperty("Key", String.class, ""); table.addContainerProperty("Value", String.class, "");
component.addContainerProperty(columnId, column.getType(), null);
categoriesTable.setCaption("Categories"); categoriesTable.setSortEnabled(true); categoriesTable.addContainerProperty("name", String.class, ""); categoriesTable.setColumnHeader("name", "Category"); categoriesTable.setColumnExpandRatio("Category", 1.0f);