KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > core > gui > menu > IMenuElement


1 // The contents of this file are subject to the Mozilla Public License Version
2
// 1.1
3
//(the "License"); you may not use this file except in compliance with the
4
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
5
//
6
//Software distributed under the License is distributed on an "AS IS" basis,
7
//WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
8
//for the specific language governing rights and
9
//limitations under the License.
10
//
11
//The Original Code is "The Columba Project"
12
//
13
//The Initial Developers of the Original Code are Frederik Dietz and Timo
14
// Stich.
15
//Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
16
//
17
//All Rights Reserved.
18
package org.columba.core.gui.menu;
19
20 import java.awt.Component JavaDoc;
21 import java.util.Enumeration JavaDoc;
22
23 import javax.swing.JMenuItem JavaDoc;
24
25 public interface IMenuElement {
26
27     public static final int TYPE_ACTION = 0;
28     public static final int TYPE_MENUITEM = 1;
29     public static final int TYPE_COMPONENT = 2;
30     public static final int TYPE_SEPARATOR = 3;
31     public static final int TYPE_PLACEHOLDER = 4;
32     public static final int TYPE_MENU = 5;
33     
34     public boolean isSeparator();
35     public boolean isAction();
36     public boolean isPlaceholder();
37     public boolean isMenu();
38     public boolean isComponent();
39     
40     public JMenuItem JavaDoc getMenuItem();
41     public Component JavaDoc getComponent();
42     
43     public IMenuElement getParent();
44     public void setParent(IMenuElement parent);
45     public Enumeration JavaDoc getChildren();
46     
47     public void add(IMenuElement child);
48     public void insert(IMenuElement child, int position);
49     public void remove(IMenuElement child);
50     public void remove(int index);
51     public int indexOf(IMenuElement child);
52 }
53
Popular Tags