List of usage examples for com.vaadin.ui.themes ValoTheme TABLE_NO_HEADER
String TABLE_NO_HEADER
To view the source code for com.vaadin.ui.themes ValoTheme TABLE_NO_HEADER.
Click Source Link
From source file:com.hybridbpm.ui.UsersMenu.java
License:Apache License
public UsersMenu() { textSearch.addStyleName(ValoTheme.TEXTFIELD_SMALL); textSearch.setWidth(100, Unit.PERCENTAGE); textSearch.setNullRepresentation(""); textSearch.setWidth(100, Unit.PERCENTAGE); textSearch.setInputPrompt("type to search users"); textSearch.addTextChangeListener(new FieldEvents.TextChangeListener() { @Override// w w w .j av a2s . c o m public void textChange(FieldEvents.TextChangeEvent event) { search(event.getText()); } }); table.addStyleName(ValoTheme.TABLE_BORDERLESS); table.addStyleName(ValoTheme.TABLE_NO_HEADER); table.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES); table.addStyleName(ValoTheme.TABLE_SMALL); table.addStyleName(ValoTheme.TABLE_COMPACT); table.addStyleName(ValoTheme.TABLE_NO_STRIPES); table.addContainerProperty("user", User.class, null, "Username", null, Table.Align.LEFT); table.addContainerProperty("tasks", Label.class, null, "Tasks", null, Table.Align.LEFT); table.setColumnExpandRatio("user", 1f); table.setVisibleColumns("user", "tasks"); table.setSizeFull(); table.setColumnExpandRatio("user", 1f); table.setSelectable(false); table.addGeneratedColumn("user", new UserColumnGenerator()); addComponents(textSearch, table); setExpandRatio(table, 1f); setHeight(100, Unit.PERCENTAGE); setWidth(300, Unit.PIXELS); addStyleName("users-list"); setVisible(false); }
From source file:org.openthinclient.web.pkgmngr.ui.InstallationPlanSummaryDialog.java
/** * Creates a table with datasource of IndexedContainer * @return the Grid for InstallationSummary *//*from www .j a va 2 s . c om*/ private Grid<InstallationSummary> createTable(GridTypes type) { Grid<InstallationSummary> summary = new Grid<>(); summary.setDataProvider(DataProvider.ofCollection(Collections.EMPTY_LIST)); summary.setSelectionMode(Grid.SelectionMode.NONE); summary.addColumn(InstallationSummary::getPackageName) .setCaption(mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_NAME)); summary.addColumn(InstallationSummary::getPackageVersion) .setCaption(mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_VERSION)); if (type == GridTypes.INSTALL_UNINSTALL && !packageManagerOperation.hasPackagesToUninstall()) { // license column summary.addComponentColumn(is -> { if (is.getLicense() != null) { Button button = new Button( mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_LICENSE_SHOW)); button.addClickListener(click -> { // licence already clicked, re-set button caption licenceButtons.stream().filter(b -> !b.equals(button)).forEach(b -> { if (b.getCaption().equals( mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_LICENSE_HIDE))) { b.setCaption( mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_LICENSE_SHOW)); } }); // display licence if (button.getCaption() .equals(mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_LICENSE_SHOW))) { licenceTextArea.setVisible(true); licenceTextArea.setValue(is.getLicense()); } else { licenceTextArea.setVisible(false); } button.setCaption(licenceTextArea.isVisible() ? mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_LICENSE_HIDE) : mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_LICENSE_SHOW)); }); button.addStyleName("package_install_summary_display_license_button"); licenceButtons.add(button); return button; } else { return null; } }).setCaption(mc.getMessage(ConsoleWebMessages.UI_PACKAGEMANAGER_PACKAGE_LICENSE)); } summary.addStyleName(ValoTheme.TABLE_BORDERLESS); summary.addStyleName(ValoTheme.TABLE_NO_HEADER); summary.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES); summary.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES); summary.setHeightMode(HeightMode.ROW); return summary; }