KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > MenuView


1 /*
2   Copyright (C) 2002 Laurent Martelli.
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17   USA */

18
19 package org.objectweb.jac.aspects.gui;
20
21 /**
22  * The GUI target independent menu. Submenus, actions, and separators
23  * appears in the order they are added into the menu. */

24
25 public interface MenuView extends View {
26
27     /**
28      * Adds a sub-menu in this menu.
29      *
30      * @param label the sub-menu's label
31      * @param icon the sub-menu's icon
32      * @param submenu the submenu */

33     void addSubMenu(String JavaDoc label, String JavaDoc icon, MenuView submenu);
34
35     /**
36      * Adds an action to this menu.
37      *
38      * @param label the sub-menu's label
39      * @param icon the sub-menu's icon
40      * @param callback the actual action */

41     void addAction(String JavaDoc label, String JavaDoc icon, Callback callback);
42
43     /**
44      * Adds a separator in this menu. */

45     void addSeparator();
46
47     /**
48      * Sets the position of the menu bar (TOP||BOTTOM||LEFT||RIGHT).
49      *
50      * @param position the position. If null, use the default position
51      * @see Menu */

52     void setPosition(String JavaDoc position);
53
54     /**
55      * Gets the position of the menu bar (TOP||BOTTOM||LEFT||RIGHT).
56      *
57      * @return the position
58      * @see Menu */

59     String JavaDoc getPosition();
60 }
61
Popular Tags