1 58 package org.apache.ecs.rtf; 59 60 public class Bold extends RTFElement 61 { 62 65 { 66 setElementType("\\b"); 67 addElement(" "); } 69 70 73 public Bold() 74 { 75 } 76 77 81 public Bold(String element) 82 { 83 addElement(element); 84 } 85 86 90 public Bold(RTFElement element) 91 { 92 addElement(element); 93 } 94 95 public String createStartTag() 96 { 97 return getElementType(); 98 } 99 100 103 public String createEndTag() 104 { 105 StringBuffer sb = new StringBuffer (); 106 sb.append(getElementType()); 107 sb.append("0"); return(sb.toString()); 109 } 110 115 public Bold addElement(String hashcode,RTFElement element) 116 { 117 addElementToRegistry(hashcode,element); 118 return(this); 119 } 120 121 126 public Bold addElement(String hashcode,String element) 127 { 128 addElementToRegistry(hashcode,element); 129 return(this); 130 } 131 132 136 public Bold addElement(RTFElement element) 137 { 138 addElementToRegistry(element); 139 return(this); 140 } 141 142 146 public Bold addElement(String element) 147 { 148 addElementToRegistry(element); 149 return(this); 150 } 151 155 public Bold removeElement(String hashcode) 156 { 157 removeElementFromRegistry(hashcode); 158 return(this); 159 } 160 } 161 | Popular Tags |