KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > explorer > core > menu > api > MenuDescription


1 /*====================================================================
2
3 Objectweb Explorer Framework
4 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Jerome Moroy, Philippe Merle.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26 package org.objectweb.util.explorer.core.menu.api;
27
28 import org.objectweb.util.explorer.core.common.api.Description;
29
30 /**
31  *
32  *
33  * @author <a HREF="mailto:Jerome.Moroy@lifl.fr">Jérôme Moroy</a>,
34  * <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>.
35  *
36  * @version 0.1
37  */

38 public interface MenuDescription
39          extends Description
40 {
41
42     /**
43      * To know if the description is used to generate popup menu or menu bar menu.
44      * The associated values are respectively <code>popup</code> and <code>bar</code>
45      * This method is only used in the SWT context.
46      * @param descriptionType
47      */

48     public void setDescriptionType(String JavaDoc descriptionType);
49     
50     public void setInheritTreeMenu(boolean inheritTreeMenu);
51     public boolean getInheritTreeMenu();
52     
53     public void setInheritTypeMenu(boolean inheritTypeMenu);
54     public boolean getInheritTypeMenu();
55
56     /**
57      * Adds a MenuElement into the MenuDescription.
58      * @param menuElement
59      */

60     public void addMenuElement(MenuElement menuElement);
61     
62     /**
63      * Adds an array of MenuElement objects into the MenuDescription.
64      * @param menuElement
65      */

66     public void addMenuElements(MenuElement[] menuElements);
67         
68     /**
69      * Returns the MenuElement objects defined for the menu itself.
70      * @return A list of menu elements.
71      */

72     public MenuElement[] getMenuElements();
73     
74     /**
75      * Returns the MenuElement objects defined for the children of the menu.
76      * @return A list of menu elements.
77      */

78     public MenuElement[] getChildrenMenuElements();
79     
80     /**
81      * Returns the MenuElements of this menu. Is consists in a merge between the menu elements defined
82      * for the menu itself and those defined for its children. A separator is included between these two
83      * kinds of elements is necessary.
84      * @return A list of menu elements.
85      * @see MenuDescription#getMenuElements()
86      * @see MenuDescription#getChildrenMenuElements()
87      */

88     public MenuElement[] getAllMenuElements();
89     
90 }
91
Popular Tags