|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Frame | +--LogTextFrame
LogTextFrame() - simple text area frame with control buttons Derived from TextFrame.java written by Bob Stephens, ABCC,FCRDC
Inner classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock |
Field Summary | |
(package private) boolean |
appendLogDataFlag
Flag indicating that data is to be appended text area. |
(package private) java.awt.TextArea |
area
Text area for displaying the text |
(package private) java.awt.Font |
button_font
control button font |
(package private) java.awt.Color |
buttonBkGrdColor
background color of buttons |
(package private) java.awt.Button |
clearButton
clear button to clear the log and clear the log file is using a file |
(package private) java.awt.GridBagConstraints |
constraints
grid bag constraints |
(package private) java.awt.Font |
default_font
default font |
(package private) java.awt.Color |
frameBkGrdColor
Background color of entire frame |
(package private) java.lang.String |
fullLogFilePath
optional full path of log file if it exists. |
(package private) java.awt.Button |
hideButton
hide button to hide the Log window. |
(package private) boolean |
isVisibleFlag
Visibility flag |
(package private) java.awt.GridBagLayout |
layout
GUI layout |
private char[] |
logDataBuf
standalone log file data buff |
private int |
logDataBufSize
size of standalone log file data buff |
(package private) java.io.File |
logFile
optional log file if logging |
(package private) java.lang.String |
logFileName
optional log file "maeHistory.log" |
(package private) java.io.FileWriter |
logFileWriter
standalone log file writer |
(package private) java.lang.String |
logTextStr
text to be written to text area |
(package private) java.awt.Button |
saveAsButton
Save Log As button to save the log data as a new named Report/XXXX.txt file |
(package private) java.awt.Font |
text_font
text font in TextArea |
(package private) java.awt.Color |
textBkGrdColor
background color of text area |
(package private) java.lang.String |
title
text to beas popup window title |
Fields inherited from class java.awt.Frame |
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis |
Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, showWithParent, warningString, windowListener, windowSerializedDataVersion |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads |
Fields inherited from class java.awt.Component |
accessibleContext, actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
(package private) |
LogTextFrame(java.lang.String title,
java.lang.String fullLogFilePath,
java.lang.String logFileName,
boolean appendLogDataFlag,
boolean isVisibleFlag,
int optOffset)
LogTextFrame() - constructor to create popup logging text window |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
actionPerformed() - event handler for button press |
private void |
addComponent(java.awt.Component obj,
int x,
int y,
int xw,
int yw,
int xg,
int yg)
addComponent() - add a text component to the frame |
(package private) void |
appendLog(java.lang.String text)
appendLog() - save text into log area. |
(package private) void |
appendLogLn(java.lang.String text)
appendLogLn() - save text+"\n" into log area. |
(package private) boolean |
appendToLogFile(java.lang.String text)
appendToLogFile() - append text to open log file |
(package private) void |
clearLog()
clearLog() - clear the log area and delete old log file. |
(package private) void |
hideWindow()
hideWindow() - flush the buffer and hide the log window |
(package private) boolean |
saveAsTxtFile()
saveAsTxtFile() - save logTextStr data in .txt file logFileName |
(package private) void |
setLogWindowVisible(boolean isVisibleFlag)
setLogWindowVisible() - make the popup window visible or invisible |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
windowClosing() - close the log window |
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 java.awt.Frame |
|
Methods inherited from class java.awt.Window |
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, processWindowEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFont, setLayout, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, 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, registerNatives, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
java.awt.Color frameBkGrdColor
java.awt.Color textBkGrdColor
java.awt.Color buttonBkGrdColor
java.awt.TextArea area
java.awt.Button hideButton
java.awt.Button saveAsButton
java.awt.Button clearButton
java.awt.GridBagLayout layout
java.awt.GridBagConstraints constraints
java.awt.Font default_font
java.awt.Font button_font
java.awt.Font text_font
java.lang.String title
java.lang.String logTextStr
boolean appendLogDataFlag
boolean isVisibleFlag
java.io.File logFile
java.lang.String logFileName
java.lang.String fullLogFilePath
java.io.FileWriter logFileWriter
private char[] logDataBuf
private int logDataBufSize
Constructor Detail |
LogTextFrame(java.lang.String title, java.lang.String fullLogFilePath, java.lang.String logFileName, boolean appendLogDataFlag, boolean isVisibleFlag, int optOffset)
title
- of windowfullLogFilePath
- file path to save filelogFileName
- name of log fileappendLogDataFlag
- determines if new file or append to old fileisVisibleFlag
- if visible when createdoptOffset
- Component.repaint()
Method Detail |
boolean saveAsTxtFile()
EventMenu.promptFileName(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean, boolean)
,
FileIO.writeFileToDisk(java.lang.String, java.lang.String)
,
Util.dateStr()
,
Util.showMsg(java.lang.String)
private void addComponent(java.awt.Component obj, int x, int y, int xw, int yw, int xg, int yg)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- is button press eventhideWindow()
,
saveAsTxtFile()
void setLogWindowVisible(boolean isVisibleFlag)
isVisibleFlag
- to set whether the window is visible or notComponent.repaint()
void appendLog(java.lang.String text)
text
- to append to logvoid appendLogLn(java.lang.String text)
text
- to append to logappendLog(java.lang.String)
boolean appendToLogFile(java.lang.String text)
text
- to append to logvoid clearLog()
void hideWindow()
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing
in interface java.awt.event.WindowListener
e
- is window closing eventhideWindow()
public void windowActivated(java.awt.event.WindowEvent e)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent e)
windowClosed
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent e)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent e)
windowOpened
in interface java.awt.event.WindowListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |