org.openide.windows.OutputWriter.print()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(78)

本文整理了Java中org.openide.windows.OutputWriter.print()方法的一些代码示例,展示了OutputWriter.print()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OutputWriter.print()方法的具体详情如下:
包路径:org.openide.windows.OutputWriter
类名称:OutputWriter
方法名:print

OutputWriter.print介绍

[英]Print a line which will be displayed as a hyperlink, calling the passed org.openide.windows.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.
[中]打印一行,显示为超链接,调用传递的组织。openide。窗户。OutputListener,如果单击它,如果插入符号输入它,或者如果在上面按enter键。我们鼓励此类的实现者重写该方法,该方法并非仅出于向后兼容性的原因而抽象。

代码示例

代码示例来源:origin: org.codehaus.mevenide/nb-project

public synchronized void run() {
  if (buff.length() > 0) {
    writer.print(buff.toString());
    buff.setLength(0);
  }
}

代码示例来源:origin: org.codehaus.mevenide/nb-project

} else {
  if (System.currentTimeMillis() - stamp > 700) {
    writer.print(buf.toString());
    buf.setLength(0);
    chr = str.read();

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui

void hyperlink(AntSession session, AntEvent event, FileObject source,
      int messageLevel, int sessionLevel, SessionData data) {
    if (messageLevel <= sessionLevel && !event.isConsumed()) {
      OutputListener hyperlink;
      try {
        hyperlink = session.createStandardHyperlink(source.getURL(), guessExceptionMessage(data), lineNumber, -1, -1, -1);
      } catch (FileStateInvalidException e) {
        assert false : e;
        return;
      }
      event.consume();
      InputOutput io = session.getIO();
      if (IOColorPrint.isSupported(io)) {
        try {
          OutputWriter out = messageLevel <= AntEvent.LOG_WARN ? io.getErr() : /* #174781 1/2 */io.getOut();
          boolean important = prePart.contains(/* #174781 2/2 */"at ") && /* e.g. InstalledFileLocatorImpl.findCaller */!prePart.contains("WARNING"); // NOI18N
          out.print(prePart);
          IOColorPrint.print(io, midPart, hyperlink, important, null);
          out.println(endPart);
          return;
        } catch (IOException x) {
          Exceptions.printStackTrace(x);
        }
      }
      session.println(line, true, hyperlink);
    }
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-glassfish-javaee

/**
 * Writes a message into output
 * 
 * @param s message to write
 */
public synchronized void write(String s) {
  io.getOut().print(s);
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-docker-ui

@Override
public void run() {
  ActionChunkedResult.Chunk r;
  try {
    while ((r = logResult.fetchChunk()) != null) {
      if (r.isError()) {
        io.getErr().print(r.getData());
      } else {
        io.getOut().print(r.getData());
      }
    }
  } finally {
    close();
  }
}

代码示例来源:origin: org.codehaus.mevenide/nb-project

while (line != null) {
   if (line.startsWith("&^#INCOMPLINE:")) {
     stdOut.print(line.substring("&^#INCOMPLINE:".length()));
     line = readLine();
     continue;

相关文章