MicroTAPAS
Class MicroBaseFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--MicroTAPAS.MicroBaseFrame
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, ControlInterface, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.event.KeyListener, java.awt.MenuContainer, java.io.Serializable

public class MicroBaseFrame
extends java.awt.Frame
implements java.io.Serializable, java.awt.event.KeyListener, java.awt.event.ActionListener, java.awt.event.ItemListener, ControlInterface

This class implements an interactive debug client window for entities MicroPNES, MicroPAS. It is based on the PaP class BaseFrame.java.

See Also:
Serialized Form

Field Summary
 
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.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
MicroBaseFrame(java.lang.String pTitle, int pX, int pY, ControlInterface pOwner)
          Constructor to initialize window properties and data fields
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          Detects and handles ActionEvents, i.e. a button is pressed.
 void addCommandLine(java.lang.String pCL)
          Adds a command line string to the input line history of the debug client window
 void cleanUp()
          Gives this TAPAS instance a chance to clean up when the DebugWindow is closed.
 void close()
          Closes the window, if last window -> exit
 RequestResult control(java.lang.String cmd, java.lang.String[] args)
          Control method from ControlInterface, only armed if there's no attached owner
 java.lang.String[] getKeywords()
          Returns the actual set of debug trace keywords for the owner entity
 void itemStateChanged(java.awt.event.ItemEvent ie)
          Detects a change in the Choice list.
 void keyPressed(java.awt.event.KeyEvent ke)
          Utility to process the event of keyPressed
 void keyReleased(java.awt.event.KeyEvent ke)
           
 void keyTyped(java.awt.event.KeyEvent ke)
           
static void main(java.lang.String[] argv)
           
 void pln(java.lang.String[] pKW, java.lang.String pMessage)
          Prints debug trace info into a degug client window and sends it to attached DebugServer
 void print(int l, java.lang.String s)
           
 void printerr(java.lang.String s, java.lang.Exception e)
           
 void println(int l, java.lang.String s)
           
 void setIcon(java.lang.String icon)
          Method to set the icon of the frame.Can make it easier to distinguish between several frames.
 void setKeywords(java.lang.String[] pKW)
          Sets debug trace keywords for the owner entity
 void setTitle(java.lang.String title)
          Method to set the frame title
 void stdout(java.lang.String s)
           
 void term()
           
 void updateCommandLines(java.lang.String oldNode, java.lang.String newNode)
          Updates the command lines to reflect changes in local address
 
Methods inherited from class java.awt.Frame
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, 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, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

MicroBaseFrame

public MicroBaseFrame(java.lang.String pTitle,
                      int pX,
                      int pY,
                      ControlInterface pOwner)
Constructor to initialize window properties and data fields

Parameters:
pTitle - Window title
pX - Window width
pY - Window height
pOwner - The entity to report user control events to
Method Detail

close

public void close()
Closes the window, if last window -> exit


setKeywords

public void setKeywords(java.lang.String[] pKW)
Sets debug trace keywords for the owner entity

Parameters:
pKW - The new set of keywords

getKeywords

public java.lang.String[] getKeywords()
Returns the actual set of debug trace keywords for the owner entity

Returns:
The actual set of keywords

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Detects and handles ActionEvents, i.e. a button is pressed.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
ae - The ActionEvent that was triggered.

keyPressed

public void keyPressed(java.awt.event.KeyEvent ke)
Utility to process the event of keyPressed

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent ke)
Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent ke)
Specified by:
keyTyped in interface java.awt.event.KeyListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent ie)
Detects a change in the Choice list.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
ie - The triggered ItemEvent.

pln

public void pln(java.lang.String[] pKW,
                java.lang.String pMessage)
Prints debug trace info into a degug client window and sends it to attached DebugServer

Parameters:
pKW - A set of keywords to match with the debug trace filtering keywords
pMessage - The actual debug trace message that carries the debug information

stdout

public void stdout(java.lang.String s)

print

public void print(int l,
                  java.lang.String s)

println

public void println(int l,
                    java.lang.String s)

printerr

public void printerr(java.lang.String s,
                     java.lang.Exception e)

addCommandLine

public void addCommandLine(java.lang.String pCL)
Adds a command line string to the input line history of the debug client window

Parameters:
pCL - The command line string to be added

updateCommandLines

public void updateCommandLines(java.lang.String oldNode,
                               java.lang.String newNode)
Updates the command lines to reflect changes in local address


control

public RequestResult control(java.lang.String cmd,
                             java.lang.String[] args)
Control method from ControlInterface, only armed if there's no attached owner

Specified by:
control in interface ControlInterface
Parameters:
cmd - Control command
args - Arguments for the control command

setIcon

public void setIcon(java.lang.String icon)
Method to set the icon of the frame.Can make it easier to distinguish between several frames.


setTitle

public void setTitle(java.lang.String title)
Method to set the frame title

Overrides:
setTitle in class java.awt.Frame

cleanUp

public void cleanUp()
Gives this TAPAS instance a chance to clean up when the DebugWindow is closed.

Specified by:
cleanUp in interface ControlInterface

term

public void term()

main

public static void main(java.lang.String[] argv)