1 /**
2 * Copyright 2010 The Kuali Foundation Licensed under the
3 * Educational Community License, Version 2.0 (the "License"); you may
4 * not use this file except in compliance with the License. You may
5 * obtain a copy of the License at
6 *
7 * http://www.osedu.org/licenses/ECL-2.0
8 *
9 * Unless required by applicable law or agreed to in writing,
10 * software distributed under the License is distributed on an "AS IS"
11 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12 * or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16 package org.kuali.student.common.ui.client.widgets.menus;
17
18 import java.util.List;
19
20 import org.kuali.student.common.ui.client.widgets.menus.impl.KSBasicMenuImpl;
21
22 import com.google.gwt.core.client.GWT;
23
24 public class KSBasicMenu extends KSBasicMenuAbstract{
25
26 private KSBasicMenuAbstract basicMenu = GWT.create(KSBasicMenuImpl.class);
27
28 public KSBasicMenu(){
29 initWidget(basicMenu);
30 }
31
32 /**
33 * Populates the menu with the items set through setItems.
34 *
35 * @see org.kuali.student.common.ui.client.widgets.menus.KSMenu#populateMenu()
36 */
37 @Override
38 protected void populateMenu() {
39 basicMenu.populateMenu();
40 }
41
42 /**
43 * Get the list of KSMenuItemData used in this accordion menu.
44 *
45 * @return the List of KSMenuItemData used in this accordion menu.
46 *
47 * @see org.kuali.student.common.ui.client.widgets.menus.KSMenu#getItems()
48 */
49 @Override
50 public List<KSMenuItemData> getItems() {
51 return basicMenu.getItems();
52 }
53
54 /**
55 * Sets the KSMenuItemData used in this accordion menu.
56 *
57 * @param items the list of KSMenuItemData used in this accordion menu
58 *
59 */
60 @Override
61 public void setItems(List<KSMenuItemData> items) {
62 basicMenu.setItems(items);
63 }
64
65 @Override
66 public boolean isNumberAllItems() {
67 return basicMenu.isNumberAllItems();
68 }
69
70 @Override
71 public void setNumberAllItems(boolean numberAllItems) {
72 basicMenu.setNumberAllItems(numberAllItems);
73 }
74
75 @Override
76 public void setDescription(String description) {
77 basicMenu.setDescription(description);
78
79 }
80
81 @Override
82 public void setTitle(String title) {
83 basicMenu.setTitle(title);
84
85 }
86
87 @Override
88 public boolean selectMenuItem(String[] hierarchy) {
89 return basicMenu.selectMenuItem(hierarchy);
90 }
91
92 public void clearSelected(){
93 basicMenu.clearSelected();
94 }
95
96 }