1 23 package com.sun.enterprise.diagnostics.report.html; 24 import java.util.List ; 25 29 public class CSSElement extends HTMLElement { 30 31 32 public CSSElement(String tagName) { 33 super(tagName); 34 } 35 36 public void setCSSClass(String className){ 37 List <Attribute> attributes= getAttributes("class"); 38 if(attributes.size()==0){ 39 addAttribute("class",className); 40 } 41 else{ 42 Attribute attribute = attributes.get(0); 43 attribute.setValue(className); 44 } 45 } 46 47 } 48 | Popular Tags |