404 } |
324 } |
405 return body; |
325 return body; |
406 } |
326 } |
407 |
327 |
408 /** |
328 /** |
409 * Print </BODY> tag. Add a newline character at the end. |
|
410 */ |
|
411 public void bodyEnd() { |
|
412 println("</BODY>"); |
|
413 } |
|
414 |
|
415 /** |
|
416 * Print <TITLE> tag. Add a newline character at the end. |
|
417 */ |
|
418 public void title() { |
|
419 println("<TITLE>"); |
|
420 } |
|
421 |
|
422 /** |
|
423 * Print <TITLE> tag. Add a newline character at the end. |
|
424 * |
|
425 * @param winTitle The title of this document. |
|
426 */ |
|
427 public void title(String winTitle) { |
|
428 // Set window title string which is later printed |
|
429 this.winTitle = winTitle; |
|
430 title(); |
|
431 } |
|
432 |
|
433 /** |
|
434 * Returns an HtmlTree for the TITLE tag. |
329 * Returns an HtmlTree for the TITLE tag. |
435 * |
330 * |
436 * @return an HtmlTree for the TITLE tag |
331 * @return an HtmlTree for the TITLE tag |
437 */ |
332 */ |
438 public HtmlTree getTitle() { |
333 public HtmlTree getTitle() { |
439 HtmlTree title = HtmlTree.TITLE(new StringContent(winTitle)); |
334 HtmlTree title = HtmlTree.TITLE(new StringContent(winTitle)); |
440 return title; |
335 return title; |
441 } |
336 } |
442 |
337 |
443 /** |
338 /** |
444 * Print </TITLE> tag. Add a newline character at the end. |
|
445 */ |
|
446 public void titleEnd() { |
|
447 println("</TITLE>"); |
|
448 } |
|
449 |
|
450 /** |
|
451 * Print <UL> tag. Add a newline character at the end. |
|
452 */ |
|
453 public void ul() { |
|
454 println("<UL>"); |
|
455 } |
|
456 |
|
457 /** |
|
458 * Print </UL> tag. Add a newline character at the end. |
|
459 */ |
|
460 public void ulEnd() { |
|
461 println("</UL>"); |
|
462 } |
|
463 |
|
464 /** |
|
465 * Print <LI> tag. |
|
466 */ |
|
467 public void li() { |
|
468 print("<LI>"); |
|
469 } |
|
470 |
|
471 /** |
|
472 * Print <LI TYPE="type"> tag. |
|
473 * |
|
474 * @param type Type string. |
|
475 */ |
|
476 public void li(String type) { |
|
477 print("<LI TYPE=\"" + type + "\">"); |
|
478 } |
|
479 |
|
480 /** |
|
481 * Print <H1> tag. Add a newline character at the end. |
|
482 */ |
|
483 public void h1() { |
|
484 println("<H1>"); |
|
485 } |
|
486 |
|
487 /** |
|
488 * Print </H1> tag. Add a newline character at the end. |
|
489 */ |
|
490 public void h1End() { |
|
491 println("</H1>"); |
|
492 } |
|
493 |
|
494 /** |
|
495 * Print text with <H1> tag. Also adds </H1> tag. Add a newline character |
|
496 * at the end of the text. |
|
497 * |
|
498 * @param text Text to be printed with <H1> format. |
|
499 */ |
|
500 public void h1(String text) { |
|
501 h1(); |
|
502 println(text); |
|
503 h1End(); |
|
504 } |
|
505 |
|
506 /** |
|
507 * Print <H2> tag. Add a newline character at the end. |
|
508 */ |
|
509 public void h2() { |
|
510 println("<H2>"); |
|
511 } |
|
512 |
|
513 /** |
|
514 * Print text with <H2> tag. Also adds </H2> tag. Add a newline character |
|
515 * at the end of the text. |
|
516 * |
|
517 * @param text Text to be printed with <H2> format. |
|
518 */ |
|
519 public void h2(String text) { |
|
520 h2(); |
|
521 println(text); |
|
522 h2End(); |
|
523 } |
|
524 |
|
525 /** |
|
526 * Print </H2> tag. Add a newline character at the end. |
|
527 */ |
|
528 public void h2End() { |
|
529 println("</H2>"); |
|
530 } |
|
531 |
|
532 /** |
|
533 * Print <H3> tag. Add a newline character at the end. |
|
534 */ |
|
535 public void h3() { |
|
536 println("<H3>"); |
|
537 } |
|
538 |
|
539 /** |
|
540 * Print text with <H3> tag. Also adds </H3> tag. Add a newline character |
|
541 * at the end of the text. |
|
542 * |
|
543 * @param text Text to be printed with <H3> format. |
|
544 */ |
|
545 public void h3(String text) { |
|
546 h3(); |
|
547 println(text); |
|
548 h3End(); |
|
549 } |
|
550 |
|
551 /** |
|
552 * Print </H3> tag. Add a newline character at the end. |
|
553 */ |
|
554 public void h3End() { |
|
555 println("</H3>"); |
|
556 } |
|
557 |
|
558 /** |
|
559 * Print <H4> tag. Add a newline character at the end. |
|
560 */ |
|
561 public void h4() { |
|
562 println("<H4>"); |
|
563 } |
|
564 |
|
565 /** |
|
566 * Print </H4> tag. Add a newline character at the end. |
|
567 */ |
|
568 public void h4End() { |
|
569 println("</H4>"); |
|
570 } |
|
571 |
|
572 /** |
|
573 * Print text with <H4> tag. Also adds </H4> tag. Add a newline character |
|
574 * at the end of the text. |
|
575 * |
|
576 * @param text Text to be printed with <H4> format. |
|
577 */ |
|
578 public void h4(String text) { |
|
579 h4(); |
|
580 println(text); |
|
581 h4End(); |
|
582 } |
|
583 |
|
584 /** |
|
585 * Print <H5> tag. Add a newline character at the end. |
|
586 */ |
|
587 public void h5() { |
|
588 println("<H5>"); |
|
589 } |
|
590 |
|
591 /** |
|
592 * Print </H5> tag. Add a newline character at the end. |
|
593 */ |
|
594 public void h5End() { |
|
595 println("</H5>"); |
|
596 } |
|
597 |
|
598 /** |
|
599 * Print HTML <IMG SRC="imggif" WIDTH="width" HEIGHT="height" ALT="imgname> |
|
600 * tag. It prepends the "images" directory name to the "imggif". This |
|
601 * method is used for oneone format generation. Add a newline character |
|
602 * at the end. |
|
603 * |
|
604 * @param imggif Image GIF file. |
|
605 * @param imgname Image name. |
|
606 * @param width Width of the image. |
|
607 * @param height Height of the image. |
|
608 */ |
|
609 public void img(String imggif, String imgname, int width, int height) { |
|
610 println("<IMG SRC=\"images/" + imggif + ".gif\"" |
|
611 + " WIDTH=\"" + width + "\" HEIGHT=\"" + height |
|
612 + "\" ALT=\"" + imgname + "\">"); |
|
613 } |
|
614 |
|
615 /** |
|
616 * Print <MENU> tag. Add a newline character at the end. |
|
617 */ |
|
618 public void menu() { |
|
619 println("<MENU>"); |
|
620 } |
|
621 |
|
622 /** |
|
623 * Print </MENU> tag. Add a newline character at the end. |
|
624 */ |
|
625 public void menuEnd() { |
|
626 println("</MENU>"); |
|
627 } |
|
628 |
|
629 /** |
|
630 * Print <PRE> tag. Add a newline character at the end. |
|
631 */ |
|
632 public void pre() { |
|
633 println("<PRE>"); |
|
634 } |
|
635 |
|
636 /** |
|
637 * Print <PRE> tag without adding new line character at th eend. |
|
638 */ |
|
639 public void preNoNewLine() { |
|
640 print("<PRE>"); |
|
641 } |
|
642 |
|
643 /** |
|
644 * Print </PRE> tag. Add a newline character at the end. |
|
645 */ |
|
646 public void preEnd() { |
|
647 println("</PRE>"); |
|
648 } |
|
649 |
|
650 /** |
|
651 * Print <HR> tag. Add a newline character at the end. |
|
652 */ |
|
653 public void hr() { |
|
654 println("<HR>"); |
|
655 } |
|
656 |
|
657 /** |
|
658 * Print <HR SIZE="size" WIDTH="widthpercent%"> tag. Add a newline |
|
659 * character at the end. |
|
660 * |
|
661 * @param size Size of the ruler. |
|
662 * @param widthPercent Percentage Width of the ruler |
|
663 */ |
|
664 public void hr(int size, int widthPercent) { |
|
665 println("<HR SIZE=\"" + size + "\" WIDTH=\"" + widthPercent + "%\">"); |
|
666 } |
|
667 |
|
668 /** |
|
669 * Print <HR SIZE="size" NOSHADE> tag. Add a newline character at the end. |
|
670 * |
|
671 * @param size Size of the ruler. |
|
672 * @param noshade noshade string. |
|
673 */ |
|
674 public void hr(int size, String noshade) { |
|
675 println("<HR SIZE=\"" + size + "\" NOSHADE>"); |
|
676 } |
|
677 |
|
678 /** |
|
679 * Get the "<STRONG>" string. |
|
680 * |
|
681 * @return String Return String "<STRONG>"; |
|
682 */ |
|
683 public String getStrong() { |
|
684 return "<STRONG>"; |
|
685 } |
|
686 |
|
687 /** |
|
688 * Get the "</STRONG>" string. |
|
689 * |
|
690 * @return String Return String "</STRONG>"; |
|
691 */ |
|
692 public String getStrongEnd() { |
|
693 return "</STRONG>"; |
|
694 } |
|
695 |
|
696 /** |
|
697 * Print <STRONG> tag. |
|
698 */ |
|
699 public void strong() { |
|
700 print("<STRONG>"); |
|
701 } |
|
702 |
|
703 /** |
|
704 * Print </STRONG> tag. |
|
705 */ |
|
706 public void strongEnd() { |
|
707 print("</STRONG>"); |
|
708 } |
|
709 |
|
710 /** |
|
711 * Print text passed, in strong format using <STRONG> and </STRONG> tags. |
|
712 * |
|
713 * @param text String to be printed in between <STRONG> and </STRONG> tags. |
|
714 */ |
|
715 public void strong(String text) { |
|
716 strong(); |
|
717 print(text); |
|
718 strongEnd(); |
|
719 } |
|
720 |
|
721 /** |
|
722 * Print text passed, in Italics using <I> and </I> tags. |
|
723 * |
|
724 * @param text String to be printed in between <I> and </I> tags. |
|
725 */ |
|
726 public void italics(String text) { |
|
727 print("<I>"); |
|
728 print(text); |
|
729 println("</I>"); |
|
730 } |
|
731 |
|
732 /** |
|
733 * Return, text passed, with Italics <i> and </i> tags, surrounding it. |
339 * Return, text passed, with Italics <i> and </i> tags, surrounding it. |
734 * So if the text passed is "Hi", then string returned will be "<i>Hi</i>". |
340 * So if the text passed is "Hi", then string returned will be "<i>Hi</i>". |
735 * |
341 * |
736 * @param text String to be printed in between <I> and </I> tags. |
342 * @param text String to be printed in between <I> and </I> tags. |
737 */ |
343 */ |
742 public String codeText(String text) { |
348 public String codeText(String text) { |
743 return "<code>" + text + "</code>"; |
349 return "<code>" + text + "</code>"; |
744 } |
350 } |
745 |
351 |
746 /** |
352 /** |
747 * Print "&nbsp;", non-breaking space. |
|
748 */ |
|
749 public void space() { |
|
750 print(" "); |
|
751 } |
|
752 |
|
753 /** |
|
754 * Return "&nbsp;", non-breaking space. |
353 * Return "&nbsp;", non-breaking space. |
755 */ |
354 */ |
756 public Content getSpace() { |
355 public Content getSpace() { |
757 return RawHtml.nbsp; |
356 return RawHtml.nbsp; |
758 } |
357 } |
759 |
358 |
760 /** |
|
761 * Print <DL> tag. Add a newline character at the end. |
|
762 */ |
|
763 public void dl() { |
|
764 println("<DL>"); |
|
765 } |
|
766 |
|
767 /** |
|
768 * Print </DL> tag. Add a newline character at the end. |
|
769 */ |
|
770 public void dlEnd() { |
|
771 println("</DL>"); |
|
772 } |
|
773 |
|
774 /** |
|
775 * Print <DT> tag. |
|
776 */ |
|
777 public void dt() { |
|
778 print("<DT>"); |
|
779 } |
|
780 |
|
781 /** |
|
782 * Print </DT> tag. |
|
783 */ |
|
784 public void dtEnd() { |
|
785 print("</DT>"); |
|
786 } |
|
787 |
|
788 /** |
|
789 * Print <DD> tag. |
|
790 */ |
|
791 public void dd() { |
|
792 print("<DD>"); |
|
793 } |
|
794 |
|
795 /** |
|
796 * Print </DD> tag. Add a newline character at the end. |
|
797 */ |
|
798 public void ddEnd() { |
|
799 println("</DD>"); |
|
800 } |
|
801 |
|
802 /** |
|
803 * Print <SUP> tag. Add a newline character at the end. |
|
804 */ |
|
805 public void sup() { |
|
806 println("<SUP>"); |
|
807 } |
|
808 |
|
809 /** |
|
810 * Print </SUP> tag. Add a newline character at the end. |
|
811 */ |
|
812 public void supEnd() { |
|
813 println("</SUP>"); |
|
814 } |
|
815 |
|
816 /** |
|
817 * Print <FONT SIZE="size"> tag. Add a newline character at the end. |
|
818 * |
|
819 * @param size String size. |
|
820 */ |
|
821 public void font(String size) { |
|
822 println("<FONT SIZE=\"" + size + "\">"); |
|
823 } |
|
824 |
|
825 /** |
|
826 * Print <FONT SIZE="size"> tag. |
|
827 * |
|
828 * @param size String size. |
|
829 */ |
|
830 public void fontNoNewLine(String size) { |
|
831 print("<FONT SIZE=\"" + size + "\">"); |
|
832 } |
|
833 |
|
834 /** |
|
835 * Print <FONT CLASS="stylename"> tag. Add a newline character at the end. |
|
836 * |
|
837 * @param stylename String stylename. |
|
838 */ |
|
839 public void fontStyle(String stylename) { |
|
840 print("<FONT CLASS=\"" + stylename + "\">"); |
|
841 } |
|
842 |
|
843 /** |
|
844 * Print <FONT SIZE="size" CLASS="stylename"> tag. Add a newline character |
|
845 * at the end. |
|
846 * |
|
847 * @param size String size. |
|
848 * @param stylename String stylename. |
|
849 */ |
|
850 public void fontSizeStyle(String size, String stylename) { |
|
851 println("<FONT size=\"" + size + "\" CLASS=\"" + stylename + "\">"); |
|
852 } |
|
853 |
|
854 /** |
|
855 * Print </FONT> tag. |
|
856 */ |
|
857 public void fontEnd() { |
|
858 print("</FONT>"); |
|
859 } |
|
860 |
|
861 /** |
|
862 * Get the "<FONT COLOR="color">" string. |
|
863 * |
|
864 * @param color String color. |
|
865 * @return String Return String "<FONT COLOR="color">". |
|
866 */ |
|
867 public String getFontColor(String color) { |
|
868 return "<FONT COLOR=\"" + color + "\">"; |
|
869 } |
|
870 |
|
871 /** |
|
872 * Get the "</FONT>" string. |
|
873 * |
|
874 * @return String Return String "</FONT>"; |
|
875 */ |
|
876 public String getFontEnd() { |
|
877 return "</FONT>"; |
|
878 } |
|
879 |
|
880 /** |
|
881 * Print <CENTER> tag. Add a newline character at the end. |
|
882 */ |
|
883 public void center() { |
|
884 println("<CENTER>"); |
|
885 } |
|
886 |
|
887 /** |
|
888 * Print </CENTER> tag. Add a newline character at the end. |
|
889 */ |
|
890 public void centerEnd() { |
|
891 println("</CENTER>"); |
|
892 } |
|
893 |
|
894 /** |
|
895 * Print anchor <A NAME="name"> tag. |
|
896 * |
|
897 * @param name Name String. |
|
898 */ |
|
899 public void aName(String name) { |
|
900 print("<A NAME=\"" + name + "\">"); |
|
901 } |
|
902 |
|
903 /** |
|
904 * Print </A> tag. |
|
905 */ |
|
906 public void aEnd() { |
|
907 print("</A>"); |
|
908 } |
|
909 |
|
910 /** |
|
911 * Print <I> tag. |
|
912 */ |
|
913 public void italic() { |
|
914 print("<I>"); |
|
915 } |
|
916 |
|
917 /** |
|
918 * Print </I> tag. |
|
919 */ |
|
920 public void italicEnd() { |
|
921 print("</I>"); |
|
922 } |
|
923 |
|
924 /** |
|
925 * Print contents within anchor <A NAME="name"> tags. |
|
926 * |
|
927 * @param name String name. |
|
928 * @param content String contents. |
|
929 */ |
|
930 public void anchor(String name, String content) { |
|
931 aName(name); |
|
932 print(content); |
|
933 aEnd(); |
|
934 } |
|
935 |
|
936 /** |
|
937 * Print anchor <A NAME="name"> and </A>tags. Print comment string |
|
938 * "<!-- -->" within those tags. |
|
939 * |
|
940 * @param name String name. |
|
941 */ |
|
942 public void anchor(String name) { |
|
943 anchor(name, "<!-- -->"); |
|
944 } |
|
945 |
|
946 /** |
|
947 * Print newline and then print <P> tag. Add a newline character at the |
|
948 * end. |
|
949 */ |
|
950 public void p() { |
|
951 println(); |
|
952 println("<P>"); |
|
953 } |
|
954 |
|
955 /** |
|
956 * Print newline and then print </P> tag. Add a newline character at the |
|
957 * end. |
|
958 */ |
|
959 public void pEnd() { |
|
960 println(); |
|
961 println("</P>"); |
|
962 } |
|
963 |
|
964 /** |
|
965 * Print newline and then print <BR> tag. Add a newline character at the |
|
966 * end. |
|
967 */ |
|
968 public void br() { |
|
969 println(); |
|
970 println("<BR>"); |
|
971 } |
|
972 |
|
973 /** |
|
974 * Print <ADDRESS> tag. Add a newline character at the end. |
|
975 */ |
|
976 public void address() { |
|
977 println("<ADDRESS>"); |
|
978 } |
|
979 |
|
980 /** |
|
981 * Print </ADDRESS> tag. Add a newline character at the end. |
|
982 */ |
|
983 public void addressEnd() { |
|
984 println("</ADDRESS>"); |
|
985 } |
|
986 |
|
987 /** |
|
988 * Print <HEAD> tag. Add a newline character at the end. |
|
989 */ |
|
990 public void head() { |
|
991 println("<HEAD>"); |
|
992 } |
|
993 |
|
994 /** |
|
995 * Print </HEAD> tag. Add a newline character at the end. |
|
996 */ |
|
997 public void headEnd() { |
|
998 println("</HEAD>"); |
|
999 } |
|
1000 |
|
1001 /** |
|
1002 * Print <CODE> tag. |
|
1003 */ |
|
1004 public void code() { |
|
1005 print("<CODE>"); |
|
1006 } |
|
1007 |
|
1008 /** |
|
1009 * Print </CODE> tag. |
|
1010 */ |
|
1011 public void codeEnd() { |
|
1012 print("</CODE>"); |
|
1013 } |
|
1014 |
|
1015 /** |
|
1016 * Print <EM> tag. Add a newline character at the end. |
|
1017 */ |
|
1018 public void em() { |
|
1019 println("<EM>"); |
|
1020 } |
|
1021 |
|
1022 /** |
|
1023 * Print </EM> tag. Add a newline character at the end. |
|
1024 */ |
|
1025 public void emEnd() { |
|
1026 println("</EM>"); |
|
1027 } |
|
1028 |
|
1029 /** |
|
1030 * Print HTML <TABLE BORDER="border" WIDTH="width" |
|
1031 * CELLPADDING="cellpadding" CELLSPACING="cellspacing"> tag. |
|
1032 * |
|
1033 * @param border Border size. |
|
1034 * @param width Width of the table. |
|
1035 * @param cellpadding Cellpadding for the table cells. |
|
1036 * @param cellspacing Cellspacing for the table cells. |
|
1037 */ |
|
1038 public void table(int border, String width, int cellpadding, |
|
1039 int cellspacing) { |
|
1040 println(DocletConstants.NL + |
|
1041 "<TABLE BORDER=\"" + border + |
|
1042 "\" WIDTH=\"" + width + |
|
1043 "\" CELLPADDING=\"" + cellpadding + |
|
1044 "\" CELLSPACING=\"" + cellspacing + |
|
1045 "\" SUMMARY=\"\">"); |
|
1046 } |
|
1047 |
|
1048 /** |
|
1049 * Print HTML <TABLE BORDER="border" WIDTH="width" |
|
1050 * CELLPADDING="cellpadding" CELLSPACING="cellspacing" SUMMARY="summary"> tag. |
|
1051 * |
|
1052 * @param border Border size. |
|
1053 * @param width Width of the table. |
|
1054 * @param cellpadding Cellpadding for the table cells. |
|
1055 * @param cellspacing Cellspacing for the table cells. |
|
1056 * @param summary Table summary. |
|
1057 */ |
|
1058 public void table(int border, String width, int cellpadding, |
|
1059 int cellspacing, String summary) { |
|
1060 println(DocletConstants.NL + |
|
1061 "<TABLE BORDER=\"" + border + |
|
1062 "\" WIDTH=\"" + width + |
|
1063 "\" CELLPADDING=\"" + cellpadding + |
|
1064 "\" CELLSPACING=\"" + cellspacing + |
|
1065 "\" SUMMARY=\"" + summary + "\">"); |
|
1066 } |
|
1067 |
|
1068 /** |
|
1069 * Print HTML <TABLE BORDER="border" CELLPADDING="cellpadding" |
|
1070 * CELLSPACING="cellspacing"> tag. |
|
1071 * |
|
1072 * @param border Border size. |
|
1073 * @param cellpadding Cellpadding for the table cells. |
|
1074 * @param cellspacing Cellspacing for the table cells. |
|
1075 */ |
|
1076 public void table(int border, int cellpadding, int cellspacing) { |
|
1077 println(DocletConstants.NL + |
|
1078 "<TABLE BORDER=\"" + border + |
|
1079 "\" CELLPADDING=\"" + cellpadding + |
|
1080 "\" CELLSPACING=\"" + cellspacing + |
|
1081 "\" SUMMARY=\"\">"); |
|
1082 } |
|
1083 |
|
1084 /** |
|
1085 * Print HTML <TABLE BORDER="border" CELLPADDING="cellpadding" |
|
1086 * CELLSPACING="cellspacing" SUMMARY="summary"> tag. |
|
1087 * |
|
1088 * @param border Border size. |
|
1089 * @param cellpadding Cellpadding for the table cells. |
|
1090 * @param cellspacing Cellspacing for the table cells. |
|
1091 * @param summary Table summary. |
|
1092 */ |
|
1093 public void table(int border, int cellpadding, int cellspacing, String summary) { |
|
1094 println(DocletConstants.NL + |
|
1095 "<TABLE BORDER=\"" + border + |
|
1096 "\" CELLPADDING=\"" + cellpadding + |
|
1097 "\" CELLSPACING=\"" + cellspacing + |
|
1098 "\" SUMMARY=\"" + summary + "\">"); |
|
1099 } |
|
1100 |
|
1101 /** |
|
1102 * Print HTML <TABLE BORDER="border" WIDTH="width"> |
|
1103 * |
|
1104 * @param border Border size. |
|
1105 * @param width Width of the table. |
|
1106 */ |
|
1107 public void table(int border, String width) { |
|
1108 println(DocletConstants.NL + |
|
1109 "<TABLE BORDER=\"" + border + |
|
1110 "\" WIDTH=\"" + width + |
|
1111 "\" SUMMARY=\"\">"); |
|
1112 } |
|
1113 |
|
1114 /** |
|
1115 * Print the HTML table tag with border size 0 and width 100%. |
|
1116 */ |
|
1117 public void table() { |
|
1118 table(0, "100%"); |
|
1119 } |
|
1120 |
|
1121 /** |
|
1122 * Print </TABLE> tag. Add a newline character at the end. |
|
1123 */ |
|
1124 public void tableEnd() { |
|
1125 println("</TABLE>"); |
|
1126 } |
|
1127 |
|
1128 /** |
|
1129 * Print <TR> tag. Add a newline character at the end. |
|
1130 */ |
|
1131 public void tr() { |
|
1132 println("<TR>"); |
|
1133 } |
|
1134 |
|
1135 /** |
|
1136 * Print </TR> tag. Add a newline character at the end. |
|
1137 */ |
|
1138 public void trEnd() { |
|
1139 println("</TR>"); |
|
1140 } |
|
1141 |
|
1142 /** |
|
1143 * Print <TD> tag. |
|
1144 */ |
|
1145 public void td() { |
|
1146 print("<TD>"); |
|
1147 } |
|
1148 |
|
1149 /** |
|
1150 * Print <TD NOWRAP> tag. |
|
1151 */ |
|
1152 public void tdNowrap() { |
|
1153 print("<TD NOWRAP>"); |
|
1154 } |
|
1155 |
|
1156 /** |
|
1157 * Print <TD WIDTH="width"> tag. |
|
1158 * |
|
1159 * @param width String width. |
|
1160 */ |
|
1161 public void tdWidth(String width) { |
|
1162 print("<TD WIDTH=\"" + width + "\">"); |
|
1163 } |
|
1164 |
|
1165 /** |
|
1166 * Print </TD> tag. Add a newline character at the end. |
|
1167 */ |
|
1168 public void tdEnd() { |
|
1169 println("</TD>"); |
|
1170 } |
|
1171 |
|
1172 /** |
|
1173 * Print <LINK str> tag. |
|
1174 * |
|
1175 * @param str String. |
|
1176 */ |
|
1177 public void link(String str) { |
|
1178 println("<LINK " + str + ">"); |
|
1179 } |
|
1180 |
|
1181 /** |
|
1182 * Print "<!-- " comment start string. |
|
1183 */ |
|
1184 public void commentStart() { |
|
1185 print("<!-- "); |
|
1186 } |
|
1187 |
|
1188 /** |
|
1189 * Print "-->" comment end string. Add a newline character at the end. |
|
1190 */ |
|
1191 public void commentEnd() { |
|
1192 println("-->"); |
|
1193 } |
|
1194 |
|
1195 /** |
|
1196 * Print <CAPTION CLASS="stylename"> tag. Adds a newline character |
|
1197 * at the end. |
|
1198 * |
|
1199 * @param stylename style to be applied. |
|
1200 */ |
|
1201 public void captionStyle(String stylename) { |
|
1202 println("<CAPTION CLASS=\"" + stylename + "\">"); |
|
1203 } |
|
1204 |
|
1205 /** |
|
1206 * Print </CAPTION> tag. Add a newline character at the end. |
|
1207 */ |
|
1208 public void captionEnd() { |
|
1209 println("</CAPTION>"); |
|
1210 } |
|
1211 |
|
1212 /** |
|
1213 * Print <TR BGCOLOR="color" CLASS="stylename"> tag. Adds a newline character |
|
1214 * at the end. |
|
1215 * |
|
1216 * @param color String color. |
|
1217 * @param stylename String stylename. |
|
1218 */ |
|
1219 public void trBgcolorStyle(String color, String stylename) { |
|
1220 println("<TR BGCOLOR=\"" + color + "\" CLASS=\"" + stylename + "\">"); |
|
1221 } |
|
1222 |
|
1223 /** |
|
1224 * Print <TR BGCOLOR="color"> tag. Adds a newline character at the end. |
|
1225 * |
|
1226 * @param color String color. |
|
1227 */ |
|
1228 public void trBgcolor(String color) { |
|
1229 println("<TR BGCOLOR=\"" + color + "\">"); |
|
1230 } |
|
1231 |
|
1232 /** |
|
1233 * Print <TR ALIGN="align" VALIGN="valign"> tag. Adds a newline character |
|
1234 * at the end. |
|
1235 * |
|
1236 * @param align String align. |
|
1237 * @param valign String valign. |
|
1238 */ |
|
1239 public void trAlignVAlign(String align, String valign) { |
|
1240 println("<TR ALIGN=\"" + align + "\" VALIGN=\"" + valign + "\">"); |
|
1241 } |
|
1242 |
|
1243 /** |
|
1244 * Print <TH ALIGN="align"> tag. |
|
1245 * |
|
1246 * @param align the align attribute. |
|
1247 */ |
|
1248 public void thAlign(String align) { |
|
1249 print("<TH ALIGN=\"" + align + "\">"); |
|
1250 } |
|
1251 |
|
1252 /** |
|
1253 * Print <TH CLASS="stylename" SCOPE="scope" NOWRAP> tag. |
|
1254 * |
|
1255 * @param stylename style to be applied. |
|
1256 * @param scope the scope attribute. |
|
1257 */ |
|
1258 public void thScopeNoWrap(String stylename, String scope) { |
|
1259 print("<TH CLASS=\"" + stylename + "\" SCOPE=\"" + scope + "\" NOWRAP>"); |
|
1260 } |
|
1261 |
|
1262 /* |
359 /* |
1263 * Returns a header for Modifier and Type column of a table. |
360 * Returns a header for Modifier and Type column of a table. |
1264 */ |
361 */ |
1265 public String getModifierTypeHeader() { |
362 public String getModifierTypeHeader() { |
1266 return modifierTypeHeader; |
363 return modifierTypeHeader; |
1267 } |
364 } |
1268 |
|
1269 /** |
|
1270 * Print <TH align="align" COLSPAN=i> tag. |
|
1271 * |
|
1272 * @param align the align attribute. |
|
1273 * @param i integer. |
|
1274 */ |
|
1275 public void thAlignColspan(String align, int i) { |
|
1276 print("<TH ALIGN=\"" + align + "\" COLSPAN=\"" + i + "\">"); |
|
1277 } |
|
1278 |
|
1279 /** |
|
1280 * Print <TH align="align" NOWRAP> tag. |
|
1281 * |
|
1282 * @param align the align attribute. |
|
1283 */ |
|
1284 public void thAlignNowrap(String align) { |
|
1285 print("<TH ALIGN=\"" + align + "\" NOWRAP>"); |
|
1286 } |
|
1287 |
|
1288 /** |
|
1289 * Print </TH> tag. Add a newline character at the end. |
|
1290 */ |
|
1291 public void thEnd() { |
|
1292 println("</TH>"); |
|
1293 } |
|
1294 |
|
1295 /** |
|
1296 * Print <TD COLSPAN=i> tag. |
|
1297 * |
|
1298 * @param i integer. |
|
1299 */ |
|
1300 public void tdColspan(int i) { |
|
1301 print("<TD COLSPAN=" + i + ">"); |
|
1302 } |
|
1303 |
|
1304 /** |
|
1305 * Print <TD BGCOLOR="color" CLASS="stylename"> tag. |
|
1306 * |
|
1307 * @param color String color. |
|
1308 * @param stylename String stylename. |
|
1309 */ |
|
1310 public void tdBgcolorStyle(String color, String stylename) { |
|
1311 print("<TD BGCOLOR=\"" + color + "\" CLASS=\"" + stylename + "\">"); |
|
1312 } |
|
1313 |
|
1314 /** |
|
1315 * Print <TD COLSPAN=i BGCOLOR="color" CLASS="stylename"> tag. |
|
1316 * |
|
1317 * @param i integer. |
|
1318 * @param color String color. |
|
1319 * @param stylename String stylename. |
|
1320 */ |
|
1321 public void tdColspanBgcolorStyle(int i, String color, String stylename) { |
|
1322 print("<TD COLSPAN=" + i + " BGCOLOR=\"" + color + "\" CLASS=\"" + |
|
1323 stylename + "\">"); |
|
1324 } |
|
1325 |
|
1326 /** |
|
1327 * Print <TD ALIGN="align"> tag. Adds a newline character |
|
1328 * at the end. |
|
1329 * |
|
1330 * @param align String align. |
|
1331 */ |
|
1332 public void tdAlign(String align) { |
|
1333 print("<TD ALIGN=\"" + align + "\">"); |
|
1334 } |
|
1335 |
|
1336 /** |
|
1337 * Print <TD ALIGN="align" CLASS="stylename"> tag. |
|
1338 * |
|
1339 * @param align String align. |
|
1340 * @param stylename String stylename. |
|
1341 */ |
|
1342 public void tdVAlignClass(String align, String stylename) { |
|
1343 print("<TD VALIGN=\"" + align + "\" CLASS=\"" + stylename + "\">"); |
|
1344 } |
|
1345 |
|
1346 /** |
|
1347 * Print <TD VALIGN="valign"> tag. |
|
1348 * |
|
1349 * @param valign String valign. |
|
1350 */ |
|
1351 public void tdVAlign(String valign) { |
|
1352 print("<TD VALIGN=\"" + valign + "\">"); |
|
1353 } |
|
1354 |
|
1355 /** |
|
1356 * Print <TD ALIGN="align" VALIGN="valign"> tag. |
|
1357 * |
|
1358 * @param align String align. |
|
1359 * @param valign String valign. |
|
1360 */ |
|
1361 public void tdAlignVAlign(String align, String valign) { |
|
1362 print("<TD ALIGN=\"" + align + "\" VALIGN=\"" + valign + "\">"); |
|
1363 } |
|
1364 |
|
1365 /** |
|
1366 * Print <TD ALIGN="align" ROWSPAN=rowspan> tag. |
|
1367 * |
|
1368 * @param align String align. |
|
1369 * @param rowspan integer rowspan. |
|
1370 */ |
|
1371 public void tdAlignRowspan(String align, int rowspan) { |
|
1372 print("<TD ALIGN=\"" + align + "\" ROWSPAN=" + rowspan + ">"); |
|
1373 } |
|
1374 |
|
1375 /** |
|
1376 * Print <TD ALIGN="align" VALIGN="valign" ROWSPAN=rowspan> tag. |
|
1377 * |
|
1378 * @param align String align. |
|
1379 * @param valign String valign. |
|
1380 * @param rowspan integer rowspan. |
|
1381 */ |
|
1382 public void tdAlignVAlignRowspan(String align, String valign, |
|
1383 int rowspan) { |
|
1384 print("<TD ALIGN=\"" + align + "\" VALIGN=\"" + valign |
|
1385 + "\" ROWSPAN=" + rowspan + ">"); |
|
1386 } |
|
1387 |
|
1388 /** |
|
1389 * Print <BLOCKQUOTE> tag. Add a newline character at the end. |
|
1390 */ |
|
1391 public void blockquote() { |
|
1392 println("<BLOCKQUOTE>"); |
|
1393 } |
|
1394 |
|
1395 /** |
|
1396 * Print </BLOCKQUOTE> tag. Add a newline character at the end. |
|
1397 */ |
|
1398 public void blockquoteEnd() { |
|
1399 println("</BLOCKQUOTE>"); |
|
1400 } |
|
1401 |
|
1402 /** |
|
1403 * Get the "<code>" string. |
|
1404 * |
|
1405 * @return String Return String "<code>"; |
|
1406 */ |
|
1407 public String getCode() { |
|
1408 return "<code>"; |
|
1409 } |
|
1410 |
|
1411 /** |
|
1412 * Get the "</code>" string. |
|
1413 * |
|
1414 * @return String Return String "</code>"; |
|
1415 */ |
|
1416 public String getCodeEnd() { |
|
1417 return "</code>"; |
|
1418 } |
|
1419 |
|
1420 /** |
|
1421 * Print <NOFRAMES> tag. Add a newline character at the end. |
|
1422 */ |
|
1423 public void noFrames() { |
|
1424 println("<NOFRAMES>"); |
|
1425 } |
|
1426 |
|
1427 /** |
|
1428 * Print </NOFRAMES> tag. Add a newline character at the end. |
|
1429 */ |
|
1430 public void noFramesEnd() { |
|
1431 println("</NOFRAMES>"); |
|
1432 } |
|
1433 } |
365 } |