Print the specified text to the specified PrintWriter.

@param aPW
The printWriter to write the help to
@param nWidth
The number of characters to display per line
@param sText
The text to be written to the PrintWriter
327188
public void printWrapped (@Nonnull final PrintWriter aPW, final int nWidth, @Nonnull final String sText)
  {
    printWrapped (aPW, nWidth, 0, sText);
  }
454964
public final void printString(CharSequence text)
        throws IOException
    {
        if (text == null)
        {
            appendAscii("null.string");
        }
        else
        {
            appendAscii('"');
            printCodePoints(text, STRING_ESCAPE_CODES);
            appendAscii('"');
        }
    }
791473
public void printHelp(final PrintWriter out) {
        HelpFormatter hf = new HelpFormatter();
        StringBuilder sbDivider = new StringBuilder("=");
        while (sbDivider.length() < hf.getPageWidth()) {
            sbDivider.append('=');
        }
        out.println(sbDivider.toString());
        out.println("PLUGIN NAME : " + proxyedPluginDefinition.getName());
        if (description != null && description.trim().length() != 0) {
            out.println(sbDivider.toString());
            out.println("Description : ");
            out.println();
            out.println(description);
        }

        hf.setGroup(mainOptionsGroup);
        // hf.setHeader(m_pluginDef.getName());
        hf.setDivider(sbDivider.toString());
        hf.setPrintWriter(out);
        hf.print();
        // hf.printHelp(m_pluginDef.getName(), m_Options);
    }
1170925
public void output(String output)
        throws XMLStreamException
    {
        if (mIsFlattening > 0) {
            try {
                mWriter.write(output);
            } catch (IOException ioe) {
                throw new WstxIOException(ioe);
            }
        }
    }
650265
private void printWarning(String prefix, String msg) {
        if (nwarnings < MaxWarnings) {
            PrintWriter warnWriter = getWriter(WriterKind.WARNING);
            printRawLines(warnWriter, prefix + ": " + getText("javadoc.warning") + " - " + msg);
            warnWriter.flush();
            nwarnings++;
        }
    }
916836
public boolean printData(PrintWriter out, int iPrintOptions)
    {
        boolean bFieldsFound = false;
        String strFieldName = this.getScreenField().getSFieldParam();
        String strFieldData = this.getZmlImagePath();
        if (strFieldData == null)
            strFieldData = HtmlConstants.ICON_DIR + "Noimage.gif";
        strFieldData = Utility.encodeXML(strFieldData);
        out.println("    " + Utility.startTag(strFieldName) + strFieldData + Utility.endTag(strFieldName));
        return bFieldsFound;
    }
761554
protected void write(String toWrite) throws IOException  {
    if(!okToWrite)
      throw new IOException("file not open for writing.");

    if(printToScreen)
      System.out.print(toWrite);

    try {
      fw.write(toWrite);
    } catch (IOException e) {
      okToWrite = false;
      throw e;
    }
  }
958828
private void print(String text) {
    String indent = Strings.repeat(" ", mIndentationLevel * INDENT_SIZE);
    mPrintStream.println(indent + text);
  }
47008
public void writeOntTxt(PrintWriter pw) {
        for (String id : terms.keySet()) {
            OntologyTerm term = terms.get(id);
            Set<String> synSet = new HashSet<String>();
            synSet.add(term.getName());
            for (Synonym s : term.getSynonyms()) {
                String st = s.getType();
                if (id.startsWith("PTCO")
                        || (st != null && !st
                                .matches(".*(InChI|SMILES|FORMULA).*"))) {
                    String synonym = s.getSyn();
                    if (!synonym.matches("\\S")) {// reject ontology terms
                                                  // consisting of a single
                                                  // letter as these produce too
                                                  // many false positives
                        synSet.add(synonym);
                    }
                }
            }

            pw.println("[" + id + "]");
            for (String syn : synSet)
                pw.println(syn);
            pw.println();
        }
        pw.flush();
    }
452157
public void printUsage(PrintWriter pw, int width, String cmdLineSyntax)
    {
        int argPos = cmdLineSyntax.indexOf(' ') + 1;

        printWrapped(pw, width, getSyntaxPrefix().length() + argPos, getSyntaxPrefix() + cmdLineSyntax);
    }
621499
private void printText(PrintWriter pw, String key, String defaultText) {
        String text = null;
        if (key != null) {
            ResourceBundle bundle = null;

            // retrieve the resource bundle
            try {
                bundle = ResourceBundle.getBundle(DIST_EX_RESOURCE_BUNDLE_NAME);
            } catch (MissingResourceException e) {
                text = defaultText;
            }

            // if the resource bundle was successfully retrieved, get the specific text based
            // on the resource key
            if (bundle != null) {
                try {
                    text = bundle.getString(key);
                } catch (MissingResourceException e) {
                    text = defaultText;
                }
            }
        } else { // no key was provided
            text = defaultText;
        }

        pw.println(text);
    }
1088657
@Override
  public void write(TextWriterStream out, String label, T[] v) {
    StringBuilder buf = new StringBuilder();
    if(label != null) {
      buf.append(label).append('=');
    }
    if(v != null) {
      for (T o : v) {
        buf.append(o.toString());
      }
    }
    out.inlinePrintNoQuotes(buf.toString());
  }
1242055
public void printNavButtonControls(PrintWriter out, int iPrintOptions)
    {
        out.println("<tr>");
        int iNumCols = ((BaseGridScreen)this.getScreenField()).getSFieldCount();
        for (int i = 0; i < iNumCols; i++)
        {       // First, print the nav controls
            ScreenField sField = ((BaseGridScreen)this.getScreenField()).getSField(i);
            HScreenField sFieldView = (HScreenField)sField.getScreenFieldView();
            boolean bPrintControl = this.getScreenField().isPrintableControl(sField, iPrintOptions);
//x            if (sField instanceof BasePanel)
//x                bPrintControl = false;  // ?
            if (i < ((BaseGridScreen)this.getScreenField()).getNavCount())
                bPrintControl = true;
            if (bPrintControl)
                sFieldView.printHtmlHeading(out);
        }
        out.println("</tr>");
    }
782804
public static void writeNode(Node node, List<BelTerm> supportingTerms,
            PrintWriter writer) {
        int x = new Random().nextInt(200);
        int y = new Random().nextInt(200);

        StringBuilder sb = new StringBuilder();
        sb.append("  <node label='");
        sb.append(node.label);
        sb.append("' id='");
        sb.append(node.id.toString());
        sb.append("'>\n");
        sb.append("    <att name='function type'");
        sb.append(" value='");
        sb.append(node.function.getDisplayValue());
        sb.append("' />\n");
        sb.append("    <att name='parameters'");
        sb.append(" value='");

        String params = "";
        for (BelTerm t : supportingTerms) {
            if (hasLength(params)) {
                params = params.concat("&#10;");
            }
            String label = t.getLabel();
            label = label.replaceAll("&", "&amp;");
            label = label.replaceAll("'", "&quot;");
            params = params.concat(label);
        }
        sb.append(params);
        sb.append("' />\n");

        // Graphics type and fill color
        String graphics = format(NODE_GRAPHICS, type(node.function),
                color(node.function), x, y, params);
        sb.append(graphics);

        sb.append("  </node>\n");
        writer.write(sb.toString());
    }
616599
public static void printDom(Node n, String prefix) {
    String outString = prefix;
    if (n.getNodeType() == Node.TEXT_NODE) {
      outString += "'" + n.getTextContent().trim() + "'";
    } else {
      outString += n.getNodeName();
    }
    System.out.println(outString);
    NodeList children = n.getChildNodes();
    int length = children.getLength();
    for (int i = 0; i < length; i++) {
      FacebookXmlRestClient.printDom(children.item(i), prefix + "  ");
    }
  }
418759
public void toAngelCodeText(PrintStream out, String imageName) {
		out.println("info face=\""+fontName+"\" size="+size+" bold=0 italic=0 charset=\""+setName+"\" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1");
		out.println("common lineHeight="+lineHeight+" base=26 scaleW="+width+" scaleH="+height+" pages=1 packed=0");
		out.println("page id=0 file=\""+imageName+"\"");

		out.println("chars count="+chars.size());
		for (int i=0;i<chars.size();i++) {
			CharData c = (CharData) chars.get(i);
			out.println("char id="+c.getID()+"   x="+c.getX()+"     y="+c.getY()+"     width="+c.getWidth()+"     height="+c.getHeight()+"     xoffset=0     yoffset="+c.getYOffset()+"    xadvance="+c.getXAdvance()+"     page=0  chnl=0 ");
		}
		out.println("kernings count="+kerning.size());
		for (int i=0;i<kerning.size();i++) {
			KerningData k = (KerningData) kerning.get(i);
			out.println("kerning first="+k.first+"  second="+k.second+"  amount="+k.offset);
		}
	}
1098502
public void setHTMLText(String strHtmlText)
    {
    	if (m_helpPane != null)
    		m_helpPane.setVisible(strHtmlText != null);

    	this.getTaskScheduler().addTask(PrivateTaskScheduler.CLEAR_JOBS);     // Dump any stacked tasks
        Thread thread = new SwingSyncPageWorker(this, new SyncPageLoader(null, strHtmlText, this, m_applet, false));
        this.getTaskScheduler().addTask(thread);
    }