MicroTester.v2_0
Class TesterMainWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--MicroTester.v2_0.TesterMainWindow
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class TesterMainWindow
extends java.awt.Frame
implements java.awt.event.ActionListener

Main application window.

See Also:
Serialized Form

Field Summary
private  boolean isStatusWorking
           
private  boolean isWorking
           
private static java.lang.String LF
          Line-feed
private  java.awt.Menu mBasic
           
private  java.awt.MenuBar menuBar
           
private  java.awt.Menu mExtended
           
private  java.awt.Menu mFile
           
private  java.awt.MenuItem miActorMove
           
private  java.awt.MenuItem miClear
           
private  java.awt.MenuItem miClearLog
           
private  java.awt.MenuItem miExit
           
private  java.awt.MenuItem miPlugIn
           
private  java.awt.MenuItem miPlugOut
           
private  java.awt.MenuItem miRegister
           
private  java.awt.MenuItem miRegisterCancel
           
private  java.awt.MenuItem miRoleSession
           
private  java.awt.MenuItem miShowLogLong
           
private  java.awt.MenuItem miShowLogShort
           
private  java.awt.MenuItem miStartScript
           
private  java.awt.MenuItem miUpgrade
           
private  java.awt.Menu mLog
           
private  java.lang.String operationCmd
           
private  java.lang.String[] operationParams
           
private  java.util.TimerTask operationTask
           
private  java.util.Timer operationTimer
           
private  java.awt.TextArea output
           
 MicroTesterBase parent
          Reference to the owner entity.
private  long startTime
           
private  java.awt.TextField statusField
           
private  java.awt.Label statusLabel
           
private  java.util.TimerTask statusTask
           
private  java.lang.String statusText
           
private  java.util.Timer statusTimer
           
private  int statusWorkingInt
           
private  long stopTime
           
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TesterMainWindow(MicroTesterBase pMicroTester, java.lang.String title, java.awt.Color bgColor)
          Constructor that builds the window
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Proseccing of the different events
 void disposeFrame()
          Dispose frame
 RequestResult exit()
          Exit application
 java.lang.String getOutput()
          Returns the text written to screen.
 void init()
          Initialization of this object
static void main(java.lang.String[] args)
          Test method
 void setOutput(java.lang.String s, int i, long l)
          Replaces the text in the output window with this text.
private  void setStatusReady()
          Displays Ready!
 void showMessage(java.lang.String message)
          Simple method to output thext to the ChatWindow
private  void startStatusWorking()
          Starts the visual display of application working
private  void statusWorking()
           
private  void stopStatusWorking()
          Stops the visual display of application working
 void testerControl(java.lang.String cmd, java.lang.String[] args, boolean expectSuccess)
          Forwards all commands to the parent
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

parent

public MicroTesterBase parent
Reference to the owner entity.


menuBar

private java.awt.MenuBar menuBar

mFile

private java.awt.Menu mFile

mLog

private java.awt.Menu mLog

mBasic

private java.awt.Menu mBasic

mExtended

private java.awt.Menu mExtended

miStartScript

private java.awt.MenuItem miStartScript

miClear

private java.awt.MenuItem miClear

miExit

private java.awt.MenuItem miExit

miShowLogLong

private java.awt.MenuItem miShowLogLong

miShowLogShort

private java.awt.MenuItem miShowLogShort

miClearLog

private java.awt.MenuItem miClearLog

miPlugIn

private java.awt.MenuItem miPlugIn

miPlugOut

private java.awt.MenuItem miPlugOut

miUpgrade

private java.awt.MenuItem miUpgrade

miRoleSession

private java.awt.MenuItem miRoleSession

miRegister

private java.awt.MenuItem miRegister

miRegisterCancel

private java.awt.MenuItem miRegisterCancel

miActorMove

private java.awt.MenuItem miActorMove

output

private java.awt.TextArea output

statusField

private java.awt.TextField statusField

statusLabel

private java.awt.Label statusLabel

LF

private static final java.lang.String LF
Line-feed

See Also:
Constant Field Values

statusText

private java.lang.String statusText

statusWorkingInt

private int statusWorkingInt

statusTask

private java.util.TimerTask statusTask

operationTask

private java.util.TimerTask operationTask

statusTimer

private java.util.Timer statusTimer

operationTimer

private java.util.Timer operationTimer

isWorking

private boolean isWorking

isStatusWorking

private boolean isStatusWorking

startTime

private long startTime

stopTime

private long stopTime

operationCmd

private java.lang.String operationCmd

operationParams

private java.lang.String[] operationParams
Constructor Detail

TesterMainWindow

public TesterMainWindow(MicroTesterBase pMicroTester,
                        java.lang.String title,
                        java.awt.Color bgColor)
Constructor that builds the window

Method Detail

init

public void init()
Initialization of this object


testerControl

public void testerControl(java.lang.String cmd,
                          java.lang.String[] args,
                          boolean expectSuccess)
Forwards all commands to the parent


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Proseccing of the different events

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the ActionEvent triggered

startStatusWorking

private void startStatusWorking()
Starts the visual display of application working


stopStatusWorking

private void stopStatusWorking()
Stops the visual display of application working


statusWorking

private void statusWorking()

setStatusReady

private void setStatusReady()
Displays Ready! in the status line with the given color


showMessage

public void showMessage(java.lang.String message)
Simple method to output thext to the ChatWindow

Parameters:
message - the message to be printed in the window

getOutput

public java.lang.String getOutput()
Returns the text written to screen.

Returns:
The text from the output text area

setOutput

public void setOutput(java.lang.String s,
                      int i,
                      long l)
Replaces the text in the output window with this text. Called when initializing window after ActorBehaviourChange

Parameters:
s - The text to replace whatever is currently in the output text area

exit

public RequestResult exit()
Exit application


disposeFrame

public void disposeFrame()
Dispose frame


main

public static void main(java.lang.String[] args)
Test method



The Telematics Architecture for Plug-and-Play Systems (TAPAS) is a research project undertaken by the Norwegian University of Science and Technology's Telematics department which aims at developing an architecture for network-based service systems with a) flexibility and adaptability, b) robustness and survivability, and c) QoS awareness and resource control.

More information can be found at the project's homepage at http://tapas.item.ntnu.no and the project manager, Professor Finn Arve Aagesen, can be reached at finn.arve.aagesen@item.ntnu.no.