@Override public void setShowSelection(boolean showSelection) { component.setSelectable(showSelection); }
protected AbstractSelect createCompatibleSelect( Class<? extends AbstractSelect> fieldType) { AbstractSelect select; if (fieldType.isAssignableFrom(ListSelect.class)) { select = new ListSelect(); select.setMultiSelect(false); } else if (fieldType.isAssignableFrom(NativeSelect.class)) { select = new NativeSelect(); } else if (fieldType.isAssignableFrom(OptionGroup.class)) { select = new OptionGroup(); select.setMultiSelect(false); } else if (fieldType.isAssignableFrom(Table.class)) { Table t = new Table(); t.setSelectable(true); select = t; } else { select = new ComboBox(null); } select.setImmediate(true); select.setNullSelectionAllowed(false); return select; }
@Override protected Table createTable(Container container) { Table table = new Table(null, container); table.setSelectable(true); table.setMultiSelect(true); // use B as default selected value here table.setValue(Lists.newArrayList(B)); return table; } };
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; }
/** * Instantiates a new MIB object field. * * @param resourceTypes the available resource types * @param mibGroupEditable true, if the MIB group can be modified */ public MibObjField(final List<String> resourceTypes, boolean mibGroupEditable) { table.addStyleName("light"); table.setVisibleColumns(new Object[] { "oid", "instance", "alias", "type" }); table.setColumnHeaders(new String[] { "OID", "Instance", "Alias", "Type" }); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setHeight("250px"); table.setWidth("100%"); table.setTableFieldFactory(new MibObjFieldFactory(resourceTypes)); if (mibGroupEditable) { toolbar.addComponent(add); toolbar.addComponent(delete); } toolbar.setVisible(table.isEditable()); setValidationVisible(true); }
table.setColumnExpandRatio("decodes", 1); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setHeight("125px"); table.setWidth("100%");
table.setColumnExpandRatio("vbvalues", 1); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setHeight("125px"); table.setWidth("100%");
table.setSelectable(false); table.setMultiSelect(false); table.setImmediate(false);
table.setColumnExpandRatio("mevalues", 1); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setHeight("125px"); table.setWidth("100%");
component.setSelectable(true); component.setTableFieldFactory(createFieldFactory()); component.setColumnCollapsingAllowed(true);
table.setColumnExpandRatio("value", 1); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setHeight("125px"); table.setWidth("100%");
table.setColumnHeaders(new String[]{"Type", "Value"}); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setImmediate(true); table.setSizeFull();
table.setColumnHeaders(new String[]{"Consolidation Function", "XFF", "Steps", "Rows"}); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setImmediate(true); table.setSizeFull();
table.setSelectable(false); table.setMultiSelect(false); table.setImmediate(false);
categoriesTable.setColumnHeader("name", "Category"); categoriesTable.setColumnExpandRatio("Category", 1.0f); categoriesTable.setSelectable(true); categoriesTable.setMultiSelect(true);
columnsTable.setColumnHeader("label", "Columns"); columnsTable.setColumnExpandRatio("label", 1.0f); columnsTable.setSelectable(true); columnsTable.setMultiSelect(false); rowsTable.setColumnHeader("label", "Rows"); rowsTable.setColumnExpandRatio("label", 1.0f); rowsTable.setSelectable(true); rowsTable.setMultiSelect(false);