站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

OutputWriter (NetBeans Input/Output API) - NetBeans API Javadoc 4.1.0

 

org.openide.windows
Class OutputWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended byorg.openide.windows.OutputWriter

public abstract class OutputWriter
extends PrintWriter

A PrintWriter subclass for writing to a tab in the output window. To create hyperlinked lines, call println, passing an instance of OutputListener which should be called when a line is clicked or the caret in the output window enters it.


Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
protected OutputWriter(Writer w)
          Make an output writer.
 
Method Summary
abstract  void println(String s, OutputListener l)
          Print a line which will be displayed as a hyperlink, calling the passed OutputListener if it is clicked, if the caret enters it, or if the enter key is pressed over it.
 void println(String s, OutputListener l, boolean important)
          Print a line which will be displayed as a hyperlink, calling the passed OutputListener if it is clicked, if the caret enters it, or if the enter key is pressed over it.
abstract  void reset()
          Clear the output pane.
 
Methods inherited from class java.io.PrintWriter
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputWriter

protected OutputWriter(Writer w)
Make an output writer.

Parameters:
w - the underlying writer
Method Detail

println

public abstract void println(String s,
                             OutputListener l)
                      throws IOException
Print a line which will be displayed as a hyperlink, calling the passed OutputListener if it is clicked, if the caret enters it, or if the enter key is pressed over it.

Parameters:
s - a string to print to the tab
l - a listener that will receive events about this line
Throws:
IOException - if the string could not be printed

println

public void println(String s,
                    OutputListener l,
                    boolean important)
             throws IOException
Print a line which will be displayed as a hyperlink, calling the passed OutputListener if it is clicked, if the caret enters it, or if the enter key is pressed over it. Implementors of this class are encouraged to override this method, which is not abstract for backward compatibility reasons only.

Parameters:
s - a string to print to the tab
l - a listener that will receive events about this line
important - mark the line as important. Makes the UI respond appropriately, eg. stop the automatic scrolling or highlight the hyperlink.
Throws:
IOException - if the string could not be printed
Since:
1.5

reset

public abstract void reset()
                    throws IOException
Clear the output pane. Expect this method to be deprecated in a future release and an equivalent created in InputOutput. It is ambiguous what it means to reset stdout but not stderr, etc. For the current implementation, reset should be called on the stdout.

Throws:
IOException - if there is a problem

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.