KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > export > DefaultRtfExportView


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12
13 package org.displaytag.export;
14
15 import java.io.OutputStream JavaDoc;
16
17 import com.lowagie.text.Document;
18 import com.lowagie.text.rtf.RtfWriter2;
19
20
21 /**
22  * RTF exporter using iText.
23  * @author Jorge L. Barroso
24  * @version $Revision$ ($Author$)
25  */

26 public class DefaultRtfExportView extends DefaultItextExportView
27 {
28
29     /**
30      * @see org.displaytag.export.BaseExportView#getMimeType()
31      * @return "application/rtf"
32      */

33     public String JavaDoc getMimeType()
34     {
35         return "application/rtf"; //$NON-NLS-1$
36
}
37
38     /**
39      * Initializes the RTF writer this export view uses to write the table document.
40      * @param document The iText document to be written.
41      * @param out The output stream to which the document is written.
42      */

43     protected void initItextWriter(Document document, OutputStream JavaDoc out)
44     {
45         RtfWriter2.getInstance(document, out);
46     }
47 }
48
Popular Tags