1 50 51 package com.lowagie.text; 52 53 56 57 public class ElementTags { 58 59 60 public static final String ITEXT = "itext"; 61 62 63 public static final String TITLE = "title"; 64 65 66 public static final String SUBJECT = "subject"; 67 68 69 public static final String KEYWORDS = "keywords"; 70 71 72 public static final String AUTHOR = "author"; 73 74 75 public static final String CREATIONDATE = "creationdate"; 76 77 78 public static final String PRODUCER = "producer"; 79 80 82 83 public static final String CHAPTER = "chapter"; 84 85 86 public static final String SECTION = "section"; 87 88 89 public static final String NUMBERDEPTH = "numberdepth"; 90 91 92 public static final String DEPTH = "depth"; 93 94 95 public static final String NUMBER = "number"; 96 97 98 public static final String INDENT = "indent"; 99 100 101 public static final String LEFT = "left"; 102 103 104 public static final String RIGHT = "right"; 105 106 108 109 public static final String PHRASE = "phrase"; 110 111 112 public static final String ANCHOR = "anchor"; 113 114 115 public static final String LIST = "list"; 116 117 118 public static final String LISTITEM = "listitem"; 119 120 121 public static final String PARAGRAPH = "paragraph"; 122 123 124 public static final String LEADING = "leading"; 125 126 127 public static final String ALIGN = "align"; 128 129 130 public static final String KEEPTOGETHER = "keeptogether"; 131 132 133 public static final String NAME = "name"; 134 135 136 public static final String REFERENCE = "reference"; 137 138 139 public static final String LISTSYMBOL = "listsymbol"; 140 141 142 public static final String NUMBERED = "numbered"; 143 144 145 public static final String LETTERED = "lettered"; 146 147 148 public static final String FIRST = "first"; 149 150 151 public static final String SYMBOLINDENT = "symbolindent"; 152 153 154 public static final String INDENTATIONLEFT = "indentationleft"; 155 156 157 public static final String INDENTATIONRIGHT = "indentationright"; 158 159 161 162 public static final String IGNORE = "ignore"; 163 164 165 public static final String ENTITY = "entity"; 166 167 168 public static final String ID = "id"; 169 170 171 public static final String CHUNK = "chunk"; 172 173 174 public static final String ENCODING = "encoding"; 175 176 177 public static final String EMBEDDED = "embedded"; 178 179 180 public static final String COLOR = "color"; 181 182 183 public static final String RED = "red"; 184 185 186 public static final String GREEN = "green"; 187 188 189 public static final String BLUE = "blue"; 190 191 192 public static final String SUBSUPSCRIPT = Chunk.SUBSUPSCRIPT.toLowerCase(); 193 194 195 public static final String LOCALGOTO = Chunk.LOCALGOTO.toLowerCase(); 196 197 198 public static final String REMOTEGOTO = Chunk.REMOTEGOTO.toLowerCase(); 199 200 201 public static final String LOCALDESTINATION = Chunk.LOCALDESTINATION.toLowerCase(); 202 203 204 public static final String GENERICTAG = Chunk.GENERICTAG.toLowerCase(); 205 206 208 209 public static final String TABLE = "table"; 210 211 212 public static final String ROW = "row"; 213 214 215 public static final String CELL = "cell"; 216 217 218 public static final String COLUMNS = "columns"; 219 220 221 public static final String LASTHEADERROW = "lastHeaderRow"; 222 223 224 public static final String CELLPADDING = "cellpadding"; 225 226 227 public static final String CELLSPACING = "cellspacing"; 228 229 230 public static final String OFFSET = "offset"; 231 232 233 public static final String WIDTHS = "widths"; 234 235 236 public static final String TABLEFITSPAGE = "tablefitspage"; 237 238 239 public static final String CELLSFITPAGE = "cellsfitpage"; 240 241 242 public static final String CONVERT2PDFP = "convert2pdfp"; 243 244 245 public static final String HORIZONTALALIGN = "horizontalalign"; 246 247 248 public static final String VERTICALALIGN = "verticalalign"; 249 250 251 public static final String COLSPAN = "colspan"; 252 253 254 public static final String ROWSPAN = "rowspan"; 255 256 257 public static final String HEADER = "header"; 258 259 260 public static final String NOWRAP = "nowrap"; 261 262 263 public static final String BORDERWIDTH = "borderwidth"; 264 265 266 public static final String TOP = "top"; 267 268 269 public static final String BOTTOM = "bottom"; 270 271 272 public static final String WIDTH = "width"; 273 274 275 public static final String BORDERCOLOR = "bordercolor"; 276 277 278 public static final String BACKGROUNDCOLOR = "backgroundcolor"; 279 280 281 public static final String BGRED = "bgred"; 282 283 284 public static final String BGGREEN = "bggreen"; 285 286 287 public static final String BGBLUE = "bgblue"; 288 289 290 public static final String GRAYFILL = "grayfill"; 291 292 294 295 public static final String IMAGE = "image"; 296 297 298 public static final String URL = "url"; 299 300 301 public static final String UNDERLYING = "underlying"; 302 303 304 public static final String TEXTWRAP = "textwrap"; 305 306 307 public static final String ALT = "alt"; 308 309 310 public static final String ABSOLUTEX = "absolutex"; 311 312 313 public static final String ABSOLUTEY = "absolutey"; 314 315 316 public static final String PLAINWIDTH = "plainwidth"; 317 318 319 public static final String PLAINHEIGHT = "plainheight"; 320 321 322 public static final String SCALEDWIDTH = "scaledwidth"; 323 324 325 public static final String SCALEDHEIGHT = "scaledheight"; 326 327 328 public static final String ROTATION = "rotation"; 329 330 331 public static final String NEWPAGE = "newpage"; 332 333 334 public static final String NEWLINE = "newline"; 335 336 337 public static final String ANNOTATION = "annotation"; 338 339 340 public static final String FILE = "file"; 341 342 343 public static final String DESTINATION = "destination"; 344 345 346 public static final String PAGE = "page"; 347 348 349 public static final String NAMED = "named"; 350 351 352 public static final String APPLICATION = "application"; 353 354 355 public static final String PARAMETERS = "parameters"; 356 357 358 public static final String OPERATION = "operation"; 359 360 361 public static final String DEFAULTDIR = "defaultdir"; 362 363 364 public static final String LLX = "llx"; 365 366 367 public static final String LLY = "lly"; 368 369 370 public static final String URX = "urx"; 371 372 373 public static final String URY = "ury"; 374 375 376 public static final String CONTENT = "content"; 377 378 380 381 public static final String ALIGN_LEFT = "Left"; 382 383 384 public static final String ALIGN_CENTER = "Center"; 385 386 387 public static final String ALIGN_RIGHT = "Right"; 388 389 390 public static final String ALIGN_JUSTIFIED = "Justify"; 391 392 393 public static final String ALIGN_JUSTIFIED_ALL = "JustifyAll"; 394 395 396 public static final String ALIGN_TOP = "Top"; 397 398 399 public static final String ALIGN_MIDDLE = "Middle"; 400 401 402 public static final String ALIGN_BOTTOM = "Bottom"; 403 404 405 public static final String ALIGN_BASELINE = "Baseline"; 406 407 408 public static final String DEFAULT = "Default"; 409 410 411 public static final String UNKNOWN = "unknown"; 412 413 414 public static final String FONT = "font"; 415 416 417 public static final String SIZE = "size"; 418 419 420 public static final String STYLE = "fontstyle"; 421 422 423 public static final String HORIZONTALRULE = "horizontalrule"; 424 425 426 public static final String PAGE_SIZE = "pagesize"; 427 428 429 public static final String ORIENTATION = "orientation"; 430 431 432 public static final String ALIGN_INDENTATION_ITEMS = "alignindent"; 433 434 435 public static final String AUTO_INDENT_ITEMS = "autoindent"; 436 437 438 public static final String LOWERCASE = "lowercase"; 439 440 442 448 public static String getAlignment(int alignment) { 449 switch(alignment) { 450 case Element.ALIGN_LEFT: 451 return ALIGN_LEFT; 452 case Element.ALIGN_CENTER: 453 return ALIGN_CENTER; 454 case Element.ALIGN_RIGHT: 455 return ALIGN_RIGHT; 456 case Element.ALIGN_JUSTIFIED: 457 case Element.ALIGN_JUSTIFIED_ALL: 458 return ALIGN_JUSTIFIED; 459 case Element.ALIGN_TOP: 460 return ALIGN_TOP; 461 case Element.ALIGN_MIDDLE: 462 return ALIGN_MIDDLE; 463 case Element.ALIGN_BOTTOM: 464 return ALIGN_BOTTOM; 465 case Element.ALIGN_BASELINE: 466 return ALIGN_BASELINE; 467 default: 468 return DEFAULT; 469 } 470 } 471 472 478 public static int alignmentValue(String alignment) { 479 if (alignment == null) return Element.ALIGN_UNDEFINED; 480 if (ALIGN_CENTER.equalsIgnoreCase(alignment)) { 481 return Element.ALIGN_CENTER; 482 } 483 if (ALIGN_LEFT.equalsIgnoreCase(alignment)) { 484 return Element.ALIGN_LEFT; 485 } 486 if (ALIGN_RIGHT.equalsIgnoreCase(alignment)) { 487 return Element.ALIGN_RIGHT; 488 } 489 if (ALIGN_JUSTIFIED.equalsIgnoreCase(alignment)) { 490 return Element.ALIGN_JUSTIFIED; 491 } 492 if (ALIGN_JUSTIFIED_ALL.equalsIgnoreCase(alignment)) { 493 return Element.ALIGN_JUSTIFIED_ALL; 494 } 495 if (ALIGN_TOP.equalsIgnoreCase(alignment)) { 496 return Element.ALIGN_TOP; 497 } 498 if (ALIGN_MIDDLE.equalsIgnoreCase(alignment)) { 499 return Element.ALIGN_MIDDLE; 500 } 501 if (ALIGN_BOTTOM.equalsIgnoreCase(alignment)) { 502 return Element.ALIGN_BOTTOM; 503 } 504 if (ALIGN_BASELINE.equalsIgnoreCase(alignment)) { 505 return Element.ALIGN_BASELINE; 506 } 507 return Element.ALIGN_UNDEFINED; 508 } 509 } | Popular Tags |