01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/velocity/tags/sakai_2-4-1/tool-api/src/java/org/sakaiproject/cheftool/api/Menu.java $
03: * $Id: Menu.java 6782 2006-03-18 02:48:14Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.cheftool.api;
21:
22: /**
23: * <p>
24: * Menu is an interface for an ordered list of MenuItems.
25: * </p>
26: */
27: public interface Menu extends MenuItem {
28: // CHEF 1.x support
29: public final static String CONTEXT_ACTION = "action";
30:
31: public final static String CONTEXT_MENU = "menu";
32:
33: public final static String STATE_MENU = "menu";
34:
35: /**
36: * Add a menu item to the bar.
37: *
38: * @param entry
39: * The menu item to add.
40: * @return the item.
41: */
42: MenuItem add(MenuItem item);
43:
44: /**
45: * Clear the menu of all items.
46: */
47: void clear();
48:
49: /**
50: * Adjust by removing any dividers at the start or end.
51: */
52: void adjustDividers();
53:
54: /**
55: * Set whether disabled items in this menu should be shown.
56: *
57: * @param value
58: * True to show disabled items, False otherwise.
59: * @return This, for convenience.
60: */
61: Menu setShowdisabled(boolean value);
62:
63: /**
64: * Access whether disabled items in this menu should be shown.
65: *
66: * @return Current setting for show-disabled status (true to show disabled items, false to NOT show disabled items).
67: */
68: boolean getShowdisabled();
69: }
|