public interface InputOutput
IOProvider.getDefault().getInputOutput("someName", false)
.
To get actual streams to write to, call getOut()
or
getErr()
on the returned instance.
Generally it is preferable not to hold a reference to an instance of
InputOutput
, but rather to fetch it by name from IOProvider
as
needed.
Note: For historical reasons, the mechanism to clear an output tab
is via the method OutputWriter.reset()
, though it would have
made more sense implemented here.
OutputWriter
Modifier and Type | Field and Description |
---|---|
static InputOutput |
NULL
Null InputOutput
|
static Reader |
nullReader
Deprecated.
Use
InputOutput.NULL instead. |
static OutputWriter |
nullWriter
Deprecated.
Use
InputOutput.NULL instead. |
Modifier and Type | Method and Description |
---|---|
void |
closeInputOutput()
Closes this tab.
|
Reader |
flushReader()
Deprecated.
meaningless, does nothing
|
OutputWriter |
getErr()
Get an output writer to write to the tab in error mode.
|
Reader |
getIn()
Get a reader to read from the tab.
|
OutputWriter |
getOut()
Acquire an output writer to write to the tab.
|
boolean |
isClosed()
Test whether this tab has been closed, either by a call to
closeInputOutput()
or by the user closing the tab in the UI. |
boolean |
isErrSeparated()
Test whether the error output is mixed into the regular output or not.
|
boolean |
isFocusTaken()
Test whether the output window takes focus when anything is written to it.
|
void |
select()
Ensure this pane is visible.
|
void |
setErrSeparated(boolean value)
Set whether the error output should be mixed into the regular output or not.
|
void |
setErrVisible(boolean value)
Show or hide the error pane, if separated.
|
void |
setFocusTaken(boolean value)
Set whether the output window should take focus when anything is written to it.
|
void |
setInputVisible(boolean value)
Show or hide the input line.
|
void |
setOutputVisible(boolean value)
Show or hide the standard output pane, if separated.
|
static final InputOutput NULL
@Deprecated static final Reader nullReader
InputOutput.NULL
instead.@Deprecated static final OutputWriter nullWriter
InputOutput.NULL
instead.OutputWriter getOut()
Reader getIn()
OutputWriter getErr()
void closeInputOutput()
closeInputOutput()
on it is undefined.boolean isClosed()
closeInputOutput()
or by the user closing the tab in the UI.true
if it is closedInputOutput.closeInputOutput()
void setOutputVisible(boolean value)
value
- true
to show, false
to hidevoid setErrVisible(boolean value)
value
- true
to show, false
to hidevoid setInputVisible(boolean value)
value
- true
to show, false
to hidevoid select()
boolean isErrSeparated()
true
if separate, false
if mixed invoid setErrSeparated(boolean value)
value
- true
to separate, false
to mix inboolean isFocusTaken()
true
if any write to the tab should cause it to gain
keyboard focus (not recommended)void setFocusTaken(boolean value)
value
- true
to take focus@Deprecated Reader flushReader()