|
21 | 21 |
|
22 | 22 | import com.flowingcode.vaadin.addons.DemoLayout; |
23 | 23 | import com.flowingcode.vaadin.addons.GithubLink; |
24 | | -import com.flowingcode.vaadin.addons.demo.impl.TabbedDemoImpl; |
| 24 | +import com.flowingcode.vaadin.addons.demo.TabbedDemo; |
25 | 25 | import com.vaadin.flow.component.dependency.StyleSheet; |
26 | | -import com.vaadin.flow.component.orderedlayout.VerticalLayout; |
27 | 26 | import com.vaadin.flow.router.Route; |
28 | 27 |
|
29 | 28 | @SuppressWarnings("serial") |
30 | 29 | @Route(value = "orgchart", layout = DemoLayout.class) |
31 | 30 | @StyleSheet("context://frontend/styles/orgchart/demo-styles.css") |
32 | 31 | @StyleSheet("context://frontend/styles/orgchart/font-awesome.css") |
33 | 32 | @GithubLink("https://github.com/FlowingCode/OrgChartAddon") |
34 | | -public class OrgchartDemoView extends VerticalLayout { |
| 33 | +public class OrgchartDemoView extends TabbedDemo { |
35 | 34 |
|
36 | 35 | private static final String DRAGNDROP_DEMO = "Drag and Drop"; |
37 | 36 | private static final String BOTTOMTOP_DEMO = "Bottom to Top"; |
38 | 37 | private static final String DRAGNDROP_SOURCE = "https://github.com/FlowingCode/OrgChartAddon/blob/master/src/test/java/com/flowingcode/vaadin/addons/orgchart/DragAndDropExportDemo.java"; |
39 | 38 | private static final String BOTTOMTOP_SOURCE = "https://github.com/FlowingCode/OrgChartAddon/blob/master/src/test/java/com/flowingcode/vaadin/addons/orgchart/BottomTopDemo.java"; |
40 | 39 |
|
41 | 40 | public OrgchartDemoView() { |
42 | | - TabbedDemoImpl<DragAndDropExportDemo> orgDemo = new TabbedDemoImpl<>(new DragAndDropExportDemo(), |
43 | | - DRAGNDROP_DEMO, DRAGNDROP_SOURCE); |
44 | | - orgDemo.addDemo(new BottomTopDemo(), BOTTOMTOP_DEMO, BOTTOMTOP_SOURCE); |
45 | | - setSizeFull(); |
46 | | - add(orgDemo); |
| 41 | + addDemo(new DragAndDropExportDemo(), DRAGNDROP_DEMO, DRAGNDROP_SOURCE); |
| 42 | + addDemo(new BottomTopDemo(), BOTTOMTOP_DEMO, BOTTOMTOP_SOURCE); |
47 | 43 | } |
48 | 44 | } |
0 commit comments