IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.base
Class TraceFrame

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended bycom.ibm.dse.base.TraceFrame
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class TraceFrame
extends java.awt.Frame

This class is used to write trace lines to a list in a window. There is a maximum number of lines that can be written into the list. When this number is reached, the list is wrapped. This class is a descendant of Frame.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
(package private) static int CLEAR
           
protected  java.awt.Frame ComponentsFrame
           
protected  boolean doTraces
           
(package private) static java.lang.String EDIT_UNSELECT
           
protected  java.awt.Menu editMenu
           
protected  java.lang.String File
           
(package private) static java.lang.String FILE_EXIT
           
(package private) static java.lang.String FILE_SAVEALL
           
(package private) static java.lang.String FILE_SAVEITEMS
           
(package private) static java.lang.String FILE_SAVESELECTED
           
protected  java.awt.Menu fileMenu
           
protected  boolean itemsSelected
           
protected  java.awt.MenuBar mainMenu
           
protected  boolean showCTF
           
protected  boolean showDSE
           
(package private) static java.lang.String TRACE_COMPONENTS
           
(package private) static java.lang.String TRACE_DISK
           
(package private) static java.lang.String TRACE_DISPLAY
           
(package private) static java.lang.String TRACE_RECORD_COMPONENT
           
(package private) static java.lang.String TRACE_RECORD_DATE
           
(package private) static java.lang.String TRACE_RECORD_LEVEL
           
(package private) static java.lang.String TRACE_RECORD_ORIGINATOR
           
(package private) static java.lang.String TRACE_RECORD_THREADID
           
(package private) static java.lang.String TRACE_RECORD_TID
           
(package private) static java.lang.String TRACE_RECORD_TIME
           
(package private) static java.lang.String TRACE_RECORD_TYPE
           
protected  TraceList traceList
           
protected  java.awt.Menu traceMenu
           
protected  TracesWindow trcWindow
           
(package private) static java.lang.String VIEW_CLEAN
           
(package private) static java.lang.String VIEW_SCROLL
           
protected  java.awt.Menu viewMenu
           
protected  boolean zeroItems
           
 
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
TraceFrame(java.lang.String title, TracesWindow trc, int lines)
          This constructor creates a TraceFrame object with the String used as the title in the title bar of the window.
TraceFrame(TracesWindow trc, int lines)
          This is the default constructor used to create a TraceFrame object.
 
Method Summary
 void addLine(java.lang.String line)
          Adds a line from the trace to the display area.
protected  boolean changeFile()
          Changes the file in which the lines of the trace are saved.
 void cleanList()
          Clears the display area.
 void closeFrame()
          Closes the frame.
protected  void deselectList()
          Deselects all the items selected in the display area.
protected  void doEditMenu()
          Intializes the menu labeled Edit.
protected  void doFileMenu()
          Initializes the menu labeled File.
protected  void doTraceMenu()
          Initializes the menu labeled Trace.
protected  void doViewMenu()
          Initializes the menu labeled View.
 void enableMenuTraceToFile(boolean b)
          Enables the Disk option of the Trace menu if the enableMenuTraceToFile is set to true.
 boolean getMenuTraceLockScrolling()
          Returns the state of lock scrolling option.
 boolean handleEvent(java.awt.Event e)
          Process the events sent by the items of the frame.
protected  void iniMainMenu()
          Initializes the menu bar of the frame.
protected  void initializeControls(int lines)
          Initializes the items of the frame.
protected  void initTraceList(int lines)
          Initializes the display area used to display the lines of the trace.
 void reset()
          Frees the resources used by this class.
 void saveAll()
          Saves all the trace lines.
 void saveSelected()
          Saves all the selected items.
 void saveVisible()
          Saves the items indicated by the user.
 void setMaximumNumberOfLines(int lines)
          Sets the maximum number of lines that can be added to the list before wrapping occurs.
 void setMenuTraceLockScrolling(boolean state)
          Enables or disables the vertical scrolling, and refreshs lock scrolling option in menu.
 void setMenuTraceToDisplay(boolean b)
          Puts a check by the Display option on the Trace menu if the menuTraceToDisplay is set to true.
 void setMenuTraceToFile(boolean b)
          Puts a check by the Disk option on the Trace menu if the menuTraceToFile is set to true.
 void setMenuViewOriginator(boolean state)
          Puts or removes a check in the originator option menu.
 
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, 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

CLEAR

static final int CLEAR
See Also:
Constant Field Values

FILE_SAVEALL

static final java.lang.String FILE_SAVEALL

FILE_SAVEITEMS

static final java.lang.String FILE_SAVEITEMS

FILE_SAVESELECTED

static final java.lang.String FILE_SAVESELECTED

FILE_EXIT

static final java.lang.String FILE_EXIT

EDIT_UNSELECT

static final java.lang.String EDIT_UNSELECT

TRACE_DISPLAY

static final java.lang.String TRACE_DISPLAY

TRACE_DISK

static final java.lang.String TRACE_DISK

TRACE_COMPONENTS

static final java.lang.String TRACE_COMPONENTS

TRACE_RECORD_COMPONENT

static final java.lang.String TRACE_RECORD_COMPONENT

TRACE_RECORD_LEVEL

static final java.lang.String TRACE_RECORD_LEVEL

TRACE_RECORD_TYPE

static final java.lang.String TRACE_RECORD_TYPE

TRACE_RECORD_DATE

static final java.lang.String TRACE_RECORD_DATE

TRACE_RECORD_TIME

static final java.lang.String TRACE_RECORD_TIME

TRACE_RECORD_THREADID

static final java.lang.String TRACE_RECORD_THREADID

TRACE_RECORD_TID

static final java.lang.String TRACE_RECORD_TID

TRACE_RECORD_ORIGINATOR

static final java.lang.String TRACE_RECORD_ORIGINATOR

VIEW_CLEAN

static final java.lang.String VIEW_CLEAN

VIEW_SCROLL

static final java.lang.String VIEW_SCROLL

itemsSelected

protected boolean itemsSelected

zeroItems

protected boolean zeroItems

traceList

protected TraceList traceList

mainMenu

protected java.awt.MenuBar mainMenu

fileMenu

protected java.awt.Menu fileMenu

editMenu

protected java.awt.Menu editMenu

viewMenu

protected java.awt.Menu viewMenu

traceMenu

protected java.awt.Menu traceMenu

File

protected java.lang.String File

doTraces

protected boolean doTraces

showDSE

protected boolean showDSE

showCTF

protected boolean showCTF

trcWindow

protected TracesWindow trcWindow

ComponentsFrame

protected java.awt.Frame ComponentsFrame
Constructor Detail

TraceFrame

public TraceFrame(TracesWindow trc,
                  int lines)
This is the default constructor used to create a TraceFrame object.

Parameters:
trc - com.ibm.dse.base.TracesWidnow
lines - int

TraceFrame

public TraceFrame(java.lang.String title,
                  TracesWindow trc,
                  int lines)
This constructor creates a TraceFrame object with the String used as the title in the title bar of the window.

Parameters:
title - java.lang.String
trc - com.ibm.dse.base.TracesWindow
lines - int
Method Detail

addLine

public void addLine(java.lang.String line)
Adds a line from the trace to the display area.

Parameters:
line - java.lang.String

changeFile

protected boolean changeFile()
Changes the file in which the lines of the trace are saved.


cleanList

public void cleanList()
Clears the display area.


closeFrame

public void closeFrame()
Closes the frame.


deselectList

protected void deselectList()
Deselects all the items selected in the display area.


doEditMenu

protected void doEditMenu()
Intializes the menu labeled Edit.


doFileMenu

protected void doFileMenu()
Initializes the menu labeled File.


doTraceMenu

protected void doTraceMenu()
Initializes the menu labeled Trace.


doViewMenu

protected void doViewMenu()
Initializes the menu labeled View.


enableMenuTraceToFile

public void enableMenuTraceToFile(boolean b)
Enables the Disk option of the Trace menu if the enableMenuTraceToFile is set to true. If it is false, the Disk option is disabled.


getMenuTraceLockScrolling

public boolean getMenuTraceLockScrolling()
Returns the state of lock scrolling option.

Returns:
boolean If it's value is true then vertical scrolling is enabled, and if the value is false then vertical scrolling is disabled.

handleEvent

public boolean handleEvent(java.awt.Event e)
Process the events sent by the items of the frame.


iniMainMenu

protected void iniMainMenu()
Initializes the menu bar of the frame.


initializeControls

protected void initializeControls(int lines)
Initializes the items of the frame.

Parameters:
lines - int

initTraceList

protected void initTraceList(int lines)
Initializes the display area used to display the lines of the trace.


reset

public void reset()
Frees the resources used by this class.


saveAll

public void saveAll()
Saves all the trace lines.


saveSelected

public void saveSelected()
Saves all the selected items.


saveVisible

public void saveVisible()
Saves the items indicated by the user.


setMaximumNumberOfLines

public void setMaximumNumberOfLines(int lines)
Sets the maximum number of lines that can be added to the list before wrapping occurs.

Parameters:
lines - int

setMenuTraceLockScrolling

public void setMenuTraceLockScrolling(boolean state)
Enables or disables the vertical scrolling, and refreshs lock scrolling option in menu.

Parameters:
state - boolean - If it's value is true then vertical scrolling is enabled, and if the value is false then vertical scrolling is disabled.

setMenuTraceToDisplay

public void setMenuTraceToDisplay(boolean b)
Puts a check by the Display option on the Trace menu if the menuTraceToDisplay is set to true. If it is false, the Display option does not have a check.

Parameters:
b - boolean

setMenuTraceToFile

public void setMenuTraceToFile(boolean b)
Puts a check by the Disk option on the Trace menu if the menuTraceToFile is set to true. If it is false, the Disk option does not have a check.

Parameters:
b - boolean

setMenuViewOriginator

public void setMenuViewOriginator(boolean state)
Puts or removes a check in the originator option menu.

Parameters:
state - boolean If it value is true then puts a check, and if it is false then removes a check.

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005