All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tea.awt.frame.editor.MainMenu

java.lang.Object
   |
   +----java.awt.MenuComponent
           |
           +----java.awt.MenuBar
                   |
                   +----tea.awt.frame.editor.MainMenu

public class MainMenu
extends MenuBar
implements LanguageSpeaker

This is a class used to build an implementation of MenuBar explicitely written for the TextEditor Frame. It adds all the necessary menus for the actionCommands raised by the TextEditor. It also defines the support for International Languages (directly supported English and Italian).

Version:
1.0 beta - 31 May 1997
Author:
Leonardo Boselli
See Also:
TextEditor

Constructor Index

 o MainMenu(TextEditor)
This constructor associates a TextEditor and defines the Menu Labels supported and a LanguageLearner to extend the International Languages support.

Method Index

 o changeSpokenLanguage(String)
Implements the LanguageSpeaker interface and listens to the changes of the spoken language.
 o getActionListener()
Returns the ActionListener of thi MenuBar.
 o getLanguageLearner()
Returns a LanguageLearner for the MenuBar (it's used to learn other languages).
 o getSpokenLanguages()
Gets the languages spoken by the MenuBar.
 o setEnabledItem(String, boolean)
Sets the state of the related MenuItem.

Constructors

 o MainMenu
 public MainMenu(TextEditor te)
This constructor associates a TextEditor and defines the Menu Labels supported and a LanguageLearner to extend the International Languages support.

Parameters:
te - the TextEditor.
See Also:
LanguageLearner

Methods

 o getActionListener
 public ActionListener getActionListener()
Returns the ActionListener of thi MenuBar.

Returns:
the ActionListener.
 o setEnabledItem
 public void setEnabledItem(String action,
                            boolean enabled)
Sets the state of the related MenuItem. The MenuItem is selected through its actionCommnad. If the MenuItem is inactive it can't send its actionCommand to the ActionListener.

Parameters:
action - the actionCommand of the selected MenuItem.
active - the active or inactive flag.
 o changeSpokenLanguage
 public boolean changeSpokenLanguage(String l)
Implements the LanguageSpeaker interface and listens to the changes of the spoken language.

Parameters:
l - the spoken language.
Returns:
if the language is supported or not.
 o getSpokenLanguages
 public Enumeration getSpokenLanguages()
Gets the languages spoken by the MenuBar.

Returns:
languages spoken.
 o getLanguageLearner
 public LanguageLearner getLanguageLearner()
Returns a LanguageLearner for the MenuBar (it's used to learn other languages).

Returns:
the LanguageLearner.

All Packages  Class Hierarchy  This Package  Previous  Next  Index