Example usage for com.vaadin.ui.themes ValoTheme TABLE_NO_HORIZONTAL_LINES

List of usage examples for com.vaadin.ui.themes ValoTheme TABLE_NO_HORIZONTAL_LINES

Introduction

In this page you can find the example usage for com.vaadin.ui.themes ValoTheme TABLE_NO_HORIZONTAL_LINES.

Prototype

String TABLE_NO_HORIZONTAL_LINES

To view the source code for com.vaadin.ui.themes ValoTheme TABLE_NO_HORIZONTAL_LINES.

Click Source Link

Document

Remove the horizontal divider lines between the table rows.

Usage

From source file:org.eclipse.hawkbit.ui.distributions.disttype.CreateUpdateDistSetTypeLayout.java

License:Open Source License

/**
*
*///from  w w  w. jav  a 2s.  c o  m
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);
    getSourceTableData();
    addTooltip();
    sourceTable.select(sourceTable.firstItemId());
}

From source file:org.eclipse.hawkbit.ui.distributions.disttype.DistributionSetTypeSoftwareModuleSelectLayout.java

License:Open Source License

private void buildSelectedTable() {
    selectedTable = new Table();
    selectedTable.setId(SPUIDefinitions.TWIN_TABLE_SELECTED_ID);
    selectedTable.setSelectable(true);/* w w  w .ja  v a2 s.  com*/
    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);
}

From source file:org.eclipse.hawkbit.ui.distributions.disttype.DistributionSetTypeSoftwareModuleSelectLayout.java

License:Open Source License

private void buildSourceTable() {
    sourceTable = new Table();
    sourceTable.setId(SPUIDefinitions.TWIN_TABLE_SOURCE_ID);
    sourceTable.setSelectable(true);//  w w  w . j av a2s  .co m
    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());
}

From source file:org.opencms.ui.components.fileselect.CmsResourceTreeTable.java

License:Open Source License

/**
 * Creates a new instance.<p>/*from   www .  j a v  a  2s  .c  o m*/
 *
 * @param cms the CMS context
 * @param root the root resource
 * @param container the data container for the tree
 */
public CmsResourceTreeTable(CmsObject cms, CmsResource root, CmsResourceTreeContainer container) {
    m_cms = cms;
    m_root = root;
    FileSorter sorter = new FileSorter();
    sorter.setSortProperties(container,
            new Object[] { CAPTION_FOLDERS, CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT },
            new boolean[] { true, true });
    container.setItemSorter(sorter);
    setContainerDataSource(container);
    ColumnGenerator captionGenerator = new ColumnGenerator() {

        private static final long serialVersionUID = 1L;

        public Object generateCell(Table source, Object itemId, Object columnId) {

            if (CAPTION_FOLDERS.equals(columnId)) {
                String html = (String) source.getContainerDataSource().getItem(itemId)
                        .getItemProperty(CmsResourceTableProperty.PROPERTY_TREE_CAPTION).getValue();
                Label label = new Label(html, ContentMode.HTML);
                label.setStyleName("o-tree-table-caption");
                return label;
            } else {
                return null;
            }
        }
    };
    addGeneratedColumn(CAPTION_FOLDERS, captionGenerator);
    setVisibleColumns(CAPTION_FOLDERS, CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT);
    setItemCaptionPropertyId(CAPTION_FOLDERS);
    setColumnHeader(CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT,
            CmsVaadinUtils.getMessageText(CmsResourceTableProperty.PROPERTY_NAVIGATION_TEXT.getHeaderKey()));
    setColumnHeader(CAPTION_FOLDERS,
            CmsVaadinUtils.getMessageText(CmsResourceTableProperty.PROPERTY_RESOURCE_NAME.getHeaderKey()));

    // hide vertical and horizontal lines and disable alternating row background
    addStyleName(ValoTheme.TABLE_NO_STRIPES);
    addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES);

    addExpandListener(new ExpandListener() {

        private static final long serialVersionUID = 1L;

        public void nodeExpand(ExpandEvent event) {

            getTreeContainer().readTreeLevel(m_cms, (CmsUUID) event.getItemId());
            getTreeContainer().updateSort();
            markAsDirtyRecursive(); // required so open / close arrows on folders without contents are rendered correctly
        }

    });

    addCollapseListener(new CollapseListener() {

        private static final long serialVersionUID = 1L;

        public void nodeCollapse(CollapseEvent event) {

            getTreeContainer().removeChildren((CmsUUID) event.getItemId());
        }
    });

    addItemClickListener(new ItemClickListener() {

        private static final long serialVersionUID = 1L;

        public void itemClick(ItemClickEvent event) {

            if (isSelectable(event.getItem())) {
                CmsResource resource = (CmsResource) (event.getItem()
                        .getItemProperty(CmsResourceTreeContainer.PROPERTY_RESOURCE).getValue());
                handleSelection(resource);
            }
        }
    });
    setCellStyleGenerator(new StyleGenerator());

    getTreeContainer().addTreeItem(cms, m_root, null);
    try {
        setCollapsed(m_root.getStructureId(), false);
        markAsDirtyRecursive();

    } catch (Exception e) {
        LOG.error(e.getLocalizedMessage(), e);
    }
}

From source file:org.openthinclient.web.pkgmngr.ui.InstallationPlanSummaryDialog.java

/**
 * Creates a table with datasource of IndexedContainer
 * @return the Grid for InstallationSummary
 */// w  w  w  .  j  ava2 s  . com
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;
}