speech.tools
Class SpeechStateGuiMaker

java.lang.Object
  |
  +--agentland.gui.GuiMaker
        |
        +--speech.tools.SpeechStateGuiMaker
All Implemented Interfaces:
GuiElement, Serializable

public class SpeechStateGuiMaker
extends GuiMaker

The GuiMaker for the visualizing the state of the speech system (whether is is asleep or awake). This gui consists of a 200x150 (default) JButton that has a dark image of HAL if the speech system is asleep, or a bright image of HAL if the speech system is awake. In addition, the outer border of the JButton turns green if the speech system is awake, and black if the speech system is asleep. This gui listens for the "listen.stateChanged" notifications sent out by GrammarCenter.

See Also:
GuiMaker, Serialized Form

Inner Class Summary
 class SpeechStateGuiMaker.AwakeListener
          A listener that requests the speech system wake up when the JButton is pressed.
 
Fields inherited from class agentland.gui.GuiMaker
container, family, familyClassName, familyName, host, name, parent, visible
 
Constructor Summary
SpeechStateGuiMaker(String name, AgentID parent)
          Creates a new SpeechStateGuiMaker instance.
 
Method Summary
 Container getGui()
          Returns the main GUI panel.
 void init()
          Initializes the Swing components, and adds a spy.
 void tell(Secret secret)
          Method that is automagically called when a notification is received.
 void updateState(int iState)
          Update's this GUI's internal state.
 
Methods inherited from class agentland.gui.GuiMaker
addSpy, equals, getContainer, getFamily, getFamilyObject, getName, getParent, hashCode, hideMe, installed, killMe, log, log, log, log, notify, reliesOn, reliesOn, setFamily, setFamilyClass, setHost, setName, setParent, showMe, toString, visible
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpeechStateGuiMaker

public SpeechStateGuiMaker(String name,
                           AgentID parent)
Creates a new SpeechStateGuiMaker instance.
Parameters:
name - a String value
parent - an AgentID value
Method Detail

init

public void init()
Initializes the Swing components, and adds a spy.
Overrides:
init in class GuiMaker

getGui

public Container getGui()
Returns the main GUI panel.
Overrides:
getGui in class GuiMaker
Returns:
a Container value

tell

public void tell(Secret secret)
Method that is automagically called when a notification is received.
Overrides:
tell in class GuiMaker
Parameters:
secret - a Secret value

updateState

public void updateState(int iState)
Update's this GUI's internal state.
Parameters:
iState - an int value