Refine search
/** * Creates a new ManageResourceProcessorWindow instance. */ public ManageResourceProcessorWindow() { super("Resource Processors"); setModal(true); setWidth("50em"); setCloseShortcut(KeyCode.ESCAPE); m_artifactsTable = new Table("Available resource processors"); m_artifactsTable.addContainerProperty(PROPERTY_SYMBOLIC_NAME, String.class, null); m_artifactsTable.addContainerProperty(PROPERTY_VERSION, String.class, null); m_artifactsTable.addContainerProperty(PROPERTY_REMOVE, Button.class, null); m_artifactsTable.setSizeFull(); m_artifactsTable.setSelectable(true); m_artifactsTable.setMultiSelect(true); m_artifactsTable.setImmediate(true); m_artifactsTable.setHeight("15em"); VerticalLayout layout = (VerticalLayout) getContent(); layout.setMargin(true); layout.setSpacing(true); layout.addComponent(m_artifactsTable); }
table.addStyleName("light"); table.setVisibleColumns(new Object[]{"parmid", "decodes"}); table.setColumnHeader("parmid", "Parameter ID"); table.setColumnHeader("decodes", "Decode Values"); table.setColumnExpandRatio("decodes", 1); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setHeight("125px"); table.setWidth("100%"); table.setTableFieldFactory(new DefaultFieldFactory() { @Override public Field<?> createField(Container container, Object itemId, Object propertyId, Component uiContext) { toolbar.addComponent(add); toolbar.addComponent(delete); toolbar.setVisible(table.isEditable());
protected void addComponent(final Component component) { Button deleteButton = new Button(); deleteButton.setIcon(VaadinIcons.TRASH); deleteButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); deleteButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); // Add the delete functionality to each role that is added deleteButton.addClickListener(new Button.ClickListener() { public void buttonClick(ClickEvent event) { components.removeItem(component); } }); components.addItem(new Object[]{component.getName(), deleteButton}, component); }
private static Table createArtifactDetailsTable() { final Table detailsTable = new Table(); detailsTable.addStyleName("sp-table"); detailsTable.setImmediate(true); detailsTable.setSizeFull(); detailsTable.setId(UIComponentIdProvider.UPLOAD_ARTIFACT_DETAILS_TABLE); detailsTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES); detailsTable.addStyleName(ValoTheme.TABLE_SMALL); return detailsTable; }
protected void addContainerProperties() { table.addContainerProperty("type", Embedded.class, null); table.setColumnWidth("type", 16); table.addContainerProperty("name", Component.class, null); table.addContainerProperty("delete", Embedded.class, null); table.setColumnWidth("delete", 16); }
protected Table initRelatedContentTable() { Table table = new Table(); table.setWidth(100, UNITS_PERCENTAGE); table.addStyleName(ExplorerLayout.STYLE_RELATED_CONTENT_LIST); // Invisible by default, only shown when attachments are present table.setVisible(false); table.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN); table.addContainerProperty("type", Embedded.class, null); table.setColumnWidth("type", 16); table.addContainerProperty("name", Component.class, null); relatedContentLayout.addComponent(table); return table; }
private HorizontalLayout createTwinColumnLayout() { final HorizontalLayout twinColumnLayout = new HorizontalLayout(); twinColumnLayout.setSizeFull(); twinColumnLayout.setWidth("400px"); buildSourceTable(); buildSelectedTable(); final VerticalLayout selectButtonLayout = new VerticalLayout(); final Button selectButton = SPUIComponentProvider.getButton(UIComponentIdProvider.SELECT_DIST_TYPE, "", "", "arrow-button", true, FontAwesome.FORWARD, SPUIButtonStyleNoBorder.class); selectButton.addClickListener(event -> addSMType()); final Button unSelectButton = SPUIComponentProvider.getButton("unselect-dist-type", "", "", "arrow-button", true, FontAwesome.BACKWARD, SPUIButtonStyleNoBorder.class); unSelectButton.addClickListener(event -> removeSMType()); selectButtonLayout.addComponent(selectButton); selectButtonLayout.addComponent(unSelectButton); selectButtonLayout.setComponentAlignment(selectButton, Alignment.MIDDLE_CENTER); selectButtonLayout.setComponentAlignment(unSelectButton, Alignment.MIDDLE_CENTER); twinColumnLayout.addComponent(sourceTable); twinColumnLayout.addComponent(selectButtonLayout); twinColumnLayout.addComponent(selectedTable); twinColumnLayout.setComponentAlignment(sourceTable, Alignment.MIDDLE_LEFT); twinColumnLayout.setComponentAlignment(selectButtonLayout, Alignment.MIDDLE_CENTER); twinColumnLayout.setComponentAlignment(selectedTable, Alignment.MIDDLE_RIGHT); twinColumnLayout.setExpandRatio(sourceTable, 0.45F); twinColumnLayout.setExpandRatio(selectButtonLayout, 0.07F); twinColumnLayout.setExpandRatio(selectedTable, 0.48F); sourceTable.setVisibleColumns(DIST_TYPE_NAME); return twinColumnLayout; }
@Override public Component render() { if (nvl(table, false)) { Table table = new Table(); table.setWidth("100%"); table.setHeight("180px"); table.setImmediate(true); // react at once when something is selected table.setSelectable(true); table.addStyleName("components-inside"); table.addStyleName("small"); table.setContainerDataSource(bic); Object[] cols = { "userDescription", "stateDescription", "actionDescription"}; table.setVisibleColumns(cols); for (Object o : table.getVisibleColumns()) { table.setColumnHeader(o, getMessage("awf.basewidgets.process-history." + o)); layout.setSpacing(true); layout.addComponent(hl); layout.addComponent(hl);
setContent(mainLayout); HorizontalLayout horizontalLayout = new HorizontalLayout(); mainLayout.addComponent(horizontalLayout); horizontalLayout.addComponent(createPopupButton()); textArea.setRows(10); textCaptionButton.setComponent(textArea); horizontalLayout.addComponent(textCaptionButton); horizontalLayout.addComponent(iconButton); VerticalLayout userLayout = new VerticalLayout(); userLayout.setWidth("100px"); userLayout.setHeight("50px"); iconButton.setComponent(userLayout); Table table = new Table(); table.addContainerProperty("property1", String.class, "-"); table.addContainerProperty("property2", String.class, "-"); table.addItem(); tableButton.setContent(table); horizontalLayout.addComponent(tableButton);
StatefulTargetObject target = getRepositoryObjectFromContext(context); if (!target.isRegistered()) { VerticalLayout result = new VerticalLayout(); result.setCaption(CAPTION); result.addComponent(new Label("This target is not yet registered, so it has no log.")); return result; m_table.setWidth(FILL_AREA); m_table.setHeight(FILL_AREA); m_table.addContainerProperty(COL_TIME, Date.class, null, "Time", null, null); m_table.addContainerProperty(COL_TYPE, String.class, null, "Type", null, null); m_table.addContainerProperty(COL_PROPERTIES, TextArea.class, null, "Properties", null, null); m_table.setColumnExpandRatio(COL_PROPERTIES, 2); m_table.setColumnExpandRatio(COL_TYPE, 1); m_table.setColumnExpandRatio(COL_TIME, 1); m_table.setColumnCollapsingAllowed(true); m_table.setSortAscending(false); m_table.setSortContainerPropertyId(COL_TIME); TextField pf = makeTextField(COL_PROPERTIES); HorizontalLayout filters = new HorizontalLayout(); filters.setSpacing(true); filters.addComponent(tf); filters.addComponent(pf);
private void setContent() { VerticalLayout panel = new VerticalLayout(); setContent(panel); panel.setMargin(true); panel.setSpacing(true); setWidth("100%"); Label status = new NodeLabel(m_handler); Button startButton = new ActionButton(m_handler, Action.Start); Button stopButton = new ActionButton(m_handler, Action.Stop); HorizontalLayout buttonPanel = new HorizontalLayout(); buttonPanel.addComponent(startButton); buttonPanel.addComponent(stopButton); buttonPanel.setSpacing(true); Table propertiesTable = new PropertiesTable(m_handler); propertiesTable.setWidth("100%"); panel.addComponent(status); panel.addComponent(buttonPanel); panel.addComponent(propertiesTable); m_factory.submit(m_statusGetter); }
VerticalLayout vl = new VerticalLayout(); final Table table = new Table(); table.setContainerDataSource(bic); table.setVisibleColumns(new Object[]{"author", "createTime"}); table.setWidth("100%"); table.addGeneratedColumn("author", new Table.ColumnGenerator() { @Override public Component generateCell(Table source, Object itemId, Object columnId) { table.addGeneratedColumn("createTime", new Table.ColumnGenerator() { @Override public Component generateCell(Table source, Object itemId, Object columnId) { table.setImmediate(true); table.setSelectable(true); for (Object o : table.getVisibleColumns()) { table.setColumnHeader(o, getMessage("processdata.comments.comment.table." + o)); table.addListener( new ItemClickEvent.ItemClickListener() { @Override table.setHeight("200px"); } else { commentsPanel = new Panel();
historyTable.setWidth("100%"); m_listContainer.setWidth("100%"); Button compareButton = new Button(CmsVaadinUtils.getMessageText(Messages.GUI_HISTORY_DIALOG_COMPARE_0)); m_listContainer.addComponent(compareButton); m_listContainer.setComponentAlignment(compareButton, Alignment.MIDDLE_RIGHT); compareButton.addClickListener(new ClickListener() { m_compareButton.get().setEnabled(false); m_listContainer.addComponent(historyTable); } catch (CmsException e) {
public Component create(Map<String, Object> context) { final RepositoryObject sgo = getRepositoryObjectFromContext(context); VerticalLayout result = new VerticalLayout(); result.setCaption("Tag Editor"); final Table table = new Table(); table.setWidth("100%"); table.addContainerProperty("Tag", TextField.class, null); table.addContainerProperty("Value", TextField.class, null); table.setEditable(false); result.addComponent(table); result.setComponentAlignment(table, Alignment.MIDDLE_CENTER); final Map<Object, TagTableEntry> idToKey = new HashMap<Object, TagTableEntry>(); table.addActionHandler(new Action.Handler() { final Action[] delete = new Action[] { new Action("delete") };
/** * {@inheritDoc} */ public Component create(Map<String, Object> context) { RepositoryObject object = getRepositoryObjectFromContext(context); if (object instanceof StatefulTargetObject && !((StatefulTargetObject) object).isRegistered()) { VerticalLayout result = new VerticalLayout(); result.setCaption(CAPTION); result.addComponent(new Label("This target is not yet registered, so it has no log.")); return result; } Table table = new Table(); table.setWidth(FILL_AREA); table.setHeight(FILL_AREA); table.setCaption(CAPTION); table.addContainerProperty(COL_TIME, Date.class, null); table.addContainerProperty(COL_TYPE, String.class, null); table.addContainerProperty(COL_PROPERTIES, TextArea.class, null); table.setColumnExpandRatio(COL_PROPERTIES, 1); try { fillTable(object, table); } catch (IOException ex) { m_logService.log(LogService.LOG_WARNING, "Log viewer failed!", ex); } return table; }
protected void initEventsTable() { eventTable = new Table(); eventTable.setVisible(false); eventTable.setWidth(100, UNITS_PERCENTAGE); eventTable.setHeight(250, UNITS_PIXELS); eventTable.setEditable(false); eventTable.setImmediate(true); eventTable.setSelectable(true); eventTable.setSortDisabled(false); eventTable.addContainerProperty("type", String.class, null, i18nManager.getMessage(Messages.CRYSTALBALL_EVENT_TYPE), null, Table.ALIGN_LEFT); eventTable.addContainerProperty("executed", String.class, null, i18nManager.getMessage(Messages.CRYSTALBALL_EVENT_EXECUTED), null, Table.ALIGN_LEFT); eventLayout.addComponent(eventTable); }
/** * @see org.opencms.ui.dialogs.history.diff.I_CmsDiffProvider#diff(org.opencms.file.CmsObject, org.opencms.gwt.shared.CmsHistoryResourceBean, org.opencms.gwt.shared.CmsHistoryResourceBean) */ public Optional<Component> diff(CmsObject cms, CmsHistoryResourceBean v1, CmsHistoryResourceBean v2) throws CmsException { List<CmsAttributeComparison> attrCompare = getDifferences(cms, v1, v2); if (attrCompare.isEmpty()) { return Optional.absent(); } List<CmsPropertyCompareBean> compareBeans = Lists.newArrayList(); for (CmsAttributeComparison comp : attrCompare) { compareBeans.add(new CmsPropertyCompareBean(comp)); } CmsBeanTableBuilder<CmsPropertyCompareBean> builder = CmsBeanTableBuilder.newInstance( CmsPropertyCompareBean.class, A_CmsUI.get().getDisplayType().toString()); builder.setMacroResolver(new CmsVersionMacroResolver(v1, v2)); Table table = builder.buildTable(compareBeans); table.setSortEnabled(false); table.setWidth("100%"); table.setPageLength(Math.min(12, compareBeans.size())); table.setStyleName(COMPARE_TABLE_MARKER); VerticalLayout vl = new VerticalLayout(); vl.setMargin(true); vl.addComponent(table); Panel panel = new Panel(getCaption()); panel.setContent(vl); return Optional.fromNullable((Component)panel); }
private void createResultsPanel() { this.resultsPanel = new Panel(); this.resultsPanel.setSizeFull(); this.resultsPanel.setStyleName("dashboard"); this.resultsTable = new Table(); this.resultsTable.setSizeFull(); this.resultsTable.addContainerProperty("Name", String.class, null); this.resultsTable.addContainerProperty("Description", String.class, null); this.resultsTable.addItemClickListener(new ItemClickEvent.ItemClickListener() { @Override public void itemClick(ItemClickEvent itemClickEvent) { businessStream = (BusinessStream)itemClickEvent.getItemId(); UI.getCurrent().removeWindow(PolicyAssociationBusinessStreamSearchWindow.this); } }); HorizontalLayout layout = new HorizontalLayout(); layout.addComponent(this.resultsTable); layout.setSizeFull(); layout.setMargin(true); this.resultsPanel.setContent(layout); }
setCaption("Include Collections"); table.addStyleName("light"); table.setVisibleColumns(new Object[]{"type", "value"}); table.setColumnHeaders(new String[]{"Type", "Value"}); table.setEditable(!isReadOnly()); table.setSelectable(true); table.setImmediate(true); table.setHeight("125px"); table.setWidth("100%"); final Button add = new Button("Add", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { final Button edit = new Button("Edit", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { final Button delete = new Button("Delete", new Button.ClickListener() { @Override public void buttonClick(ClickEvent event) { toolbar.addComponent(add); toolbar.addComponent(edit); toolbar.addComponent(delete); toolbar.setVisible(table.isEditable());
descriptionTextArea.setReadOnly(true); businessStreamTable.removeAllItems(); Button deleteButton = new Button(); deleteButton.setIcon(VaadinIcons.TRASH); deleteButton.addStyleName(ValoTheme.BUTTON_ICON_ONLY); deleteButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); deleteButton.setDescription("Delete the flow from the business stream."); businessStreamTable.addItem(new Object[]{businessStreamFlow.getFlow().getModule().getServer().getName() , businessStreamFlow.getFlow().getName(), businessStreamFlow.getFlow().getName(), deleteButton}, businessStreamFlow);