java::awt::MenuComponent Class Reference

Inheritance diagram for java::awt::MenuComponent:

Inheritance graph
java::awt::MenuBarjava::awt::MenuItemjava::lang::Objectjava::lang::Interfacejava::lang::Syncjava::lang::Lockjava::lang::ScopeAdapterjava::awt::CheckboxMenuItemjava::awt::Menu
[legend]
Collaboration diagram for java::awt::MenuComponent:

Collaboration graph
java::lang::Objectjava::lang::Interfacejava::lang::ObjectRefjava::lang::Syncjava::lang::Lockjava::lang::ScopeAdapterjava::lang::Comparable
[legend]

List of all members.


Detailed Description

The abstract class MenuComponent is the superclass of all menu-related components.

In this respect, the class MenuComponent is analogous to the abstract superclass Component for AWT components.

Menu components receive and process AWT events, just as components do, through the method processEvent.

Version:
1.70, 01/23/03
Author:
Arthur van Hoff
Since:
JDK1.0

Public Member Functions

virtual ~MenuComponent ()
virtual String getName () const
 Gets the name of the menu component.
virtual void setName (const String &name)
 Sets the name of the component to the specified string.
virtual Ref
< MenuContainer
getParent () const
 Returns the parent container for this menu component.
virtual Ref< FontgetFont () const
 Gets the font used for this menu component.
virtual void setFont (const Ref< Font > &f)
 Sets the font to be used for this menu component to the specified font.
virtual void addNotify ()
 Creates the menu item's peer.
virtual void removeNotify ()
 Removes the menu component's peer.
virtual String toString () const
 Returns a representation of this menu component as a string.

Static Public Member Functions

static Ref< SyncgetTreeLock ()
 Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.

Public Attributes

ObjectRef impl
 Internal Implementation object.

Protected Member Functions

 MenuComponent (const Object *_impl)

Constructor & Destructor Documentation

virtual java::awt::MenuComponent::~MenuComponent (  )  [virtual]

java::awt::MenuComponent::MenuComponent ( const Object _impl  )  [protected]


Member Function Documentation

static Ref<Sync> java::awt::MenuComponent::getTreeLock (  )  [static]

Gets this component's locking object (the object that owns the thread sychronization monitor) for AWT component-tree and layout operations.

Returns:
this component's locking object

virtual String java::awt::MenuComponent::getName (  )  const [virtual]

Gets the name of the menu component.

Returns:
the name of the menu component
See also:
java.awt.MenuComponent::setName(java.lang.String)
Since:
JDK1.1

virtual void java::awt::MenuComponent::setName ( const String name  )  [virtual]

Sets the name of the component to the specified string.

Parameters:
name the name of the menu component
See also:
java.awt.MenuComponent::getName
Since:
JDK1.1

virtual Ref<MenuContainer> java::awt::MenuComponent::getParent (  )  const [virtual]

Returns the parent container for this menu component.

Returns:
the menu component containing this menu component, or null if this menu component is the outermost component, the menu bar itself

virtual Ref<Font> java::awt::MenuComponent::getFont (  )  const [virtual]

Gets the font used for this menu component.

Returns:
the font used in this menu component, if there is one; null otherwise
See also:
java.awt.MenuComponent::setFont

Reimplemented in java::awt::Menu, and java::awt::MenuBar.

virtual void java::awt::MenuComponent::setFont ( const Ref< Font > &  f  )  [virtual]

Sets the font to be used for this menu component to the specified font.

This font is also used by all subcomponents of this menu component, unless those subcomponents specify a different font.

Some platforms may not support setting the font of a menu component; in this case, calling setFont will have no effect.

Parameters:
f the font to be set
See also:
java.awt.MenuComponent::getFont

virtual void java::awt::MenuComponent::addNotify (  )  [virtual]

Creates the menu item's peer.

The peer allows us to modify the appearance of the menu item without changing its functionality.

virtual void java::awt::MenuComponent::removeNotify (  )  [virtual]

Removes the menu component's peer.

The peer allows us to modify the appearance of the menu component without changing the functionality of the menu component.

virtual String java::awt::MenuComponent::toString (  )  const [virtual]

Returns a representation of this menu component as a string.

Returns:
a string representation of this menu component

Reimplemented from java::lang::Object.

Reimplemented in java::awt::CheckboxMenuItem, java::awt::Menu, java::awt::MenuBar, and java::awt::MenuItem.


Member Data Documentation

ObjectRef java::awt::MenuComponent::impl

Internal Implementation object.

Reimplemented from java::lang::Sync.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:06 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3