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