one.radio
Class Chat

java.lang.Object
  |
  +--one.world.core.Component
        |
        +--one.gui.Application
              |
              +--one.radio.Chat
All Implemented Interfaces:
ActionListener, ChangeListener, EventListener, Serializable

public final class Chat
extends Application
implements ActionListener, ChangeListener

Implementation of the one.radio chat application.

Usage:

    Chat <user-name>
 

Imported and Exported Event Handlers

Exported event handlers:

main
Handles environment events, linked to an environment's main imported event handler.

Imported event handlers:

request
Handles environment events and REP requests, linked to an environment's request exported event handler.
audioSinkAudio
Handles audio messages.
audioSinkControl
Handles audio sink control events.

Version:
$Revision: 1.30 $
See Also:
Serialized Form

Inner classes inherited from class one.gui.Application
Application.Window
 
Inner classes inherited from class one.world.core.Component
Component.HandlerReference, Component.Importer
 
Fields inherited from class one.gui.Application
ACTIVATING, ACTIVE, appName, height, INACTIVE, locationX, locationY, lock, main, mainWindow, operation, request, status, timer, width
 
Constructor Summary
Chat(Environment env, String user)
          Create a new instance of Chat.
 
Method Summary
 void acquire()
          Acquire the resources needed by the chat application.
 void actionPerformed(ActionEvent e)
          Handle the specified action event.
 Application.Window createMainWindow()
          Create the chat application's main window.
static void init(Environment env, Object closure)
          Initialize the one.radio chat application.
 void release()
          Release the resources used by the chat application.
 void start()
          Start this chat application.
 void stateChanged(ChangeEvent e)
          Handle the specified change event.
 
Methods inherited from class one.gui.Application
createMainHandler, getDescriptor, signalError, stop
 
Methods inherited from class one.world.core.Component
declareExported, declareImported, equals, eventHandlers, getDescriptor, getEnvironment, getLinkedHandlers, getLinkedNumber, getTimer, hasEventHandler, hashCode, isFullyLinked, isLinked, isSealed, link, link, run, seal, unbox, undeclare, unlink, wrap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Chat

public Chat(Environment env,
            String user)
Create a new instance of Chat.
Parameters:
env - The environment for the new instance.
user - The user name.
Method Detail

acquire

public void acquire()
Acquire the resources needed by the chat application.
Overrides:
acquire in class Application

start

public void start()
Start this chat application. This method call's the super class's start method and then adjusts the vertical scroll bar of the listen panels text area.
Overrides:
start in class Application
Following copied from class: one.gui.Application
See Also:
Application.locationX, Application.locationY, Application.createMainWindow()

release

public void release()
Release the resources used by the chat application.
Overrides:
release in class Application

createMainWindow

public Application.Window createMainWindow()
Create the chat application's main window.
Overrides:
createMainWindow in class Application
Following copied from class: one.gui.Application
Returns:
The application's main window, or null if the application does not have a main window.

actionPerformed

public void actionPerformed(ActionEvent e)
Handle the specified action event.
Specified by:
actionPerformed in interface ActionListener

stateChanged

public void stateChanged(ChangeEvent e)
Handle the specified change event.
Specified by:
stateChanged in interface ChangeListener

init

public static void init(Environment env,
                        Object closure)
Initialize the one.radio chat application. The closure must be a string array specifying the current user's name.
Parameters:
env - The environment.
closure - The closure.
Throws:
IllegalArgumentException - Signals that the closure is not a string array with at least one entry specifying the user's name.


(C) Copyright 2001 UW CSE