KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > examples > misc > NavigationMenu


1 /*
2  * Copyright 2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.examples.misc;
17
18 import org.apache.myfaces.custom.navmenu.NavigationMenuItem;
19 import org.apache.myfaces.examples.util.GuiUtil;
20
21 /**
22  * @author Thomas Spiegl (latest modification by $Author: matzew $)
23  * @version $Revision: 1.1 $ $Date: 2005/03/24 16:47:10 $
24  */

25 public class NavigationMenu
26 {
27     public NavigationMenuItem[] getInfoItems()
28     {
29         String JavaDoc label = GuiUtil.getMessageResource("nav_Info", null);
30         NavigationMenuItem[] menu= new NavigationMenuItem[1];
31
32         menu[0] = new NavigationMenuItem(label, null, null, true);
33
34         NavigationMenuItem[] items = new NavigationMenuItem[2];
35         menu[0].setNavigationMenuItems(items);
36
37         label = GuiUtil.getMessageResource("nav_Contact", null);
38         items[0] = new NavigationMenuItem(label, "go_contact", "images/help.gif", false);
39
40         label = GuiUtil.getMessageResource("nav_Copyright", null);
41         items[1] = new NavigationMenuItem(label, "go_copyright", "images/help.gif", false);
42
43         return menu;
44     }
45
46 }
47
Popular Tags