All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tea.awt.dialog.BoxDialog

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----tea.awt.dialog.BoxDialog

public abstract class BoxDialog
extends Dialog
implements ActionListener, LanguageSpeaker

This is an abstract class that performs some common tasks of Dialogs. It defines support for international languages, persistent properties and action delivering events.

Version:
1.0 beta - 31 May 1997
Author:
Leonardo Boselli
See Also:
PropertiesOwner, LanguageSpeaker

Variable Index

 o keyAdapter
An Adapter that listens to KeyEvents and takes the right action.
 o name
the name od the dialog.
 o propertiesOwner

Constructor Index

 o BoxDialog(Frame, String, String, boolean)
Construcs the Box.

Method Index

 o actionPerformed(ActionEvent)
Implements the ActionListener interface and sends commands to the ActionListeners.
 o addActionListener(ActionListener)
Adds an ActionListener to the Dialog.
 o afterReply()
Method to be performed after the action is delivered to ActioListeners.
 o changeSpokenLanguage(String)
Implements the LanguageSpeaker interface and listens to the changes of the spoken language.
 o close()
Closes the dialog.
 o getActionCommand()
Gets the actionCommand of the Dialog.
 o getLanguageLearner()
Returns a LanguageLearner for the Dialog (it's used to learn other languages).
 o getPropLocation()
Gets the stored location of the Dialog (Properties support).
 o getSpokenLanguages()
Gets the languages spoken by the Dialog.
 o removeActionListener(ActionListener)
Removes an ActionListener from the Dialog.
 o reply()
This method is called by actionPerformed() when the contents of the dialog are accepted by the user and sent to the ActionListeners.
 o setActionCommand(String)
Sets the actionCommand of the Dialog.
 o setPropLocation(Point)
Sets the location of the Dialog in the persistent properties.
 o setVisible(boolean)
Overloads the setVisible() method to perform some common tasks of dialogs (e.g.

Variables

 o propertiesOwner
 protected PropertiesOwner propertiesOwner
 o name
 protected String name
the name od the dialog. Used to store persistent properties.

 o keyAdapter
 protected KeyAdapter keyAdapter
An Adapter that listens to KeyEvents and takes the right action.

Constructors

 o BoxDialog
 public BoxDialog(Frame parent,
                  String title,
                  String name,
                  boolean modal)
Construcs the Box.

Parameters:
parent - the Frame parent.
title - the title.
name - the name.
modal - the modal dialog flag.

Methods

 o setVisible
 public void setVisible(boolean v)
Overloads the setVisible() method to perform some common tasks of dialogs (e.g. persistent properties storing).

Parameters:
v - show or hide?
Overrides:
setVisible in class Component
 o close
 protected void close()
Closes the dialog.

 o addActionListener
 public synchronized void addActionListener(ActionListener l)
Adds an ActionListener to the Dialog.

Parameters:
l - the ActionListener.
 o removeActionListener
 public synchronized void removeActionListener(ActionListener l)
Removes an ActionListener from the Dialog.

Parameters:
l - the ActionListener.
 o getActionCommand
 public String getActionCommand()
Gets the actionCommand of the Dialog.

Returns:
the action command.
 o setActionCommand
 public void setActionCommand(String ac)
Sets the actionCommand of the Dialog.

Parameters:
ac - the action command.
 o actionPerformed
 public void actionPerformed(ActionEvent ae)
Implements the ActionListener interface and sends commands to the ActionListeners.

Parameters:
ae - the ActionEvent.
 o reply
 public void reply()
This method is called by actionPerformed() when the contents of the dialog are accepted by the user and sent to the ActionListeners. ActionListeners.

 o afterReply
 public void afterReply()
Method to be performed after the action is delivered to ActioListeners.

 o getPropLocation
 protected Point getPropLocation()
Gets the stored location of the Dialog (Properties support).

Returns:
the location.
 o setPropLocation
 protected void setPropLocation(Point loc)
Sets the location of the Dialog in the persistent properties.

Parameters:
loc - the location.
 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 Dialog.

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

Returns:
the LanguageLearner.

All Packages  Class Hierarchy  This Package  Previous  Next  Index