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
-
MainMenu(TextEditor)
- This constructor associates a TextEditor and defines the Menu Labels
supported and a LanguageLearner to extend the International Languages
support.
-
changeSpokenLanguage(String)
- Implements the LanguageSpeaker interface and listens to the changes of
the spoken language.
-
getActionListener()
- Returns the ActionListener of thi MenuBar.
-
getLanguageLearner()
- Returns a LanguageLearner for the MenuBar (it's used to learn other
languages).
-
getSpokenLanguages()
- Gets the languages spoken by the MenuBar.
-
setEnabledItem(String, boolean)
- Sets the state of the related MenuItem.
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
getActionListener
public ActionListener getActionListener()
- Returns the ActionListener of thi MenuBar.
- Returns:
- the ActionListener.
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.
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.
getSpokenLanguages
public Enumeration getSpokenLanguages()
- Gets the languages spoken by the MenuBar.
- Returns:
- languages spoken.
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