Class powersoft.jcm.ui.MenuComponent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class powersoft.jcm.ui.MenuComponent

java.lang.Object
   |
   +----powersoft.jcm.ui.MenuComponent

public class MenuComponent
extends Object
A generic menu component.

Variable Index

 o _AWTComponent
 o _font
 o _text

Constructor Index

 o MenuComponent()
Menu components are not instantiated directly.

Method Index

 o create()
Creates a new menu component.
 o create(MenuContainer)
Creates a new menu component.
 o create(MenuContainer, String)
Creates a new menu component.
 o createAWTComponent(String)
Creates the AWT menu component.
 o destroy()
 o findMenuComponent(MenuComponent, boolean)
 o getAWTMenuComponent()
Gets the raw AWT menu component that is linked to this object.
 o getFont()
Gets the font used by the component for drawing text.
 o getFont(boolean)
Gets the font used by the component.
 o getName()
Gets the name of the menu component.
 o getParent()
Gets the parent of the component.
 o getText()
Gets the text of the component.
 o getUserData()
 o makeComponent(MenuContainer, String)
Create the component.
 o processAWTEvent(Event)
 o setFont(Font)
Sets the font used by the component for drawing text.
 o setName(String)
Sets the name of the menu component.
 o setParent(MenuContainer)
Sets the parent of the component.
 o setText(String)
Sets the text of the component.
 o setUserData(Object)

Variables

 o _AWTComponent
  protected MenuComponent _AWTComponent
 o _text
  protected String _text
 o _font
  protected Font _font

Constructors

 o MenuComponent
  public MenuComponent()
Menu components are not instantiated directly.

Methods

 o getAWTMenuComponent
  public MenuComponent getAWTMenuComponent()
Gets the raw AWT menu component that is linked to this object.
 o getFont
  public Font getFont()
Gets the font used by the component for drawing text. If no font was set, searches up the parent tree until one is found. If none was found, returns null.
See Also:
setFont
 o getFont
  public Font getFont(boolean searchParents)
Gets the font used by the component.
Parameters:
searchParents - If true, searches up the parent tree until a font is found, or returns null. If false, returns the font setting for the component, which might be null.
 o setFont
  public void setFont(Font font)
Sets the font used by the component for drawing text.
See Also:
getFont
 o getName
  public String getName()
Gets the name of the menu component.
See Also:
setName
 o setName
  public void setName(String name)
Sets the name of the menu component.
See Also:
getName
 o getParent
  public synchronized MenuContainer getParent()
Gets the parent of the component.
 o setParent
  public synchronized void setParent(MenuContainer parent)
Sets the parent of the component. Automatically calls the parent's addMenuComponent method, first removing it from its old parent if necessary.
Parameters:
parent - the new parent container of the component
 o getText
  public String getText()
Gets the text of the component.
See Also:
setText
 o setText
  public void setText(String text)
Sets the text of the component.
See Also:
getText
 o getUserData
  public Object getUserData()
 o setUserData
  public void setUserData(Object userData)
 o create
  public boolean create()
Creates a new menu component.
Returns:
true if the menu component was successfully created; false otherwise
See Also:
destroy
 o create
  public boolean create(MenuContainer parent)
Creates a new menu component.
Parameters:
parent - Specifies the parent or owner of the menu component to be created. It may be null.
Returns:
true if the menu component was successfully created; false otherwise
See Also:
destroy
 o create
  public boolean create(MenuContainer parent,
                        String text)
Creates a new menu component.
Parameters:
parent - Specifies the parent or owner of the menu component to be created. It may be null.
text - the title of the menu.
Returns:
true if the menu component was successfully created; false otherwise
See Also:
destroy
 o destroy
  public synchronized boolean destroy()
 o findMenuComponent
  public MenuComponent findMenuComponent(MenuComponent awtComp,
                                         boolean recurse)
 o createAWTComponent
  protected MenuComponent createAWTComponent(String text)
Creates the AWT menu component.
 o makeComponent
  protected boolean makeComponent(MenuContainer parent,
                                  String text)
Create the component. This method is called by the create methods to actually do the work.

 o processAWTEvent
  protected boolean processAWTEvent(Event event)

All Packages  Class Hierarchy  This Package  Previous  Next  Index