1 23 package com.sun.enterprise.diagnostics.report.html; 24 25 29 public class CSS extends HTMLElement { 30 private static String LINK = "LINK"; 31 private static String REL = "rel"; 32 private static String STYLESHEET = "stylesheet"; 33 private static String HREF = "href"; 34 private static String TYPE = "type"; 35 private static String TEXT_CSS="text/css"; 36 private static String STYLE = "style"; 37 private static String COMMENT_START="<!--"; 38 private static String COMMENT_END="-->"; 39 40 41 public CSS(String link, Document doc) { 42 super(LINK); 43 addAttribute(REL,STYLESHEET); 44 addAttribute(HREF,link); 45 addAttribute(TYPE, TEXT_CSS); 46 47 Element head = doc.getHead(); 48 head.add(this); 49 } 50 51 public CSS(StringBuffer text, Document doc) { 52 super(STYLE); 53 addAttribute(TYPE, TEXT_CSS); 54 addText(COMMENT_START + text.toString() + COMMENT_END); 55 56 Element head = doc.getHead(); 57 head.add(this); 58 } 59 60 } 61 | Popular Tags |