Skip to content

Commit bbd6084

Browse files
committed
refactor(demo)!: make demo view extend TabbedDemo instead of VerticalLayout
1 parent 01537ed commit bbd6084

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/test/java/com/flowingcode/vaadin/addons/twincolgrid/TwincolDemoView.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
import com.flowingcode.vaadin.addons.GithubLink;
2424
import com.flowingcode.vaadin.addons.demo.TabbedDemo;
2525
import com.vaadin.flow.component.dependency.StyleSheet;
26-
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
2726
import com.vaadin.flow.router.Route;
2827

2928
@SuppressWarnings("serial")
3029
@Route(value = "twincolgrid", layout = DemoLayout.class)
3130
@StyleSheet("context://frontend/styles/demo-styles.css")
3231
@GithubLink("https://github.com/FlowingCode/TwinColGridAddon")
33-
public class TwincolDemoView extends VerticalLayout {
32+
public class TwincolDemoView extends TabbedDemo {
3433

3534
private static final String BOUND_DEMO = "Bound";
3635
private static final String FILTERABLE_DEMO = "Filterable";
@@ -40,11 +39,9 @@ public class TwincolDemoView extends VerticalLayout {
4039
private static final String DRAGNDROP_SOURCE = "https://github.com/FlowingCode/TwinColGridAddon/blob/master/src/test/java/com/flowingcode/vaadin/addons/twincolgrid/DragAndDropDemo.java";
4140

4241
public TwincolDemoView() {
43-
TabbedDemo demo = new TabbedDemo();
44-
demo.addDemo(new DragAndDropDemo(), DRAGNDROP_DEMO, DRAGNDROP_SOURCE);
45-
demo.addDemo(new FilterableDemo(), FILTERABLE_DEMO, FILTERABLE_SOURCE);
46-
demo.addDemo(new BoundDemo(), BOUND_DEMO, BOUND_SOURCE);
47-
add(demo);
42+
addDemo(new DragAndDropDemo(), DRAGNDROP_DEMO, DRAGNDROP_SOURCE);
43+
addDemo(new FilterableDemo(), FILTERABLE_DEMO, FILTERABLE_SOURCE);
44+
addDemo(new BoundDemo(), BOUND_DEMO, BOUND_SOURCE);
4845
setSizeFull();
4946
}
5047
}

0 commit comments

Comments
 (0)