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

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

Introduction

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

Prototype

String TABLE_NO_VERTICAL_LINES

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

Click Source Link

Document

Remove the vertical divider lines between the table columns.

Usage

From source file:com.esofthead.mycollab.vaadin.web.ui.table.AbstractPagedBeanTable.java

License:Open Source License

private void createTable() {
    tableItem = new Table();
    tableItem.setWidth("100%");
    tableItem.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    tableItem.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES);
    tableItem.setSortEnabled(false);/*www .j  a  v a 2  s. com*/

    // set column generator
    for (Map.Entry<Object, ColumnGenerator> entry : columnGenerators.entrySet()) {
        tableItem.addGeneratedColumn(entry.getKey(), entry.getValue());
    }

    if (StringUtils.isNotBlank((String) sortColumnId)) {
        tableItem.setColumnIcon(sortColumnId, isAscending ? FontAwesome.CARET_DOWN : FontAwesome.CARET_UP);
    }

    tableItem.addHeaderClickListener(new Table.HeaderClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void headerClick(final Table.HeaderClickEvent event) {
            String propertyId = (String) event.getPropertyId();

            if (propertyId.equals("selected")) {
                return;
            }

            if (searchRequest != null) {
                S searchCriteria = searchRequest.getSearchCriteria();
                if (sortColumnId == null) {
                    sortColumnId = propertyId;
                    searchCriteria.setOrderFields(Collections
                            .singletonList(new SearchCriteria.OrderField(propertyId, SearchCriteria.DESC)));
                    isAscending = false;
                } else if (propertyId.equals(sortColumnId)) {
                    isAscending = !isAscending;
                    String direction = (isAscending) ? SearchCriteria.ASC : SearchCriteria.DESC;
                    searchCriteria.setOrderFields(
                            Collections.singletonList(new SearchCriteria.OrderField(propertyId, direction)));
                } else {
                    sortColumnId = propertyId;
                    searchCriteria.setOrderFields(Collections
                            .singletonList(new SearchCriteria.OrderField(propertyId, SearchCriteria.DESC)));
                    isAscending = false;
                }

                setSearchCriteria(searchCriteria);
            }
        }
    });

    BeanItemContainer<B> container = new BeanItemContainer<>(type, currentListData);
    tableItem.setPageLength(0);
    tableItem.setContainerDataSource(container);
    displayTableColumns();

    if (this.getComponentCount() > 0) {
        final Component component0 = this.getComponent(0);
        if (component0 instanceof Table) {
            this.replaceComponent(component0, tableItem);
        } else {
            this.addComponent(tableItem, 0);
        }
    } else {
        this.addComponent(tableItem, 0);
    }
    this.setExpandRatio(tableItem, 1);
}

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//from  w  ww . j  a  v  a  2s .c  om
        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:com.mycollab.vaadin.web.ui.table.AbstractPagedBeanTable.java

License:Open Source License

private void createTable() {
    tableItem = new Table();
    tableItem.setWidth("100%");
    tableItem.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    tableItem.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES);
    tableItem.setSortEnabled(false);//  www .j  a v a 2  s.  co  m

    // set column generator
    for (Map.Entry<Object, ColumnGenerator> entry : columnGenerators.entrySet()) {
        tableItem.addGeneratedColumn(entry.getKey(), entry.getValue());
    }

    if (StringUtils.isNotBlank((String) sortColumnId)) {
        tableItem.setColumnIcon(sortColumnId, isAscending ? FontAwesome.CARET_DOWN : FontAwesome.CARET_UP);
    }

    tableItem.addHeaderClickListener(headerClickEvent -> {
        String propertyId = (String) headerClickEvent.getPropertyId();

        if (propertyId.equals("selected")) {
            return;
        }

        if (searchRequest != null) {
            S searchCriteria = searchRequest.getSearchCriteria();
            if (sortColumnId == null) {
                sortColumnId = propertyId;
                searchCriteria.setOrderFields(Collections
                        .singletonList(new SearchCriteria.OrderField(propertyId, SearchCriteria.DESC)));
                isAscending = false;
            } else if (propertyId.equals(sortColumnId)) {
                isAscending = !isAscending;
                String direction = (isAscending) ? SearchCriteria.ASC : SearchCriteria.DESC;
                searchCriteria.setOrderFields(
                        Collections.singletonList(new SearchCriteria.OrderField(propertyId, direction)));
            } else {
                sortColumnId = propertyId;
                searchCriteria.setOrderFields(Collections
                        .singletonList(new SearchCriteria.OrderField(propertyId, SearchCriteria.DESC)));
                isAscending = false;
            }

            setSearchCriteria(searchCriteria);
        }
    });

    BeanItemContainer<B> container = new BeanItemContainer<>(type, currentListData);
    tableItem.setPageLength(0);
    tableItem.setContainerDataSource(container);
    displayTableColumns();

    if (this.getComponentCount() > 0) {
        final Component component0 = this.getComponent(0);
        if (component0 instanceof Table) {
            this.replaceComponent(component0, tableItem);
        } else {
            this.addComponent(tableItem, 0);
        }
    } else {
        this.addComponent(tableItem, 0);
    }
    this.setExpandRatio(tableItem, 1);
}

From source file:org.eclipse.hawkbit.ui.artifacts.details.ArtifactDetailsLayout.java

License:Open Source License

private static Table createArtifactDetailsTable() {
    final Table detailsTable = new Table();
    detailsTable.addStyleName("sp-table");

    detailsTable.setImmediate(true);//from   ww  w.j  av  a2 s  . co m
    detailsTable.setSizeFull();

    detailsTable.setId(UIComponentIdProvider.UPLOAD_ARTIFACT_DETAILS_TABLE);
    detailsTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    detailsTable.addStyleName(ValoTheme.TABLE_SMALL);
    return detailsTable;
}

From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadConfirmationWindow.java

License:Open Source License

private void createRequiredComponents() {
    uploadBtn = SPUIComponentProvider.getButton(UIComponentIdProvider.UPLOAD_BUTTON,
            SPUILabelDefinitions.SUBMIT, SPUILabelDefinitions.SUBMIT, ValoTheme.BUTTON_PRIMARY, false, null,
            SPUIButtonStyleTiny.class);
    uploadBtn.addClickListener(this);
    cancelBtn = SPUIComponentProvider.getButton(UIComponentIdProvider.UPLOAD_DISCARD_DETAILS_BUTTON,
            SPUILabelDefinitions.DISCARD, SPUILabelDefinitions.DISCARD, null, false, null,
            SPUIButtonStyleTiny.class);
    cancelBtn.addClickListener(this);

    uploadDetailsTable = new Table();
    uploadDetailsTable.addStyleName("artifact-table");
    uploadDetailsTable.setSizeFull();//w w w  .j a  v a 2 s.  com
    uploadDetailsTable.setId(UIComponentIdProvider.UPLOAD_ARTIFACT_DETAILS_TABLE);
    uploadDetailsTable.addStyleName(ValoTheme.TABLE_BORDERLESS);
    uploadDetailsTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    uploadDetailsTable.addStyleName(ValoTheme.TABLE_SMALL);

    setTableContainer();
    populateUploadDetailsTable();
}

From source file:org.eclipse.hawkbit.ui.artifacts.upload.UploadResultWindow.java

License:Open Source License

private void createComponents() {
    closeBtn = SPUIComponentProvider.getButton(UIComponentIdProvider.UPLOAD_ARTIFACT_RESULT_CLOSE,
            SPUILabelDefinitions.CLOSE, SPUILabelDefinitions.CLOSE, ValoTheme.BUTTON_PRIMARY, false, null,
            SPUIButtonStyleTiny.class);
    closeBtn.addClickListener(this);

    uploadResultTable = new Table();
    uploadResultTable.addStyleName("artifact-table");
    uploadResultTable.setSizeFull();/*  w  w w .j a  v a 2  s.  c  om*/
    uploadResultTable.setImmediate(true);
    uploadResultTable.setId(UIComponentIdProvider.UPLOAD_RESULT_TABLE);
    uploadResultTable.addStyleName(ValoTheme.TABLE_BORDERLESS);
    uploadResultTable.addStyleName(ValoTheme.TABLE_SMALL);
    uploadResultTable.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    uploadResultTable.addStyleName("accordion-tab-table-style");

    populateUploadResultTable();
}

From source file:org.eclipse.hawkbit.ui.common.filterlayout.AbstractFilterButtons.java

License:Open Source License

private void setStyle() {
    addStyleName(ValoTheme.TABLE_NO_STRIPES);
    addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES);
    addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    addStyleName(ValoTheme.TABLE_BORDERLESS);
    addStyleName(ValoTheme.TABLE_COMPACT);
}

From source file:org.eclipse.hawkbit.ui.common.table.AbstractTable.java

License:Open Source License

protected AbstractTable(final UIEventBus eventBus, final VaadinMessageSource i18n,
        final UINotification notification, final SpPermissionChecker permChecker) {
    this.eventBus = eventBus;
    this.i18n = i18n;
    this.notification = notification;
    this.permChecker = permChecker;
    setStyleName("sp-table");
    setSizeFull();//from  w  w w .j  a  v a  2 s . c om
    setImmediate(true);
    setHeight(100.0F, Unit.PERCENTAGE);
    addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    addStyleName(ValoTheme.TABLE_SMALL);
    setSortEnabled(false);
    setId(getTableId());
    addCustomGeneratedColumns();
    addDeleteColumn();
    setDefault();
    addValueChangeListener(event -> onValueChange());
    setPageLength(SPUIDefinitions.PAGE_SIZE);
    if (doSubscribeToEventBus()) {
        eventBus.subscribe(this);
    }
}

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

License:Open Source License

private void buildSelectedTable() {

    selectedTable = new Table();
    selectedTable.setId(SPUIDefinitions.TWIN_TABLE_SELECTED_ID);
    selectedTable.setSelectable(true);/* www.j a  v  a  2  s  . c o m*/
    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.CreateUpdateDistSetTypeLayout.java

License:Open Source License

/**
*
*/// w  w  w  . j a va  2  s  .  co  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());
}