com.ibm.tspaces.examples.services
Class Demo.ActionButton

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.ibm.tspaces.examples.services.Demo.ActionButton
Enclosing class:
Demo

public class Demo.ActionButton
extends java.lang.Thread
implements Demo.ButtonInterface

This inner class controls the buttons that actually start the programs

Author:
Joseph Gebis
See Also:
Demo

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Demo.ActionButton(java.awt.Component comp, java.lang.String command)
          Constructor.
Demo.ActionButton(java.awt.Component comp, java.lang.String command, java.lang.String name)
          The heart of the ActionThread class
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Called when an action is performed on this button.
 boolean getStatus()
          Returns the running status of the thread associated with this class.
 java.lang.String retName()
          Returns the name of this button as a string.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Demo.ActionButton

public Demo.ActionButton(java.awt.Component comp,
                         java.lang.String command)
Constructor.
Parameters:
comp - the component associated with this button
command - the command to execute

Demo.ActionButton

public Demo.ActionButton(java.awt.Component comp,
                         java.lang.String command,
                         java.lang.String name)
The heart of the ActionThread class
Parameters:
comp - the component associated with this class
command - the command to execute
name - the name of the command
Method Detail

getStatus

public boolean getStatus()
Returns the running status of the thread associated with this class.
Specified by:
getStatus in interface Demo.ButtonInterface
Returns:
the running status of the thread associated with this class

retName

public java.lang.String retName()
Returns the name of this button as a string.
Specified by:
retName in interface Demo.ButtonInterface
Returns:
the name of this button

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Called when an action is performed on this button.
Parameters:
e - the ActionEvent performed