|
||||||||||
| 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.text.JTextComponent
|
+--javax.swing.JEditorPane
|
+--javax.swing.JTextPane
|
+--org.freehep.jas.plugin.console.Console
A TextArea that supports terminal like functionality.
| Field Summary |
| Fields inherited from class javax.swing.text.JTextComponent |
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| 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 | |
Console()
Create a new Console |
|
| Method Summary | |
void |
addInterruptListener(ActionListener l)
Adds a listener for CTRL^C events |
void |
clear()
Clears any output from the Console |
void |
close()
A method to be called to request that the console be closed. |
void |
dispose()
Cleans up resources associated with this console. |
protected void |
fireInterruptAction()
Called when CTRL^C is detected. |
ConsoleInputStream |
getInputStream()
Create an input stream for reading user input from the console. |
ConsoleInputStream |
getInputStream(String initialPrompt)
Create an input stream for reading user input from the console. |
OutputStream |
getLogStream()
Get the current log stream |
ConsoleOutputStream |
getOutputStream(AttributeSet set)
|
ConsoleOutputStream |
getOutputStream(AttributeSet set,
boolean autoShow)
Get an output stream for writing to the console. |
boolean |
isLoggingEnabled()
Test if logging is currently enabled |
void |
paste()
|
void |
removeInterruptListener(ActionListener l)
Remove a listener for CTRL^C events. |
void |
setLoggingEnabled(boolean log)
Temporarily disables/enables logging. |
void |
setLogStream(OutputStream out)
Sets a stream to use for writing logging output. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Console()
| Method Detail |
public ConsoleInputStream getInputStream()
public ConsoleInputStream getInputStream(String initialPrompt)
initialPrompt - The prompt to use for user input
public void setLogStream(OutputStream out)
out - The output stream to use, or null to turn off logging.public OutputStream getLogStream()
null if no current streampublic void setLoggingEnabled(boolean log)
log - true to enable logging.public boolean isLoggingEnabled()
true if logging enabled.
public ConsoleOutputStream getOutputStream(AttributeSet set,
boolean autoShow)
set - The attributes for text created by this output stream, or null for the default
attributes.autoShow - If true the console will "pop to the front" when new output is written.
public ConsoleOutputStream getOutputStream(AttributeSet set)
public void addInterruptListener(ActionListener l)
l - The listener to add.public void dispose()
public void paste()
paste in class JTextComponentpublic void close()
public void removeInterruptListener(ActionListener l)
l - The listener to removeprotected void fireInterruptAction()
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||