aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/treegrid/TreeGridNoHeaderOnInit.java
blob: fa9ff25b45bd6222964f4b44da893033c90b111f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.vaadin.tests.components.treegrid;

import com.vaadin.annotations.Widgetset;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.ui.Label;
import com.vaadin.ui.TreeGrid;
import com.vaadin.ui.renderers.ComponentRenderer;

@Widgetset("com.vaadin.DefaultWidgetSet")
public class TreeGridNoHeaderOnInit extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        TreeGrid<String> grid = new TreeGrid<>();
        grid.addColumn(Object::toString).setCaption("toString with Caption");
        grid.addColumn(t -> new Label(t), new ComponentRenderer());
        grid.setItems("Foo", "Bar", "Baz");
        grid.removeHeaderRow(0);
        grid.appendFooterRow();
        addComponent(grid);
    }
}