RPrintUtilities
Date: 2017-02-11

org.fife.print

## Class RPrintUtilities

- java.lang.Object
- - org.fife.print.RPrintUtilities

-     public abstract class RPrintUtilities
      extends java.lang.Object

  A collection of static methods useful for printing text from Swing text components.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RPrintUtilities()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `printDocumentMonospaced(java.awt.Graphics g, javax.swing.text.Document doc, int fontSize, int pageIndex, java.awt.print.PageFormat pageFormat, int tabSize)` Prints a `Document` using a monospaced font, and does no word wrapping (ie, words will wrap mid-word to the next line).
    `static int` | `printDocumentMonospacedWordWrap(java.awt.Graphics g, javax.swing.text.Document doc, int fontSize, int pageIndex, java.awt.print.PageFormat pageFormat, int tabSize)` Prints a `Document` using a monospaced font, word wrapping on the characters ' ', '\t', '\n', ',', '.', and ';'.
    `static int` | `printDocumentWordWrap(java.awt.Graphics g, javax.swing.text.JTextComponent textComponent, java.awt.Font font, int pageIndex, java.awt.print.PageFormat pageFormat, int tabSize)` Prints a `Document` using the specified font, word wrapping on the characters ' ', '\t', '\n', ',', '.', and ';'.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RPrintUtilities

          public RPrintUtilities()

  - ### Method Detail

    - #### printDocumentMonospaced

          public static int printDocumentMonospaced(java.awt.Graphics g,
                                    javax.swing.text.Document doc,
                                    int fontSize,
                                    int pageIndex,
                                    java.awt.print.PageFormat pageFormat,
                                    int tabSize)

      Prints a `Document` using a monospaced font, and does no word wrapping (ie, words will wrap mid-word to the next line). This method is expected to be called from Printable 'print(Graphics g)' functions.
      Parameters:
        `g` - The graphics context to write to.
        `doc` - The `javax.swing.text.Document` to print.
        `fontSize` - the point size to use for the monospaced font.
        `pageIndex` - The page number to print.
        `pageFormat` - The format to print the page with.
        `tabSize` - The number of spaces to expand tabs to.
      See Also:
        `printDocumentMonospacedWordWrap(java.awt.Graphics, javax.swing.text.Document, int, int, java.awt.print.PageFormat, int)`

    - #### printDocumentMonospacedWordWrap

          public static int printDocumentMonospacedWordWrap(java.awt.Graphics g,
                                            javax.swing.text.Document doc,
                                            int fontSize,
                                            int pageIndex,
                                            java.awt.print.PageFormat pageFormat,
                                            int tabSize)

      Prints a `Document` using a monospaced font, word wrapping on the characters ' ', '\t', '\n', ',', '.', and ';'. This method is expected to be called from Printable 'print(Graphics g)' functions.
      Parameters:
        `g` - The graphics context to write to.
        `doc` - The `javax.swing.text.Document` to print.
        `fontSize` - the point size to use for the monospaced font.
        `pageIndex` - The page number to print.
        `pageFormat` - The format to print the page with.
        `tabSize` - The number of spaces to expand tabs to.
      See Also:
        `printDocumentMonospaced(java.awt.Graphics, javax.swing.text.Document, int, int, java.awt.print.PageFormat, int)`

    - #### printDocumentWordWrap

          public static int printDocumentWordWrap(java.awt.Graphics g,
                                  javax.swing.text.JTextComponent textComponent,
                                  java.awt.Font font,
                                  int pageIndex,
                                  java.awt.print.PageFormat pageFormat,
                                  int tabSize)

      Prints a `Document` using the specified font, word wrapping on the characters ' ', '\t', '\n', ',', '.', and ';'. This method is expected to be called from Printable 'print(Graphics g)' functions.
      Parameters:
        `g` - The graphics context to write to.
        `textComponent` - The `javax.swing.text.JTextComponent` whose text you're printing.
        `font` - The font to use for printing. If `null`, then `textComponent`'s font is used.
        `pageIndex` - The page number to print.
        `pageFormat` - The format to print the page with.
        `tabSize` - The number of spaces to convert tabs to.