1 17 18 19 20 package org.apache.fop.fo; 21 22 import java.util.HashSet ; 24 import java.util.Set ; 25 import org.xml.sax.SAXException ; 26 27 import org.apache.fop.apps.FOUserAgent; 29 import org.apache.fop.fo.flow.BasicLink; 30 import org.apache.fop.fo.flow.Block; 31 import org.apache.fop.fo.flow.BlockContainer; 32 import org.apache.fop.fo.flow.Character; 33 import org.apache.fop.fo.flow.ExternalGraphic; 34 import org.apache.fop.fo.flow.Footnote; 35 import org.apache.fop.fo.flow.FootnoteBody; 36 import org.apache.fop.fo.flow.Inline; 37 import org.apache.fop.fo.flow.InstreamForeignObject; 38 import org.apache.fop.fo.flow.Leader; 39 import org.apache.fop.fo.flow.ListBlock; 40 import org.apache.fop.fo.flow.ListItem; 41 import org.apache.fop.fo.flow.PageNumber; 42 import org.apache.fop.fo.flow.Table; 43 import org.apache.fop.fo.flow.TableBody; 44 import org.apache.fop.fo.flow.TableCell; 45 import org.apache.fop.fo.flow.TableColumn; 46 import org.apache.fop.fo.flow.TableRow; 47 import org.apache.fop.fo.pagination.Flow; 48 import org.apache.fop.fo.pagination.PageSequence; 49 import org.apache.fop.fonts.FontInfo; 50 51 52 63 public abstract class FOEventHandler { 64 65 68 protected FOUserAgent foUserAgent; 69 70 73 protected FontInfo fontInfo; 74 75 79 private Set idReferences = new HashSet (); 80 81 84 protected PropertyListMaker propertyListMaker; 85 86 89 protected XMLWhiteSpaceHandler whiteSpaceHandler = new XMLWhiteSpaceHandler(); 90 91 94 private boolean inMarker = false; 95 96 100 public FOEventHandler(FOUserAgent foUserAgent) { 101 this.foUserAgent = foUserAgent; 102 this.fontInfo = new FontInfo(); 103 } 104 105 109 public Set getIDReferences() { 110 return idReferences; 111 } 112 113 117 public FOUserAgent getUserAgent() { 118 return foUserAgent; 119 } 120 121 125 public FontInfo getFontInfo() { 126 return this.fontInfo; 127 } 128 129 132 public PropertyListMaker getPropertyListMaker() { 133 return propertyListMaker; 134 } 135 136 139 public void setPropertyListMaker(PropertyListMaker propertyListMaker) { 140 this.propertyListMaker = propertyListMaker; 141 } 142 143 147 public XMLWhiteSpaceHandler getXMLWhiteSpaceHandler() { 148 return whiteSpaceHandler; 149 } 150 151 157 protected void switchMarkerContext(boolean inMarker) { 158 this.inMarker = inMarker; 159 } 160 161 164 protected boolean inMarker() { 165 return this.inMarker; 166 } 167 168 172 public void startDocument() throws SAXException { 173 } 174 175 179 public void endDocument() throws SAXException { 180 } 181 182 186 public void startPageSequence(PageSequence pageSeq) { 187 } 188 189 192 public void endPageSequence(PageSequence pageSeq) { 193 } 194 195 199 public void startPageNumber(PageNumber pagenum) { 200 } 201 202 206 public void endPageNumber(PageNumber pagenum) { 207 } 208 209 217 public void startFlow(Flow fl) { 218 } 219 220 224 public void endFlow(Flow fl) { 225 } 226 227 231 public void startBlock(Block bl) { 232 } 233 234 238 public void endBlock(Block bl) { 239 } 240 241 245 public void startBlockContainer(BlockContainer blc) { 246 } 247 248 252 public void endBlockContainer(BlockContainer blc) { 253 } 254 255 259 public void startInline(Inline inl) { 260 } 261 262 266 public void endInline(Inline inl) { 267 } 268 269 274 public void startTable(Table tbl) { 275 } 276 277 281 public void endTable(Table tbl) { 282 } 283 284 288 public void startColumn(TableColumn tc) { 289 } 290 291 295 public void endColumn(TableColumn tc) { 296 } 297 298 302 public void startHeader(TableBody th) { 303 } 304 305 309 public void endHeader(TableBody th) { 310 } 311 312 316 public void startFooter(TableBody tf) { 317 } 318 319 323 public void endFooter(TableBody tf) { 324 } 325 326 330 public void startBody(TableBody tb) { 331 } 332 333 337 public void endBody(TableBody tb) { 338 } 339 340 344 public void startRow(TableRow tr) { 345 } 346 347 351 public void endRow(TableRow tr) { 352 } 353 354 358 public void startCell(TableCell tc) { 359 } 360 361 365 public void endCell(TableCell tc) { 366 } 367 368 369 374 public void startList(ListBlock lb) { 375 } 376 377 381 public void endList(ListBlock lb) { 382 } 383 384 388 public void startListItem(ListItem li) { 389 } 390 391 395 public void endListItem(ListItem li) { 396 } 397 398 401 public void startListLabel() { 402 } 403 404 407 public void endListLabel() { 408 } 409 410 413 public void startListBody() { 414 } 415 416 419 public void endListBody() { 420 } 421 422 426 public void startStatic() { 427 } 428 429 432 public void endStatic() { 433 } 434 435 436 439 public void startMarkup() { 440 } 441 442 445 public void endMarkup() { 446 } 447 448 452 public void startLink(BasicLink basicLink) { 453 } 454 455 458 public void endLink() { 459 } 460 461 465 public void image(ExternalGraphic eg) { 466 } 467 468 471 public void pageRef() { 472 } 473 474 478 public void foreignObject(InstreamForeignObject ifo) { 479 } 480 481 485 public void startFootnote(Footnote footnote) { 486 } 487 488 492 public void endFootnote(Footnote footnote) { 493 } 494 495 499 public void startFootnoteBody(FootnoteBody body) { 500 } 501 502 506 public void endFootnoteBody(FootnoteBody body) { 507 } 508 509 513 public void leader(Leader l) { 514 } 515 516 520 public void character(Character c) { 521 } 522 523 529 public void characters(char data[], int start, int length) { 530 } 531 532 } 533 534 | Popular Tags |