01: /*
02: * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
03: *
04: * The program is provided "as is" without any warranty express or
05: * implied, including the warranty of non-infringement and the implied
06: * warranties of merchantibility and fitness for a particular purpose.
07: * IBM will not be liable for any damages suffered by you as a result
08: * of using the Program. In no event will IBM be liable for any
09: * special, indirect or consequential damages or lost profits even if
10: * IBM has been advised of the possibility of their occurrence. IBM
11: * will not be liable for any third party claims against you.
12: */
13: package com.ibm.richtext.print;
14:
15: import com.ibm.richtext.styledtext.MConstText;
16:
17: import com.ibm.richtext.textlayout.attributes.AttributeMap;
18:
19: import java.awt.Frame;
20:
21: /**
22: * PrintingUtils contains a static method for printing styled text.
23: * @see com.ibm.richtext.styledtext.MConstText
24: */
25: public final class PrintingUtils {
26:
27: static final String COPYRIGHT = "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
28:
29: // Keep it out of Javadoc...
30: private PrintingUtils() {
31: }
32:
33: /**
34: * Print the given text. A Print dialog is presented to the user;
35: * unless the user cancels, the text is printed.
36: * @param text the text to print
37: * @param defaultStyles default values for unspecified attributes
38: * @param frame the parent of the Print dialog
39: * @param jobTitle the title of the PrintJob
40: */
41: public static void userPrintText(MConstText text,
42: AttributeMap defaultStyles, Frame frame, String jobTitle) {
43:
44: PrintContext
45: .userPrintText(text, defaultStyles, frame, jobTitle);
46: }
47: }
|