Mon, 09 Mar 2009 13:29:06 -0700
6814575: Update copyright year
Summary: Update copyright for files that have been modified in 2009, up to 03/09
Reviewed-by: katleman, tbell, ohair
1 /*
2 * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
26 package com.sun.tools.doclets.formats.html.markup;
28 import com.sun.tools.doclets.internal.toolkit.*;
29 import com.sun.tools.doclets.internal.toolkit.util.*;
30 import java.io.*;
32 /**
33 * Class for the Html format code generation.
34 * Initilizes PrintWriter with FileWriter, to enable print
35 * related methods to generate the code to the named File through FileWriter.
36 *
37 * @since 1.2
38 * @author Atul M Dambalkar
39 */
40 public class HtmlWriter extends PrintWriter {
42 /**
43 * Name of the file, to which this writer is writing to.
44 */
45 protected final String htmlFilename;
47 /**
48 * The window title of this file
49 */
50 protected String winTitle;
52 /**
53 * URL file separator string("/").
54 */
55 public static final String fileseparator =
56 DirectoryManager.URL_FILE_SEPERATOR;
58 /**
59 * The configuration
60 */
61 protected Configuration configuration;
63 /**
64 * Constructor.
65 *
66 * @param path The directory path to be created for this file
67 * or null if none to be created.
68 * @param filename File Name to which the PrintWriter will
69 * do the Output.
70 * @param docencoding Encoding to be used for this file.
71 * @exception IOException Exception raised by the FileWriter is passed on
72 * to next level.
73 * @exception UnSupportedEncodingException Exception raised by the
74 * OutputStreamWriter is passed on to next level.
75 */
76 public HtmlWriter(Configuration configuration,
77 String path, String filename, String docencoding)
78 throws IOException, UnsupportedEncodingException {
79 super(Util.genWriter(configuration, path, filename, docencoding));
80 this.configuration = configuration;
81 htmlFilename = filename;
82 }
84 /**
85 * Print <HTML> tag. Add a newline character at the end.
86 */
87 public void html() {
88 println("<HTML lang=\"" + configuration.getLocale().getLanguage() + "\">");
89 }
91 /**
92 * Print </HTML> tag. Add a newline character at the end.
93 */
94 public void htmlEnd() {
95 println("</HTML>");
96 }
98 /**
99 * Print the script code to be embeded before the </HEAD> tag.
100 */
101 protected void printWinTitleScript(String winTitle){
102 if(winTitle != null && winTitle.length() > 0) {
103 script();
104 println("function windowTitle()");
105 println("{");
106 println(" if (location.href.indexOf('is-external=true') == -1) {");
107 println(" parent.document.title=\"" + winTitle + "\";");
108 println(" }");
109 println("}");
110 scriptEnd();
111 noScript();
112 noScriptEnd();
113 }
114 }
116 /**
117 * Print the Javascript <SCRIPT> start tag with its type
118 * attribute.
119 */
120 public void script() {
121 println("<SCRIPT type=\"text/javascript\">");
122 }
124 /**
125 * Print the Javascript </SCRIPT> end tag.
126 */
127 public void scriptEnd() {
128 println("</SCRIPT>");
129 }
131 /**
132 * Print the Javascript <NOSCRIPT> start tag.
133 */
134 public void noScript() {
135 println("<NOSCRIPT>");
136 }
138 /**
139 * Print the Javascript </NOSCRIPT> end tag.
140 */
141 public void noScriptEnd() {
142 println("</NOSCRIPT>");
143 }
145 /**
146 * Return the Javascript call to be embedded in the <BODY> tag.
147 * Return nothing if winTitle is empty.
148 * @return the Javascript call to be embedded in the <BODY> tag.
149 */
150 protected String getWindowTitleOnload(){
151 if(winTitle != null && winTitle.length() > 0) {
152 return " onload=\"windowTitle();\"";
153 } else {
154 return "";
155 }
156 }
158 /**
159 * Print <BODY BGCOLOR="bgcolor">, including JavaScript
160 * "onload" call to load windowtitle script. This script shows the name
161 * of the document in the window title bar when frames are on.
162 *
163 * @param bgcolor Background color.
164 * @param includeScript boolean set true if printing windowtitle script
165 */
166 public void body(String bgcolor, boolean includeScript) {
167 print("<BODY BGCOLOR=\"" + bgcolor + "\"");
168 if (includeScript) {
169 print(getWindowTitleOnload());
170 }
171 println(">");
172 }
174 /**
175 * Print </BODY> tag. Add a newline character at the end.
176 */
177 public void bodyEnd() {
178 println("</BODY>");
179 }
181 /**
182 * Print <TITLE> tag. Add a newline character at the end.
183 */
184 public void title() {
185 println("<TITLE>");
186 }
188 /**
189 * Print <TITLE> tag. Add a newline character at the end.
190 *
191 * @param winTitle The title of this document.
192 */
193 public void title(String winTitle) {
194 // Set window title string which is later printed
195 this.winTitle = winTitle;
196 title();
197 }
200 /**
201 * Print </TITLE> tag. Add a newline character at the end.
202 */
203 public void titleEnd() {
204 println("</TITLE>");
205 }
207 /**
208 * Print <UL> tag. Add a newline character at the end.
209 */
210 public void ul() {
211 println("<UL>");
212 }
214 /**
215 * Print </UL> tag. Add a newline character at the end.
216 */
217 public void ulEnd() {
218 println("</UL>");
219 }
221 /**
222 * Print <LI> tag.
223 */
224 public void li() {
225 print("<LI>");
226 }
228 /**
229 * Print <LI TYPE="type"> tag.
230 *
231 * @param type Type string.
232 */
233 public void li(String type) {
234 print("<LI TYPE=\"" + type + "\">");
235 }
237 /**
238 * Print <H1> tag. Add a newline character at the end.
239 */
240 public void h1() {
241 println("<H1>");
242 }
244 /**
245 * Print </H1> tag. Add a newline character at the end.
246 */
247 public void h1End() {
248 println("</H1>");
249 }
251 /**
252 * Print text with <H1> tag. Also adds </H1> tag. Add a newline character
253 * at the end of the text.
254 *
255 * @param text Text to be printed with <H1> format.
256 */
257 public void h1(String text) {
258 h1();
259 println(text);
260 h1End();
261 }
263 /**
264 * Print <H2> tag. Add a newline character at the end.
265 */
266 public void h2() {
267 println("<H2>");
268 }
270 /**
271 * Print text with <H2> tag. Also adds </H2> tag. Add a newline character
272 * at the end of the text.
273 *
274 * @param text Text to be printed with <H2> format.
275 */
276 public void h2(String text) {
277 h2();
278 println(text);
279 h2End();
280 }
282 /**
283 * Print </H2> tag. Add a newline character at the end.
284 */
285 public void h2End() {
286 println("</H2>");
287 }
289 /**
290 * Print <H3> tag. Add a newline character at the end.
291 */
292 public void h3() {
293 println("<H3>");
294 }
296 /**
297 * Print text with <H3> tag. Also adds </H3> tag. Add a newline character
298 * at the end of the text.
299 *
300 * @param text Text to be printed with <H3> format.
301 */
302 public void h3(String text) {
303 h3();
304 println(text);
305 h3End();
306 }
308 /**
309 * Print </H3> tag. Add a newline character at the end.
310 */
311 public void h3End() {
312 println("</H3>");
313 }
315 /**
316 * Print <H4> tag. Add a newline character at the end.
317 */
318 public void h4() {
319 println("<H4>");
320 }
322 /**
323 * Print </H4> tag. Add a newline character at the end.
324 */
325 public void h4End() {
326 println("</H4>");
327 }
329 /**
330 * Print text with <H4> tag. Also adds </H4> tag. Add a newline character
331 * at the end of the text.
332 *
333 * @param text Text to be printed with <H4> format.
334 */
335 public void h4(String text) {
336 h4();
337 println(text);
338 h4End();
339 }
341 /**
342 * Print <H5> tag. Add a newline character at the end.
343 */
344 public void h5() {
345 println("<H5>");
346 }
348 /**
349 * Print </H5> tag. Add a newline character at the end.
350 */
351 public void h5End() {
352 println("</H5>");
353 }
355 /**
356 * Print HTML <IMG SRC="imggif" WIDTH="width" HEIGHT="height" ALT="imgname>
357 * tag. It prepends the "images" directory name to the "imggif". This
358 * method is used for oneone format generation. Add a newline character
359 * at the end.
360 *
361 * @param imggif Image GIF file.
362 * @param imgname Image name.
363 * @param width Width of the image.
364 * @param height Height of the image.
365 */
366 public void img(String imggif, String imgname, int width, int height) {
367 println("<IMG SRC=\"images/" + imggif + ".gif\""
368 + " WIDTH=\"" + width + "\" HEIGHT=\"" + height
369 + "\" ALT=\"" + imgname + "\">");
370 }
372 /**
373 * Print <MENU> tag. Add a newline character at the end.
374 */
375 public void menu() {
376 println("<MENU>");
377 }
379 /**
380 * Print </MENU> tag. Add a newline character at the end.
381 */
382 public void menuEnd() {
383 println("</MENU>");
384 }
386 /**
387 * Print <PRE> tag. Add a newline character at the end.
388 */
389 public void pre() {
390 println("<PRE>");
391 }
393 /**
394 * Print <PRE> tag without adding new line character at th eend.
395 */
396 public void preNoNewLine() {
397 print("<PRE>");
398 }
400 /**
401 * Print </PRE> tag. Add a newline character at the end.
402 */
403 public void preEnd() {
404 println("</PRE>");
405 }
407 /**
408 * Print <HR> tag. Add a newline character at the end.
409 */
410 public void hr() {
411 println("<HR>");
412 }
414 /**
415 * Print <HR SIZE="size" WIDTH="widthpercent%"> tag. Add a newline
416 * character at the end.
417 *
418 * @param size Size of the ruler.
419 * @param widthPercent Percentage Width of the ruler
420 */
421 public void hr(int size, int widthPercent) {
422 println("<HR SIZE=\"" + size + "\" WIDTH=\"" + widthPercent + "%\">");
423 }
425 /**
426 * Print <HR SIZE="size" NOSHADE> tag. Add a newline character at the end.
427 *
428 * @param size Size of the ruler.
429 * @param noshade noshade string.
430 */
431 public void hr(int size, String noshade) {
432 println("<HR SIZE=\"" + size + "\" NOSHADE>");
433 }
435 /**
436 * Get the "<STRONG>" string.
437 *
438 * @return String Return String "<STRONG>";
439 */
440 public String getStrong() {
441 return "<STRONG>";
442 }
444 /**
445 * Get the "</STRONG>" string.
446 *
447 * @return String Return String "</STRONG>";
448 */
449 public String getStrongEnd() {
450 return "</STRONG>";
451 }
453 /**
454 * Print <STRONG> tag.
455 */
456 public void strong() {
457 print("<STRONG>");
458 }
460 /**
461 * Print </STRONG> tag.
462 */
463 public void strongEnd() {
464 print("</STRONG>");
465 }
467 /**
468 * Print text passed, in strong format using <STRONG> and </STRONG> tags.
469 *
470 * @param text String to be printed in between <STRONG> and </STRONG> tags.
471 */
472 public void strong(String text) {
473 strong();
474 print(text);
475 strongEnd();
476 }
478 /**
479 * Print text passed, in Italics using <I> and </I> tags.
480 *
481 * @param text String to be printed in between <I> and </I> tags.
482 */
483 public void italics(String text) {
484 print("<I>");
485 print(text);
486 println("</I>");
487 }
489 /**
490 * Return, text passed, with Italics <I> and </I> tags, surrounding it.
491 * So if the text passed is "Hi", then string returned will be "<I>Hi</I>".
492 *
493 * @param text String to be printed in between <I> and </I> tags.
494 */
495 public String italicsText(String text) {
496 return "<I>" + text + "</I>";
497 }
499 public String codeText(String text) {
500 return "<CODE>" + text + "</CODE>";
501 }
503 /**
504 * Print "&nbsp;", non-breaking space.
505 */
506 public void space() {
507 print(" ");
508 }
510 /**
511 * Print <DL> tag. Add a newline character at the end.
512 */
513 public void dl() {
514 println("<DL>");
515 }
517 /**
518 * Print </DL> tag. Add a newline character at the end.
519 */
520 public void dlEnd() {
521 println("</DL>");
522 }
524 /**
525 * Print <DT> tag.
526 */
527 public void dt() {
528 print("<DT>");
529 }
531 /**
532 * Print <DT> tag.
533 */
534 public void dd() {
535 print("<DD>");
536 }
538 /**
539 * Print </DD> tag. Add a newline character at the end.
540 */
541 public void ddEnd() {
542 println("</DD>");
543 }
545 /**
546 * Print <SUP> tag. Add a newline character at the end.
547 */
548 public void sup() {
549 println("<SUP>");
550 }
552 /**
553 * Print </SUP> tag. Add a newline character at the end.
554 */
555 public void supEnd() {
556 println("</SUP>");
557 }
559 /**
560 * Print <FONT SIZE="size"> tag. Add a newline character at the end.
561 *
562 * @param size String size.
563 */
564 public void font(String size) {
565 println("<FONT SIZE=\"" + size + "\">");
566 }
568 /**
569 * Print <FONT SIZE="size"> tag.
570 *
571 * @param size String size.
572 */
573 public void fontNoNewLine(String size) {
574 print("<FONT SIZE=\"" + size + "\">");
575 }
577 /**
578 * Print <FONT CLASS="stylename"> tag. Add a newline character at the end.
579 *
580 * @param stylename String stylename.
581 */
582 public void fontStyle(String stylename) {
583 print("<FONT CLASS=\"" + stylename + "\">");
584 }
586 /**
587 * Print <FONT SIZE="size" CLASS="stylename"> tag. Add a newline character
588 * at the end.
589 *
590 * @param size String size.
591 * @param stylename String stylename.
592 */
593 public void fontSizeStyle(String size, String stylename) {
594 println("<FONT size=\"" + size + "\" CLASS=\"" + stylename + "\">");
595 }
597 /**
598 * Print </FONT> tag.
599 */
600 public void fontEnd() {
601 print("</FONT>");
602 }
604 /**
605 * Get the "<FONT COLOR="color">" string.
606 *
607 * @param color String color.
608 * @return String Return String "<FONT COLOR="color">".
609 */
610 public String getFontColor(String color) {
611 return "<FONT COLOR=\"" + color + "\">";
612 }
614 /**
615 * Get the "</FONT>" string.
616 *
617 * @return String Return String "</FONT>";
618 */
619 public String getFontEnd() {
620 return "</FONT>";
621 }
623 /**
624 * Print <CENTER> tag. Add a newline character at the end.
625 */
626 public void center() {
627 println("<CENTER>");
628 }
630 /**
631 * Print </CENTER> tag. Add a newline character at the end.
632 */
633 public void centerEnd() {
634 println("</CENTER>");
635 }
637 /**
638 * Print anchor <A NAME="name"> tag.
639 *
640 * @param name Name String.
641 */
642 public void aName(String name) {
643 print("<A NAME=\"" + name + "\">");
644 }
646 /**
647 * Print </A> tag.
648 */
649 public void aEnd() {
650 print("</A>");
651 }
653 /**
654 * Print <I> tag.
655 */
656 public void italic() {
657 print("<I>");
658 }
660 /**
661 * Print </I> tag.
662 */
663 public void italicEnd() {
664 print("</I>");
665 }
667 /**
668 * Print contents within anchor <A NAME="name"> tags.
669 *
670 * @param name String name.
671 * @param content String contents.
672 */
673 public void anchor(String name, String content) {
674 aName(name);
675 print(content);
676 aEnd();
677 }
679 /**
680 * Print anchor <A NAME="name"> and </A>tags. Print comment string
681 * "<!-- -->" within those tags.
682 *
683 * @param name String name.
684 */
685 public void anchor(String name) {
686 anchor(name, "<!-- -->");
687 }
689 /**
690 * Print newline and then print <P> tag. Add a newline character at the
691 * end.
692 */
693 public void p() {
694 println();
695 println("<P>");
696 }
698 /**
699 * Print newline and then print </P> tag. Add a newline character at the
700 * end.
701 */
702 public void pEnd() {
703 println();
704 println("</P>");
705 }
707 /**
708 * Print newline and then print <BR> tag. Add a newline character at the
709 * end.
710 */
711 public void br() {
712 println();
713 println("<BR>");
714 }
716 /**
717 * Print <ADDRESS> tag. Add a newline character at the end.
718 */
719 public void address() {
720 println("<ADDRESS>");
721 }
723 /**
724 * Print </ADDRESS> tag. Add a newline character at the end.
725 */
726 public void addressEnd() {
727 println("</ADDRESS>");
728 }
730 /**
731 * Print <HEAD> tag. Add a newline character at the end.
732 */
733 public void head() {
734 println("<HEAD>");
735 }
737 /**
738 * Print </HEAD> tag. Add a newline character at the end.
739 */
740 public void headEnd() {
741 println("</HEAD>");
742 }
744 /**
745 * Print <CODE> tag.
746 */
747 public void code() {
748 print("<CODE>");
749 }
751 /**
752 * Print </CODE> tag.
753 */
754 public void codeEnd() {
755 print("</CODE>");
756 }
758 /**
759 * Print <EM> tag. Add a newline character at the end.
760 */
761 public void em() {
762 println("<EM>");
763 }
765 /**
766 * Print </EM> tag. Add a newline character at the end.
767 */
768 public void emEnd() {
769 println("</EM>");
770 }
772 /**
773 * Print HTML <TABLE BORDER="border" WIDTH="width"
774 * CELLPADDING="cellpadding" CELLSPACING="cellspacing"> tag.
775 *
776 * @param border Border size.
777 * @param width Width of the table.
778 * @param cellpadding Cellpadding for the table cells.
779 * @param cellspacing Cellspacing for the table cells.
780 */
781 public void table(int border, String width, int cellpadding,
782 int cellspacing) {
783 println(DocletConstants.NL +
784 "<TABLE BORDER=\"" + border +
785 "\" WIDTH=\"" + width +
786 "\" CELLPADDING=\"" + cellpadding +
787 "\" CELLSPACING=\"" + cellspacing +
788 "\" SUMMARY=\"\">");
789 }
791 /**
792 * Print HTML <TABLE BORDER="border" CELLPADDING="cellpadding"
793 * CELLSPACING="cellspacing"> tag.
794 *
795 * @param border Border size.
796 * @param cellpadding Cellpadding for the table cells.
797 * @param cellspacing Cellspacing for the table cells.
798 */
799 public void table(int border, int cellpadding, int cellspacing) {
800 println(DocletConstants.NL +
801 "<TABLE BORDER=\"" + border +
802 "\" CELLPADDING=\"" + cellpadding +
803 "\" CELLSPACING=\"" + cellspacing +
804 "\" SUMMARY=\"\">");
805 }
807 /**
808 * Print HTML <TABLE BORDER="border" WIDTH="width">
809 *
810 * @param border Border size.
811 * @param width Width of the table.
812 */
813 public void table(int border, String width) {
814 println(DocletConstants.NL +
815 "<TABLE BORDER=\"" + border +
816 "\" WIDTH=\"" + width +
817 "\" SUMMARY=\"\">");
818 }
820 /**
821 * Print the HTML table tag with border size 0 and width 100%.
822 */
823 public void table() {
824 table(0, "100%");
825 }
827 /**
828 * Print </TABLE> tag. Add a newline character at the end.
829 */
830 public void tableEnd() {
831 println("</TABLE>");
832 }
834 /**
835 * Print <TR> tag. Add a newline character at the end.
836 */
837 public void tr() {
838 println("<TR>");
839 }
841 /**
842 * Print </TR> tag. Add a newline character at the end.
843 */
844 public void trEnd() {
845 println("</TR>");
846 }
848 /**
849 * Print <TD> tag.
850 */
851 public void td() {
852 print("<TD>");
853 }
855 /**
856 * Print <TD NOWRAP> tag.
857 */
858 public void tdNowrap() {
859 print("<TD NOWRAP>");
860 }
862 /**
863 * Print <TD WIDTH="width"> tag.
864 *
865 * @param width String width.
866 */
867 public void tdWidth(String width) {
868 print("<TD WIDTH=\"" + width + "\">");
869 }
871 /**
872 * Print </TD> tag. Add a newline character at the end.
873 */
874 public void tdEnd() {
875 println("</TD>");
876 }
878 /**
879 * Print <LINK str> tag.
880 *
881 * @param str String.
882 */
883 public void link(String str) {
884 println("<LINK " + str + ">");
885 }
887 /**
888 * Print "<!-- " comment start string.
889 */
890 public void commentStart() {
891 print("<!-- ");
892 }
894 /**
895 * Print "-->" comment end string. Add a newline character at the end.
896 */
897 public void commentEnd() {
898 println("-->");
899 }
901 /**
902 * Print <TR BGCOLOR="color" CLASS="stylename"> tag. Adds a newline character
903 * at the end.
904 *
905 * @param color String color.
906 * @param stylename String stylename.
907 */
908 public void trBgcolorStyle(String color, String stylename) {
909 println("<TR BGCOLOR=\"" + color + "\" CLASS=\"" + stylename + "\">");
910 }
912 /**
913 * Print <TR BGCOLOR="color"> tag. Adds a newline character at the end.
914 *
915 * @param color String color.
916 */
917 public void trBgcolor(String color) {
918 println("<TR BGCOLOR=\"" + color + "\">");
919 }
921 /**
922 * Print <TR ALIGN="align" VALIGN="valign"> tag. Adds a newline character
923 * at the end.
924 *
925 * @param align String align.
926 * @param valign String valign.
927 */
928 public void trAlignVAlign(String align, String valign) {
929 println("<TR ALIGN=\"" + align + "\" VALIGN=\"" + valign + "\">");
930 }
932 /**
933 * Print <TH ALIGN="align"> tag.
934 *
935 * @param align the align attribute.
936 */
937 public void thAlign(String align) {
938 print("<TH ALIGN=\"" + align + "\">");
939 }
941 /**
942 * Print <TH align="align" COLSPAN=i> tag.
943 *
944 * @param align the align attribute.
945 * @param i integer.
946 */
947 public void thAlignColspan(String align, int i) {
948 print("<TH ALIGN=\"" + align + "\" COLSPAN=\"" + i + "\">");
949 }
951 /**
952 * Print <TH align="align" NOWRAP> tag.
953 *
954 * @param align the align attribute.
955 */
956 public void thAlignNowrap(String align) {
957 print("<TH ALIGN=\"" + align + "\" NOWRAP>");
958 }
960 /**
961 * Print </TH> tag. Add a newline character at the end.
962 */
963 public void thEnd() {
964 println("</TH>");
965 }
967 /**
968 * Print <TD COLSPAN=i> tag.
969 *
970 * @param i integer.
971 */
972 public void tdColspan(int i) {
973 print("<TD COLSPAN=" + i + ">");
974 }
976 /**
977 * Print <TD BGCOLOR="color" CLASS="stylename"> tag.
978 *
979 * @param color String color.
980 * @param stylename String stylename.
981 */
982 public void tdBgcolorStyle(String color, String stylename) {
983 print("<TD BGCOLOR=\"" + color + "\" CLASS=\"" + stylename + "\">");
984 }
986 /**
987 * Print <TD COLSPAN=i BGCOLOR="color" CLASS="stylename"> tag.
988 *
989 * @param i integer.
990 * @param color String color.
991 * @param stylename String stylename.
992 */
993 public void tdColspanBgcolorStyle(int i, String color, String stylename) {
994 print("<TD COLSPAN=" + i + " BGCOLOR=\"" + color + "\" CLASS=\"" +
995 stylename + "\">");
996 }
998 /**
999 * Print <TD ALIGN="align"> tag. Adds a newline character
1000 * at the end.
1001 *
1002 * @param align String align.
1003 */
1004 public void tdAlign(String align) {
1005 print("<TD ALIGN=\"" + align + "\">");
1006 }
1008 /**
1009 * Print <TD ALIGN="align" CLASS="stylename"> tag.
1010 *
1011 * @param align String align.
1012 * @param stylename String stylename.
1013 */
1014 public void tdVAlignClass(String align, String stylename) {
1015 print("<TD VALIGN=\"" + align + "\" CLASS=\"" + stylename + "\">");
1016 }
1018 /**
1019 * Print <TD VALIGN="valign"> tag.
1020 *
1021 * @param valign String valign.
1022 */
1023 public void tdVAlign(String valign) {
1024 print("<TD VALIGN=\"" + valign + "\">");
1025 }
1027 /**
1028 * Print <TD ALIGN="align" VALIGN="valign"> tag.
1029 *
1030 * @param align String align.
1031 * @param valign String valign.
1032 */
1033 public void tdAlignVAlign(String align, String valign) {
1034 print("<TD ALIGN=\"" + align + "\" VALIGN=\"" + valign + "\">");
1035 }
1037 /**
1038 * Print <TD ALIGN="align" ROWSPAN=rowspan> tag.
1039 *
1040 * @param align String align.
1041 * @param rowspan integer rowspan.
1042 */
1043 public void tdAlignRowspan(String align, int rowspan) {
1044 print("<TD ALIGN=\"" + align + "\" ROWSPAN=" + rowspan + ">");
1045 }
1047 /**
1048 * Print <TD ALIGN="align" VALIGN="valign" ROWSPAN=rowspan> tag.
1049 *
1050 * @param align String align.
1051 * @param valign String valign.
1052 * @param rowspan integer rowspan.
1053 */
1054 public void tdAlignVAlignRowspan(String align, String valign,
1055 int rowspan) {
1056 print("<TD ALIGN=\"" + align + "\" VALIGN=\"" + valign
1057 + "\" ROWSPAN=" + rowspan + ">");
1058 }
1060 /**
1061 * Print <BLOCKQUOTE> tag. Add a newline character at the end.
1062 */
1063 public void blockquote() {
1064 println("<BLOCKQUOTE>");
1065 }
1067 /**
1068 * Print </BLOCKQUOTE> tag. Add a newline character at the end.
1069 */
1070 public void blockquoteEnd() {
1071 println("</BLOCKQUOTE>");
1072 }
1074 /**
1075 * Get the "<CODE>" string.
1076 *
1077 * @return String Return String "<CODE>";
1078 */
1079 public String getCode() {
1080 return "<CODE>";
1081 }
1083 /**
1084 * Get the "</CODE>" string.
1085 *
1086 * @return String Return String "</CODE>";
1087 */
1088 public String getCodeEnd() {
1089 return "</CODE>";
1090 }
1092 /**
1093 * Print <NOFRAMES> tag. Add a newline character at the end.
1094 */
1095 public void noFrames() {
1096 println("<NOFRAMES>");
1097 }
1099 /**
1100 * Print </NOFRAMES> tag. Add a newline character at the end.
1101 */
1102 public void noFramesEnd() {
1103 println("</NOFRAMES>");
1104 }
1105 }