Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.io 1.9.22
PREV NEXT | FRAMES NO FRAMES

# NetBeans Input/Output API

InputOutputAPI

See:
Description

Input/Output API
org.openide.windows | Interfaces for working with input/output tabs.

InputOutputAPI

Just an API/SPI for defining the output window.

### What is New (see all changes)?

- Jan 12 '05 Added API to add actions to output's toolbar

  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.

- Nov 11 '04 Added API to mark OutputListeners a important

  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.

### Use Cases

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);

### Exported Interfaces

This table lists all of the module exported APIs with defined stability classifications. It is generated based on answers to questions about the architecture of the module. Read them all...

##### Group of java interfaces

Interface Name | In/Out | Stability | Specified in What Document?
InputOutputAPI | Exported | Official | .../org/openide/windows/package-summary.html Just an API/SPI for defining the output window.

### Implementation Details

##### What do other modules need to do to declare a dependency on this one?

Declare a module dependency on `org.openide.io 1.9.22`. 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.io 1.9.22
PREV NEXT | FRAMES NO FRAMES

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.