com.ibm.dse.base
Class TraceFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--com.ibm.dse.base.TraceFrame

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 descendant of Frame.

See Also:
Serialized Form

Field Summary
protected  java.awt.Frame ComponentsFrame
           
protected  boolean doTraces
           
protected  java.awt.Menu editMenu
           
protected  java.lang.String File
           
protected  java.awt.Menu fileMenu
           
protected  boolean itemsSelected
           
protected  java.awt.MenuBar mainMenu
           
protected  boolean showCTF
           
protected  boolean showDSE
           
protected  TraceList traceList
           
protected  java.awt.Menu traceMenu
           
protected  com.ibm.dse.base.TracesWindow trcWindow
           
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, 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
 
Constructor Summary
TraceFrame(java.lang.String title, com.ibm.dse.base.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(com.ibm.dse.base.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, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, paramString, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getInputContext, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, processWindowEvent, removeWindowListener, setCursor, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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 com.ibm.dse.base.TracesWindow trcWindow

ComponentsFrame

protected java.awt.Frame ComponentsFrame
Constructor Detail

TraceFrame

public TraceFrame(com.ibm.dse.base.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,
                  com.ibm.dse.base.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 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.
Overrides:
handleEvent in class java.awt.Component

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 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.