Skip to content

Commit cc5af83

Browse files
committed
Add AbstractFcAppRouterLayout demo
1 parent c7c974d commit cc5af83

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.flowingcode.addons.applayout;
2+
3+
import com.flowingcode.addons.applayout.menu.MenuItem;
4+
import com.vaadin.flow.component.HasElement;
5+
6+
public class AbstractLayoutDemo extends AbstractFcAppRouterLayout{
7+
8+
@Override
9+
protected void configure(AppLayout app) {
10+
app.setMenuItems(
11+
new MenuItem("Item 1"),
12+
new MenuItem("Item 2")
13+
);
14+
}
15+
16+
@Override
17+
public void showRouterLayoutContent(AppLayout app, HasElement content) {
18+
super.showRouterLayoutContent(app, content);
19+
}
20+
21+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.flowingcode.addons.applayout;
2+
3+
import com.vaadin.flow.component.html.Div;
4+
import com.vaadin.flow.component.html.Span;
5+
import com.vaadin.flow.router.Route;
6+
7+
@Route(value="view", layout = AbstractLayoutDemo.class)
8+
public class AbstractLayoutView extends Div {
9+
10+
{add(new Span("Hello world"));}
11+
12+
}

0 commit comments

Comments
 (0)