-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
76 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/org/example/views/maplibre/MapLibreMenuGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.example.views.maplibre; | ||
|
||
import org.vaadin.firitin.appframework.MenuItem; | ||
|
||
@MenuItem(title = "MapLibre", openByDefault = true) | ||
public class MapLibreMenuGroup { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
src/main/java/org/example/views/viritin/MainLayoutView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package org.example.views.viritin; | ||
|
||
import com.vaadin.flow.component.Component; | ||
import com.vaadin.flow.component.icon.VaadinIcon; | ||
import com.vaadin.flow.component.notification.Notification; | ||
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | ||
import com.vaadin.flow.router.Route; | ||
import org.example.Addon; | ||
import org.example.DefaultLayout; | ||
import org.vaadin.firitin.appframework.MenuItem; | ||
import org.vaadin.firitin.components.RichText; | ||
import org.vaadin.firitin.fields.CommaSeparatedStringField; | ||
import org.vaadin.firitin.fields.DurationField; | ||
import org.vaadin.firitin.fields.ElementCollectionField; | ||
import org.vaadin.firitin.fields.EnumSelect; | ||
import org.vaadin.firitin.form.BeanValidationForm; | ||
|
||
import java.time.Duration; | ||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
@Route(layout = DefaultLayout.class) | ||
@MenuItem(icon = VaadinIcon.LAYOUT, parent = ViritinMenuGroup.class) | ||
@Addon("flow-viritin") | ||
public class MainLayoutView extends VerticalLayout { | ||
|
||
public MainLayoutView() { | ||
add(new RichText().withMarkDown(""" | ||
# AppLayout with automatic menu for small to medium size applications | ||
Viritin provides a simple way to create a main layout and top level navigation for your application. | ||
Nowadays based on the AppLayout and SideNav components from the Vaadin core. | ||
This example uses this MainLayout component of which the DefaultLayout is a subclass. | ||
The menu is built automatically for views that define the DefaultLayout as their layout. | ||
*Add a view to your app -> it automatically appears in the menu.* | ||
Only views for which the user has access (role based check) are shown in the menu and | ||
dynamically registered routes are supported. | ||
To customize the menu (icons, order, custom title etc), you can use the *@MenuItem annotation*. | ||
In Vaadin 24.5 and later Vaadin ships a similar in nature @Menu annotation. Latest Viritin | ||
versions support both annotations, but to define hierarcy and some other more advanced features | ||
you need to use the Viritin specific @MenuItem annotation. | ||
""")); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/org/example/views/viritin/ViritinMenuGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.example.views.viritin; | ||
|
||
import org.vaadin.firitin.appframework.MenuItem; | ||
|
||
@MenuItem(title = "Viritin", openByDefault = true) | ||
public class ViritinMenuGroup { | ||
} |