1
|
package com.vaadin.devday.ui;
|
2
|
|
3
|
import com.vaadin.server.Resource;
|
4
|
|
5
|
/**
|
6
|
* MainMenu acts as bean interface for components that appear as application
|
7
|
* main menu. Which main menu implementation will be shown is decided on runtime
|
8
|
* by dependency injection.
|
9
|
*
|
10
|
* @author Peter / Vaadin
|
11
|
*
|
12
|
*/
|
13
|
public interface MainMenu extends CanCastComponent {
|
14
|
|
15
|
/**
|
16
|
* Adds new menu item with given caption and icon to the menu.
|
17
|
*
|
18
|
* @param caption
|
19
|
* @param icon
|
20
|
* @param navigationResource
|
21
|
* @return MainMenuItem representing a handle for the added item
|
22
|
*/
|
23
|
MainMenuItem addMenuItem(String caption, Resource icon, String navigationResource);
|
24
|
|
25
|
public interface MainMenuItem {
|
26
|
String getCaption();
|
27
|
|
28
|
Resource getIcon();
|
29
|
}
|
30
|
}
|