public class JConsole
extends javax.swing.JComponent
implements java.awt.event.HierarchyListener
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
JConsole() |
Modifier and Type | Method and Description |
---|---|
void |
addNotify() |
void |
captureStdOut()
Redirects System.out to this console by calling System.setOut
|
void |
clear() |
void |
clearScreen() |
void |
fillArea(char c,
java.awt.Color fg,
java.awt.Color bg,
int column,
int row,
int width,
int height) |
java.awt.Color |
getBackground() |
java.awt.Color |
getBackgroundAt(int column,
int row) |
char |
getCharAt(int column,
int row) |
int |
getColumns() |
int |
getCursorX() |
int |
getCursorY() |
java.awt.Font |
getFontAt(int column,
int row) |
int |
getFontHeight() |
int |
getFontWidth() |
java.awt.Color |
getForeground() |
java.awt.Color |
getForegroundAt(int column,
int row) |
int |
getRows() |
void |
hierarchyChanged(java.awt.event.HierarchyEvent e) |
protected void |
init()
Initialises the console to a specified size
|
void |
paintComponent(java.awt.Graphics graphics) |
void |
removeNotify() |
void |
repaintArea(int column,
int row,
int width,
int height)
Fires a repaint event on a specified rectangle of characters in the console
|
void |
resetCursor() |
void |
setBackground(java.awt.Color c) |
void |
setBlinkDelay(int millis) |
void |
setColumns(int columns) |
void |
setCursorBlink(boolean blink) |
void |
setCursorPos(int column,
int row) |
void |
setCursorVisible(boolean visible) |
void |
setFont(java.awt.Font f) |
void |
setForeground(java.awt.Color c) |
void |
setMainFont(java.awt.Font font)
Sets the main font of the console, which is used to determine the size of
characters
|
void |
setRows(int rows) |
void |
write(char c) |
void |
write(java.lang.String string) |
void |
write(java.lang.String string,
java.awt.Color foreGround,
java.awt.Color backGround) |
void |
writeln(java.lang.String line) |
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public void setMainFont(java.awt.Font font)
font
- public void setCursorBlink(boolean blink)
public void setBlinkDelay(int millis)
public void addNotify()
addNotify
in class javax.swing.JComponent
public void removeNotify()
removeNotify
in class javax.swing.JComponent
public void setRows(int rows)
public void setFont(java.awt.Font f)
setFont
in class javax.swing.JComponent
public void setCursorVisible(boolean visible)
public int getRows()
public void setColumns(int columns)
public int getColumns()
public int getFontWidth()
public int getFontHeight()
public void repaintArea(int column, int row, int width, int height)
protected void init()
public void clear()
public void resetCursor()
public void clearScreen()
public void paintComponent(java.awt.Graphics graphics)
paintComponent
in class javax.swing.JComponent
public void setCursorPos(int column, int row)
public int getCursorX()
public int getCursorY()
public void setForeground(java.awt.Color c)
setForeground
in class javax.swing.JComponent
public void setBackground(java.awt.Color c)
setBackground
in class javax.swing.JComponent
public java.awt.Color getForeground()
getForeground
in class java.awt.Component
public java.awt.Color getBackground()
getBackground
in class java.awt.Component
public char getCharAt(int column, int row)
public java.awt.Color getForegroundAt(int column, int row)
public java.awt.Color getBackgroundAt(int column, int row)
public java.awt.Font getFontAt(int column, int row)
public void captureStdOut()
public void write(char c)
public void writeln(java.lang.String line)
public void write(java.lang.String string, java.awt.Color foreGround, java.awt.Color backGround)
public void write(java.lang.String string)
public void fillArea(char c, java.awt.Color fg, java.awt.Color bg, int column, int row, int width, int height)
public void hierarchyChanged(java.awt.event.HierarchyEvent e)
hierarchyChanged
in interface java.awt.event.HierarchyListener