Class StyledTextPrintOptions

java.lang.Object
org.eclipse.swt.custom.StyledTextPrintOptions

public class StyledTextPrintOptions extends Object
Use StyledTextPrintOptions to specify printing options for the StyledText.print(Printer, StyledTextPrintOptions) API.

The following example prints a right aligned page number in the footer, sets the job name to "Example" and prints line background colors but no other formatting:

 StyledTextPrintOptions options = new StyledTextPrintOptions();
 options.footer = "\t\t<page>";
 options.jobName = "Example";
 options.printLineBackground = true;

 Runnable runnable = styledText.print(new Printer(), options);
 runnable.run();
 
Since:
2.1
See Also:
  • Field Details

    • PAGE_TAG

      public static final String PAGE_TAG
      Page number placeholder constant for use in header and footer. Value is <page>
      See Also:
    • SEPARATOR

      public static final String SEPARATOR
      Separator constant for use in header and footer. Value is \t
      See Also:
    • jobName

      public String jobName
      Name of the print job.
    • printTextForeground

      public boolean printTextForeground
      Print the text foreground color. Default value is false.
    • printTextBackground

      public boolean printTextBackground
      Print the text background color. Default value is false.
    • printTextFontStyle

      public boolean printTextFontStyle
      Print the font styles. Default value is false.
    • printLineBackground

      public boolean printLineBackground
      Print the line background color. Default value is false.
    • printLineNumbers

      public boolean printLineNumbers
      Print line numbers. Default value is false.
      Since:
      3.3
    • lineLabels

      public String[] lineLabels
      Labels used for printing line numbers.
      Since:
      3.4
  • Constructor Details

    • StyledTextPrintOptions

      public StyledTextPrintOptions()