|
org.openide.io 1.9.31 | |||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Input/Output API | |
---|---|
org.openide.windows | Interfaces for working with input/output tabs. |
Just an API/SPI for defining the output window.
Added an additional method InputOutput getIO(String name, Action[] additionalActions)
that accepts additional array of javax.swing.Action instances. It allows to define domain-specific additional actions
that can be performed on the content of the output.
The method
should be ideally abstract but because it's uncertain how many
implementations of IOProvider are there, the method is non-abstract and in it's
default impl, delegates to the InputOutput getIO(String name, boolean newIO)
method.
Implementors of the class are encourages to implement the new method.
Added an additional method OutputWriter.println(String, OutputListener, boolean)
that accepts additional boolean parameter (is Important or not). It allows the API users to mark the
line and it's listener as important. Such a line can be marked in different color, the output can stop there to draw user's attention etc.
The method
should be ideally abstract but because it's uncertain how many
implementations are there, the method is non-abstract and in it's
default impl, delegates to the OutputWriter.println(String, OutputListener)
method,
ignoring the boolean parameter. Implementors of the class are
encourages to implement the new method.
There is an SPI but additional implementations are not expected. The API is most important.
Simple usage example:
InputOutput io = IOProvider.getDefault().getIO("My Window", true); io.select(); OutputWriter w = io.getOut(); w.println("Line of plain text."); OutputListener listener = new OutputListener() { public void outputLineAction(OutputEvent ev) { StatusDisplayer.getDefault().setStatusText("Hyperlink clicked!"); } public void outputLineSelected(OutputEvent ev) { // Let's not do anything special. } public void outputLineCleared(OutputEvent ev) { // Leave it blank, no state to remove. } }; w.println("Line of hyperlinked text.", listener, true);
|
Declare a module dependency on org.openide.io 1.9.31. You will very likely also want to declare
OpenIDE-Module-Requires: org.openide.windows.IOProvider
to ensure that an Output Window implementation is in fact enabled.
Read more about the implementation in the answers to architecture questions.
|
org.openide.io 1.9.31 | |||||||||
PREV NEXT | FRAMES NO FRAMES |