Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.swt.custom
Class StyledTextPrintOptions


java.lang.Object
  extended by 
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:
Sample code and further information

Field Summary
  String footer
          Formatted text to print in the footer of each page.
  String header
          Formatted text to print in the header of each page.
  String jobName
          Name of the print job.
  String[] lineLabels
          Labels used for printing line numbers.
static  String PAGE_TAG
          Page number placeholder constant for use in header and footer.
 boolean printLineBackground
          Print the line background color.
 boolean printLineNumbers
          Print line numbers.
 boolean printTextBackground
          Print the text background color.
 boolean printTextFontStyle
          Print the font styles.
 boolean printTextForeground
          Print the text foreground color.
static  String SEPARATOR
          Separator constant for use in header and footer.
 
Constructor Summary
StyledTextPrintOptions ()
           
 
Method Summary
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAGE_TAG

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

See Also:
Constant Field Values

SEPARATOR

public static final 
String SEPARATOR
Separator constant for use in header and footer. Value is \t

See Also:
Constant Field Values

header

public 
String header
Formatted text to print in the header of each page.

"left '\t' center '\t' right"

left, center, right = <page> | #CDATA

Header and footer are defined as three separate regions for arbitrary text or the page number placeholder <page> (StyledTextPrintOptions.PAGE_TAG). The three regions are left aligned, centered and right aligned. They are separated by a tab character (StyledTextPrintOptions.SEPARATOR).


footer

public 
String footer
Formatted text to print in the footer of each page.

"left '\t' center '\t' right"

left, center, right = <page> | #CDATA

Header and footer are defined as three separate regions for arbitrary text or the page number placeholder <page> (StyledTextPrintOptions.PAGE_TAG). The three regions are left aligned, centered and right aligned. They are separated by a tab character (StyledTextPrintOptions.SEPARATOR).


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 Detail

StyledTextPrintOptions

public StyledTextPrintOptions()

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire