You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Root.java 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * $Id$
  3. * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  4. * For details on use and redistribution please refer to the
  5. * LICENSE file included with these sources.
  6. */
  7. package org.apache.fop.fo.pagination;
  8. // FOP
  9. import org.apache.fop.fo.*;
  10. import org.apache.fop.fo.flow.*;
  11. import org.apache.fop.fo.properties.*;
  12. import org.apache.fop.layout.AreaTree;
  13. import org.apache.fop.apps.FOPException;
  14. import org.apache.fop.extensions.ExtensionObj;
  15. /**
  16. * Class modeling the fo:root object. Contains page masters, root extensions,
  17. * page-sequences.
  18. *
  19. * @see <a href="@XSLFO-STD@#fo_root" target="_xslfostd">@XSLFO-STDID@
  20. * &para;6.4.2</a>
  21. */
  22. public class Root extends FObj {
  23. public static class Maker extends FObj.Maker {
  24. public FObj make(FObj parent,
  25. PropertyList propertyList) throws FOPException {
  26. return new Root(parent, propertyList);
  27. }
  28. }
  29. public static FObj.Maker maker() {
  30. return new Root.Maker();
  31. }
  32. LayoutMasterSet layoutMasterSet;
  33. /**
  34. * Store a page sequence over a sequence change. The next sequence will
  35. * get the page number from this and also take care of forced pages.
  36. */
  37. PageSequence pageSequence;
  38. protected Root(FObj parent,
  39. PropertyList propertyList) throws FOPException {
  40. super(parent, propertyList);
  41. // this.properties.get("media-usage");
  42. if (parent != null) {
  43. throw new FOPException("root must be root element");
  44. }
  45. }
  46. public void setPageSequence(PageSequence pageSequence) {
  47. this.pageSequence=pageSequence;
  48. }
  49. public PageSequence getPageSequence() {
  50. return this.pageSequence;
  51. }
  52. public LayoutMasterSet getLayoutMasterSet() {
  53. return this.layoutMasterSet;
  54. }
  55. public void setLayoutMasterSet(LayoutMasterSet layoutMasterSet) {
  56. this.layoutMasterSet = layoutMasterSet;
  57. }
  58. public String getName() {
  59. return "fo:root";
  60. }
  61. }