Java Code Examples for com.vaadin.ui.Table#setSizeFull()
The following examples show how to use
com.vaadin.ui.Table#setSizeFull() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DistributionSetTypeSoftwareModuleSelectLayout.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private void buildSelectedTable() { selectedTable = new Table(); selectedTable.setId(SPUIDefinitions.TWIN_TABLE_SELECTED_ID); selectedTable.setSelectable(true); selectedTable.setMultiSelect(true); selectedTable.setSortEnabled(false); selectedTable.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES); selectedTable.addStyleName(ValoTheme.TABLE_NO_STRIPES); selectedTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES); selectedTable.addStyleName(ValoTheme.TABLE_SMALL); selectedTable.addStyleName("dist_type_twin-table"); selectedTable.setSizeFull(); createSelectedTableContainer(); selectedTable.setContainerDataSource(selectedTableContainer); addTooltTipToSelectedTable(); selectedTable.setImmediate(true); selectedTable.setVisibleColumns(DIST_TYPE_NAME, DIST_TYPE_MANDATORY); selectedTable.setColumnHeaders(i18n.getMessage("header.dist.twintable.selected"), STAR); selectedTable.setColumnExpandRatio(DIST_TYPE_NAME, 0.75F); selectedTable.setColumnExpandRatio(DIST_TYPE_MANDATORY, 0.25F); selectedTable.setRequired(true); }
Example 2
Source File: DistributionSetTypeSoftwareModuleSelectLayout.java From hawkbit with Eclipse Public License 1.0 | 6 votes |
private void buildSourceTable() { sourceTable = new Table(); sourceTable.setId(SPUIDefinitions.TWIN_TABLE_SOURCE_ID); sourceTable.setSelectable(true); sourceTable.setMultiSelect(true); sourceTable.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES); sourceTable.addStyleName(ValoTheme.TABLE_NO_STRIPES); sourceTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES); sourceTable.addStyleName(ValoTheme.TABLE_SMALL); sourceTable.setImmediate(true); sourceTable.setSizeFull(); sourceTable.addStyleName("dist_type_twin-table"); sourceTable.setSortEnabled(false); sourceTableContainer = new IndexedContainer(); sourceTableContainer.addContainerProperty(DIST_TYPE_NAME, String.class, ""); sourceTableContainer.addContainerProperty(DIST_TYPE_DESCRIPTION, String.class, ""); sourceTable.setContainerDataSource(sourceTableContainer); sourceTable.setVisibleColumns(DIST_TYPE_NAME); sourceTable.setColumnHeaders(i18n.getMessage("header.dist.twintable.available")); sourceTable.setColumnExpandRatio(DIST_TYPE_NAME, 1.0F); createSourceTableData(); addTooltip(); sourceTable.select(sourceTable.firstItemId()); }
Example 3
Source File: Application.java From boot-examples with Apache License 2.0 | 6 votes |
@Override protected void init(VaadinRequest vaadinRequest) { getPage().setTitle("Root UI"); Table table = new Table("Customer Table"); table.addContainerProperty("firstName", String.class, null); table.addContainerProperty("lastName", String.class, null); table.addContainerProperty("id", Long.class, null); for (Customer c : this.customerRepository.findAll()) table.addItem(new Object[]{c.getFirstName(), c.getLastName(), c.getId()}, c.getId()); table.setSizeFull(); table.setColumnHeader("firstName", "First Name"); table.setColumnHeader("lastName", "First Name"); setContent(table); }
Example 4
Source File: ArtifactDetailsLayout.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
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; }
Example 5
Source File: RunnersLayout.java From usergrid with Apache License 2.0 | 5 votes |
private static Table getTable() { Table table = new Table(); table.setSizeFull(); table.addContainerProperty( "URL", String.class, null ); table.addContainerProperty( "State", String.class, null ); table.addContainerProperty( "Complete %", String.class, null ); table.addContainerProperty( "Start Time", String.class, null ); return table; }
Example 6
Source File: StatView.java From chipster with MIT License | 5 votes |
private void mapListToTable(List<Map<Object, Object>> list, Table table) { table.setSizeFull(); table.removeAllItems(); if (list.size() > 0) { List<Object> keyList = new LinkedList<Object>(list.get(0).keySet()); //Column headers for (Object columnHeader : keyList) { table.addContainerProperty(columnHeader, String.class, null); } //Content rows int i = 0; for (Map<Object, Object> map : list) { //We assume that the order of returned values is identical in all these maps //otherwise values are put to wrong columns List<String> stringValues = new LinkedList<String>(); for (Object objValue : map.values()) { if (objValue != null) { stringValues.add(objValue.toString()); } else { stringValues.add(""); } } table.addItem(stringValues.toArray(), i++); } } }
Example 7
Source File: ObjectTypeSelectionPopup.java From sensorhub with Mozilla Public License 2.0 | 4 votes |
public ObjectTypeSelectionPopup(String title, final Map<String, Class<?>> typeList, final ObjectTypeSelectionCallback callback) { super(title); VerticalLayout layout = new VerticalLayout(); // generate table with type list final Table table = new Table(); table.setSizeFull(); table.setSelectable(true); table.setColumnReorderingAllowed(true); table.addContainerProperty(UIConstants.PROP_NAME, String.class, null); table.setColumnHeaderMode(ColumnHeaderMode.HIDDEN); table.setPageLength(10); table.setMultiSelect(false); final Map<Object, Class<?>> idTypeMap = new HashMap<Object, Class<?>>(); for (Entry<String, Class<?>> item: typeList.entrySet()) { Object id = table.addItem(new Object[] {item.getKey()}, null); idTypeMap.put(id, item.getValue()); } layout.addComponent(table); // add OK button Button okButton = new Button("OK"); okButton.addClickListener(new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { Object selectedItemId = table.getValue(); if (selectedItemId != null) { Class<?> clazz = idTypeMap.get(selectedItemId); if (clazz != null) callback.typeSelected(clazz); } close(); } }); layout.addComponent(okButton); layout.setComponentAlignment(okButton, Alignment.MIDDLE_CENTER); setContent(layout); center(); }