KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > wings > SMenuItem


1 /*
2  * $Id: SMenuItem.java,v 1.6 2005/01/31 10:59:51 oliverscheck Exp $
3  * Copyright 2000,2005 wingS development team.
4  *
5  * This file is part of wingS (http://www.j-wings.org).
6  *
7  * wingS is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation; either version 2.1
10  * of the License, or (at your option) any later version.
11  *
12  * Please see COPYING for the complete licence.
13  */

14 package org.wings;
15
16 import org.wings.plaf.MenuBarCG;
17
18 /**
19  * @author <a HREF="mailto:andre@lison.de">Andre Lison</a>
20  * @author <a HREF="mailto:armin.haaf@mercatis.de">Armin Haaf</a>
21  * @version $Revision: 1.6 $
22  */

23 public class SMenuItem extends SButton {
24     protected SComponent menuParent;
25
26     public SMenuItem() {
27     }
28
29     public SMenuItem(String JavaDoc text) {
30         super(text);
31     }
32
33     public SMenuItem(SIcon icon) {
34         super(icon);
35     }
36
37     public SMenuItem(String JavaDoc text, SIcon icon) {
38         super(text, icon);
39     }
40
41     final void setParentMenu(SComponent menuParent) {
42         this.menuParent = menuParent;
43         setParentFrame(menuParent != null ? menuParent.getParentFrame() : null);
44     }
45
46     public SComponent getParentMenu() {
47         return this.menuParent;
48     }
49
50     public void setCG(MenuBarCG cg) {
51         super.setCG(cg);
52     }
53 }
54
55
56
Popular Tags