Top Description Fields Constructors Methods
org.eclipse.swt.custom

public Class StyledTextPrintOptions

extends Object
Class Inheritance

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
Sample code and further information

Field Summary

Modifier and TypeField and Description
public String
footer

Formatted text to print in the footer of each page.

public String
header

Formatted text to print in the header of each page.

public String
jobName

Name of the print job.

public String[]
lineLabels

Labels used for printing line numbers.

public static final String
PAGE_TAG

Page number placeholder constant for use in header and footer.

public boolean
printLineBackground

Print the line background color.

public boolean
printLineNumbers

Print line numbers.

public boolean
printTextBackground

Print the text background color.

public boolean
printTextFontStyle

Print the font styles.

public boolean
printTextForeground

Print the text foreground color.

public static final String
SEPARATOR

Separator constant for use in header and footer.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jobNameback to summary
public String jobName

Name of the print job.

lineLabelsback to summary
public String[] lineLabels

Labels used for printing line numbers.

Since
3.4
PAGE_TAGback to summary
public static final String PAGE_TAG

Page number placeholder constant for use in header and footer. Value is <page>

printLineBackgroundback to summary
public boolean printLineBackground

Print the line background color. Default value is false.

printLineNumbersback to summary
public boolean printLineNumbers

Print line numbers. Default value is false.

Since
3.3
printTextBackgroundback to summary
public boolean printTextBackground

Print the text background color. Default value is false.

printTextFontStyleback to summary
public boolean printTextFontStyle

Print the font styles. Default value is false.

printTextForegroundback to summary
public boolean printTextForeground

Print the text foreground color. Default value is false.

SEPARATORback to summary
public static final String SEPARATOR

Separator constant for use in header and footer. Value is \t

Constructor Detail

StyledTextPrintOptionsback to summary
public StyledTextPrintOptions()