|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--gov.nist.antd.java.swing.OutPutScreen
This Class contains a component that receives the redirected error- and standard outputstream.
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
| Nested Class Summary | |
static class |
OutPutScreen.Redirector
This class redirects all outputs to registered OutPutScreen's. |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| 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 | |
private boolean |
enablePopUp
Indicates if the popup menu is activated or not. |
private boolean |
err
Indicates if the component redirects the standard error stream. |
private static java.io.PrintStream |
errStream
The new err PrintStream that redirects all print/println calls to the registered receivers. |
private static java.util.Vector |
errVector
The Vector contains all OutPutScreen's that registered for receiving the System.err calls. |
private javax.swing.JMenuItem |
mnuClear
|
private javax.swing.JPopupMenu |
mnuPopUp
|
private boolean |
out
Indicates if the component redirects the standard output stream. |
private javax.swing.JEditorPane |
output
|
private javax.swing.JScrollPane |
outputPane
|
private static java.io.PrintStream |
outStream
The new out PrintStream that redirects all print/println calls to the registered receivers. |
private static java.util.Vector |
outVector
The Vector contains all OutPutScreen's that registered for receiving the System.out calls. |
private static java.io.PrintStream |
stdErrStream
The standard System.out PrintStream. |
private static java.io.PrintStream |
stdOutStream
The standard System.out PrintStream. |
| Fields inherited from class javax.swing.JPanel |
|
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_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 | |
OutPutScreen()
Creates new customizer OutPutEditor |
|
| Method Summary | |
void |
clear()
Clears the output screen. |
static void |
connectAll()
Connect all output PrintStreams with the Redirector. |
static void |
connectErrStream()
Connect the standard error output to the Redirector for standard error outputs. |
static void |
connectOutStream()
Connect the standard output to the Redirector for standard outputs. |
static void |
disconnectAll()
Connect all output PrintStreams with the systems default PrintStreams. |
static void |
disconnectErrStream()
Connect the systems default error output to the standard error output. |
static void |
disconnectOutStream()
Connect the systems default output to the standard output. |
static java.io.PrintStream |
getStdErr()
Determines the systems default error PrintStream. |
static java.io.PrintStream |
getStdOut()
Determines the systems default output PrintStream. |
private void |
initComponents()
This method is called from within the constructor to initialize the form. |
boolean |
isAutoScrolls()
Getter for property autoScrolls. |
boolean |
isEditable()
Determines the edit mode of the output screen. |
boolean |
isEnablePopUp()
Determine if the popup menu is activated. |
boolean |
isErr()
Getter for property err. |
boolean |
isOut()
Getter for property out. |
private void |
mnuClearActionPerformed(java.awt.event.ActionEvent evt)
Clears the text field. |
private void |
outputMouseMoved(java.awt.event.MouseEvent evt)
|
private void |
outputMousePressed(java.awt.event.MouseEvent evt)
Opens the popup menu by right mouseclick. |
void |
setAutoScrolls(boolean autoScrolls)
Setter for property autoScrolls. |
void |
setEditable(boolean newValue)
Set the edit mode of the output screen. |
void |
setEnablePopUp(boolean enablePopUp)
Enables or disables the popup menu. |
void |
setErr(boolean err)
Setter for property err. |
void |
setOut(boolean out)
Setter for property out. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final java.util.Vector outVector
private static final java.util.Vector errVector
private static final java.io.PrintStream stdOutStream
private static final java.io.PrintStream stdErrStream
private static final java.io.PrintStream outStream
private static final java.io.PrintStream errStream
private javax.swing.JPopupMenu mnuPopUp
private javax.swing.JMenuItem mnuClear
private javax.swing.JScrollPane outputPane
private javax.swing.JEditorPane output
private boolean out
private boolean err
private boolean enablePopUp
| Constructor Detail |
public OutPutScreen()
| Method Detail |
public static final java.io.PrintStream getStdOut()
public static final java.io.PrintStream getStdErr()
public static final void connectOutStream()
public static final void connectErrStream()
public static final void disconnectErrStream()
public static final void disconnectOutStream()
public static final void connectAll()
public static final void disconnectAll()
private void initComponents()
private void outputMouseMoved(java.awt.event.MouseEvent evt)
private void outputMousePressed(java.awt.event.MouseEvent evt)
evt - The mouse event.private void mnuClearActionPerformed(java.awt.event.ActionEvent evt)
evt - The calling event.public boolean isOut()
public void setOut(boolean out)
out - New value of property out.public boolean isErr()
public void setErr(boolean err)
err - New value of property err.public void clear()
public boolean isAutoScrolls()
public void setAutoScrolls(boolean autoScrolls)
autoScrolls - New value of property autoScrolls.public boolean isEnablePopUp()
public void setEnablePopUp(boolean enablePopUp)
enablePopUp - New value of property enablePopUp.public boolean isEditable()
public void setEditable(boolean newValue)
newValue - If true the output is in read/write; otherwise read only
mode.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||