Project

General

Profile

Download (813 Bytes) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.vaadin.ui;
2

    
3
import com.vaadin.server.Resource;
4
import com.vaadin.ui.Component;
5

    
6
/**
7
 * MainMenu acts as bean interface for components that appear as application
8
 * main menu. Which main menu implementation will be shown is decided on runtime
9
 * by dependency injection.
10
 *
11
 * @author Peter / Vaadin
12
 *
13
 */
14
public interface MainMenu extends CanCastComponent {
15

    
16
	/**
17
	 * Adds new menu item with given caption and icon to the menu.
18
	 *
19
	 * @param caption
20
	 * @param icon
21
	 * @param navigationResource
22
	 * @return MainMenuItem representing a handle for the added item
23
	 */
24
	MainMenuItem addMenuItem(String caption, Resource icon, String navigationResource);
25

    
26
	public void addMenuComponent(Component component);
27

    
28
	public interface MainMenuItem {
29
		String getCaption();
30

    
31
		Resource getIcon();
32
	}
33
}
(5-5/9)