1 50 51 package com.lowagie.text; 52 53 99 100 public class ListItem extends Paragraph { 101 102 private static final long serialVersionUID = 1970670787169329006L; 104 105 107 108 private Chunk symbol; 109 110 112 115 public ListItem() { 116 super(); 117 } 118 119 124 public ListItem(float leading) { 125 super(leading); 126 } 127 128 133 public ListItem(Chunk chunk) { 134 super(chunk); 135 } 136 137 142 public ListItem(String string) { 143 super(string); 144 } 145 146 153 public ListItem(String string, Font font) { 154 super(string, font); 155 } 156 157 164 public ListItem(float leading, Chunk chunk) { 165 super(leading, chunk); 166 } 167 168 175 public ListItem(float leading, String string) { 176 super(leading, string); 177 } 178 179 187 public ListItem(float leading, String string, Font font) { 188 super(leading, string, font); 189 } 190 191 196 public ListItem(Phrase phrase) { 197 super(phrase); 198 } 199 200 202 207 public int type() { 208 return Element.LISTITEM; 209 } 210 211 213 218 public void setListSymbol(Chunk symbol) { 219 if (this.symbol == null) { 220 this.symbol = symbol; 221 if (this.symbol.getFont().isStandardFont()) { 222 this.symbol.setFont(font); 223 } 224 } 225 } 226 227 232 public void setIndentationLeft(float indentation, boolean autoindent) { 233 if (autoindent) { 234 setIndentationLeft(getListSymbol().getWidthPoint()); 235 } 236 else { 237 setIndentationLeft(indentation); 238 } 239 } 240 241 243 248 public Chunk getListSymbol() { 249 return symbol; 250 } 251 252 254 261 public ListItem(java.util.Properties attributes) { 262 this(com.lowagie.text.factories.ElementFactory.getParagraph(attributes)); 263 } 264 265 271 public Chunk listSymbol() { 272 return getListSymbol(); 273 } 274 } 275 | Popular Tags |