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