public class JConsole extends JComponent implements HierarchyListener
JComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategyaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
JConsole(int columns,
int rows) |
| 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,
Color fg,
Color bg,
int column,
int row,
int width,
int height) |
Color |
getBackground() |
Color |
getBackgroundAt(int column,
int row) |
char |
getCharAt(int column,
int row) |
int |
getColumns() |
int |
getCursorX() |
int |
getCursorY() |
Font |
getFontAt(int column,
int row) |
int |
getFontHeight() |
int |
getFontWidth() |
Color |
getForeground() |
Color |
getForegroundAt(int column,
int row) |
int |
getRows() |
void |
hierarchyChanged(HierarchyEvent e) |
protected void |
init(int columns,
int rows)
Initialises the console to a specified size
|
void |
paintComponent(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 |
resize(int columns,
int rows) |
void |
setBackground(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(Font f) |
void |
setForeground(Color c) |
void |
setMainFont(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(String string) |
void |
write(String string,
Color foreGround,
Color backGround) |
void |
writeln(String line) |
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, 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, 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, updateUIadd, 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, validateTreeaction, 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, 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, hide, 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, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic void setMainFont(Font font)
font - public void setCursorBlink(boolean blink)
public void setBlinkDelay(int millis)
public void addNotify()
addNotify in class JComponentpublic void removeNotify()
removeNotify in class JComponentpublic void setRows(int rows)
public void setFont(Font f)
setFont in class JComponentpublic 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(int columns,
int rows)
public void clear()
public void resetCursor()
public void clearScreen()
public void paintComponent(Graphics graphics)
paintComponent in class JComponentpublic void setCursorPos(int column,
int row)
public int getCursorX()
public int getCursorY()
public void setForeground(Color c)
setForeground in class JComponentpublic void setBackground(Color c)
setBackground in class JComponentpublic Color getForeground()
getForeground in class Componentpublic Color getBackground()
getBackground in class Componentpublic char getCharAt(int column,
int row)
public Color getForegroundAt(int column, int row)
public Color getBackgroundAt(int column, int row)
public Font getFontAt(int column, int row)
public void captureStdOut()
public void write(char c)
public void writeln(String line)
public void write(String string)
public void fillArea(char c,
Color fg,
Color bg,
int column,
int row,
int width,
int height)
public void hierarchyChanged(HierarchyEvent e)
hierarchyChanged in interface HierarchyListenerCopyright © 2013. All Rights Reserved.