MicroTAPAS.debug
Class DebugFrame2

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--MicroTAPAS.debug.DebugBaseFrame2
                                      |
                                      +--MicroTAPAS.debug.DebugFrame2
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.event.TableModelListener, javax.swing.WindowConstants, java.awt.event.WindowListener

public class DebugFrame2
extends DebugBaseFrame2
implements java.awt.event.ActionListener, java.awt.event.ItemListener, javax.swing.event.TableModelListener

This class represents the Debug window that displays all the DebugEvents that have been sent to the DebugServer.

It allows the user to filter DebugEvents according to the fault-type, and choose what attributes to be shown (time, type, address, etc.) and to the save the trace window contents to file (debug_trace.txt). If a previous trace file is detected, it first renames that old file to debug_trace.txt.bak before saving the current trace.

See Also:
Serialized Form

Field Summary
private  boolean bClass
           
private  java.awt.Button bClear
           
private  boolean bId
           
private  boolean bMethod
           
private  boolean bMsg
           
private  boolean bNo
           
private  boolean bNode
           
private  java.awt.Button bSave
           
private  java.awt.Button bShow
           
private  boolean bTime
           
private  boolean bType
           
private  java.awt.Checkbox cbClass
           
private  java.awt.Checkbox cbId
           
private  java.awt.Checkbox cbMethod
           
private  java.awt.Checkbox cbMsg
           
private  java.awt.Checkbox cbNode
           
private  java.awt.Checkbox cbTime
           
private  java.awt.Checkbox cbType
           
private  java.awt.Choice cType
           
private  java.lang.String currentType
           
private  java.util.Vector events
           
private  java.lang.String[] faultTypes
           
private  javax.swing.JScrollPane jsp
           
private  DebugTable jt
           
private  java.awt.Label lType
           
private  int numEvents
           
private  DebugServer owner
           
private  java.awt.Panel panel
           
protected  java.util.Properties properties
           
private  int selectedCol
           
private  int selectedRow
           
private  java.awt.TextArea ta
           
private  DebugTableModel tableModel
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
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 javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DebugFrame2(DebugServer pOwner, java.lang.String pFrameIcon)
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          Detects and handles ActionEvents, i.e. a button is pressed.
 void addEvent(DebugEvent de)
          Receives a DebugEvent from its owner, and updated the trace window
private  java.awt.Panel buildCheckboxPanel()
          Simple method to build the checkbox panel.
 boolean[] buildColumns()
           
private  java.awt.Panel buildPanel()
          Builds the panel that will be added to the BaseFrame.
 void clearEvents()
          Clear all the DebugEvents from this object.
protected  void init(java.awt.Component pComponent, boolean pIsMain)
           
 void itemStateChanged(java.awt.event.ItemEvent ie)
          Detects a change in the Choice list or one of the checkboxes, and sets the variables accordingly.
static void main(java.lang.String[] args)
          For testing purposes only.
 void printFrames()
           
protected  void setComponent(java.awt.Component pComponent)
           
protected  void setStatus(java.lang.String msg)
           
 void tableChanged(javax.swing.event.TableModelEvent e)
          Detects changes in the table
private  void updateStatus(java.lang.String msg)
          Updates the status label
 void updateTextField(java.lang.String msg)
           
 void updateTrace()
          Updates the trace window after the user have selected some filter(s).
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, 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, 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, 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, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, 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

owner

private DebugServer owner

faultTypes

private java.lang.String[] faultTypes

events

private java.util.Vector events

currentType

private java.lang.String currentType

numEvents

private int numEvents

bNo

private boolean bNo

bTime

private boolean bTime

bType

private boolean bType

bNode

private boolean bNode

bClass

private boolean bClass

bMethod

private boolean bMethod

bMsg

private boolean bMsg

bId

private boolean bId

panel

private java.awt.Panel panel

lType

private java.awt.Label lType

cType

private java.awt.Choice cType

bSave

private java.awt.Button bSave

bClear

private java.awt.Button bClear

bShow

private java.awt.Button bShow

ta

private java.awt.TextArea ta

cbTime

private java.awt.Checkbox cbTime

cbType

private java.awt.Checkbox cbType

cbNode

private java.awt.Checkbox cbNode

cbClass

private java.awt.Checkbox cbClass

cbMethod

private java.awt.Checkbox cbMethod

cbMsg

private java.awt.Checkbox cbMsg

cbId

private java.awt.Checkbox cbId

jsp

private javax.swing.JScrollPane jsp

jt

private DebugTable jt

tableModel

private DebugTableModel tableModel

selectedRow

private int selectedRow

selectedCol

private int selectedCol

properties

protected java.util.Properties properties
Constructor Detail

DebugFrame2

public DebugFrame2(DebugServer pOwner,
                   java.lang.String pFrameIcon)
Constructor

Parameters:
pOwner - Reference to the parent DebugServer-object.
Method Detail

buildPanel

private java.awt.Panel buildPanel()
Builds the panel that will be added to the BaseFrame.

Returns:
The panel that contains the specialized components for this DebugFrame.

buildCheckboxPanel

private java.awt.Panel buildCheckboxPanel()
Simple method to build the checkbox panel.

Returns:
The panel that was assebled.

addEvent

public void addEvent(DebugEvent de)
Receives a DebugEvent from its owner, and updated the trace window

Parameters:
de - The new DebugEvent to be added to the trace.

clearEvents

public void clearEvents()
Clear all the DebugEvents from this object.


updateTrace

public void updateTrace()
Updates the trace window after the user have selected some filter(s).


updateStatus

private void updateStatus(java.lang.String msg)
Updates the status label


updateTextField

public void updateTextField(java.lang.String msg)

buildColumns

public boolean[] buildColumns()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent ie)
Detects a change in the Choice list or one of the checkboxes, and sets the variables accordingly.

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

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.

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
Detects changes in the table

Specified by:
tableChanged in interface javax.swing.event.TableModelListener

main

public static void main(java.lang.String[] args)
For testing purposes only.


init

protected void init(java.awt.Component pComponent,
                    boolean pIsMain)

setComponent

protected void setComponent(java.awt.Component pComponent)

setStatus

protected void setStatus(java.lang.String msg)

printFrames

public void printFrames()

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener


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.