1 /* Copyright (C) 1999, 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
11 /* Status: partially complete, untested. */
13 public abstract class MenuComponent implements java.io.Serializable
15 // Fields from the serialization spec. Decalare others "transient".
18 boolean nameExplicitlySet;
19 boolean newEventsOnly;
20 //AccessibleContext accessibleContext;
22 transient MenuContainer parent;
23 transient java.awt.peer.MenuComponentPeer peer;
25 public MenuComponent()
29 public String getName()
31 if (name == null && !nameExplicitlySet)
32 name = generateName();
36 /** Subclasses should override this to generate unique names like
41 // MenuComponent is abstract.
45 public void setName(String name)
47 nameExplicitlySet = true;
51 public MenuContainer getParent()
56 /** @deprecated Don't use this. */
57 public java.awt.peer.MenuComponentPeer getPeer()
67 public void setFont(Font f)
72 public void removeNotify()
79 /** @deprecated Replaced by dispatchEvent(AWTEvent) */
80 public boolean postEvent(Event evt)
85 public final void dispatchEvent(AWTEvent e)
91 void dispatchEventImpl(AWTEvent e)
93 // This is overridden by subclasses that support events.
96 protected void processEvent(AWTEvent e)
98 // Nothing to do here? This is be overridden by subclasses that
102 protected String paramString()
107 public String toString()
109 return this.getClass().getName() + "[" + paramString() + "]";
112 protected final Object getTreeLock()
114 // FIXME: figure out how the tree lock works.
118 // Accessibility API not yet implemented.
119 // public AccessibleContext getAccessibleContext()