|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ti.swing.console.Console
ti.swing.ConsoleTextArea
ConsoleTextArea is like a regular text area, except that you can
getReader()
/getWriter()
to get a Reader/Writer
that can be used for input/output with a non-GUI program. Because of this,
ConsoleTextArea can be used as a console for non-GUI programs.
Nested Class Summary |
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 |
Fields inherited from class ti.swing.console.Console |
CR, LF |
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.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 | |
ConsoleTextArea()
Class Constructor |
|
ConsoleTextArea(int rows,
int columns)
Class Constructor. |
|
ConsoleTextArea(int rows,
int columns,
boolean readonly)
Class Constructor. |
Method Summary | |
void |
copy()
Copy the selected text into the system-wide clipboard. |
void |
copy(java.awt.datatransfer.Clipboard clipboard)
Copy the selected text into the provided clipboard. |
void |
dispose()
This should called when getting rid of this text-area... |
java.lang.Object |
getHistory()
Get the history. |
java.io.Reader |
getReader()
Get the Reader for this console. |
java.io.Writer |
getWriter()
Get the Writer for this console. |
boolean |
isManagingFocus()
Overload so that non-read-only consoles don't let TAB change focus. |
protected void |
paintComponent(java.awt.Graphics g)
Paint this component. |
void |
paste()
Paste the text from the system-wide clipboard into the text area at the specified position. |
void |
paste(java.awt.datatransfer.Clipboard clipboard)
Paste the text from the specified clipboard into the text area at the specified position. |
void |
paste(java.lang.String str)
Paste the text into the text area. |
protected void |
scrollTo(java.awt.Point p)
Scroll to a specified text coordinate. |
void |
selectAll()
Select the entire buffer. |
void |
setHistory(java.lang.Object history)
Set the history. |
void |
setTabCompleter(ConsoleTabCompleter ctc)
Set the ConsoleTabCompleter |
Methods inherited from class ti.swing.console.Console |
doLayout, getInputHandler, getMinimumSize, getPreferredSize, processMouseEvent, setFont, setInputHandler, toOffset, toPoint, waitForRedraw |
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, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, 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, 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, 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 |
Constructor Detail |
public ConsoleTextArea()
public ConsoleTextArea(int rows, int columns)
rows
- the number of rows for the consolecolumns
- the number of columns for the consolepublic ConsoleTextArea(int rows, int columns, boolean readonly)
ro
is
true, then the console is "read-only", meaning that the user cannot
type input into the console.
You can still get a reader for a "read-only" console, but because the user cannot enter any input there is probably no point in doing so.
rows
- the number of rows for the consolecolumns
- the number of columns for the consolereadonly
- true if this should be a read-only consoleMethod Detail |
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class Console
public boolean isManagingFocus()
protected void scrollTo(java.awt.Point p)
p
- the position to scroll topublic void setHistory(java.lang.Object history)
getHistory()
, but may be serialized/deserialized.
history
- a history object, as returned by getHistory()
getHistory()
public java.lang.Object getHistory()
Console
to make history
persistant. The history object is Serializable
setHistory(java.lang.Object)
public void setTabCompleter(ConsoleTabCompleter ctc)
ConsoleTabCompleter
public void selectAll()
public void copy()
public void copy(java.awt.datatransfer.Clipboard clipboard)
clipboard
- the clipboard to copy intopublic void paste()
public void paste(java.awt.datatransfer.Clipboard clipboard)
clipboard
- the clipboard to copy frompublic void paste(java.lang.String str)
str
- the string to paste.public void dispose()
public java.io.Writer getWriter()
public java.io.Reader getReader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |