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.

LayoutManagerMaker.java 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. /* $Id$ */
  18. package org.apache.fop.layoutmgr;
  19. import java.util.List;
  20. import org.apache.fop.area.AreaTreeHandler;
  21. import org.apache.fop.area.Block;
  22. import org.apache.fop.fo.FONode;
  23. import org.apache.fop.fo.extensions.ExternalDocument;
  24. import org.apache.fop.fo.pagination.Flow;
  25. import org.apache.fop.fo.pagination.PageSequence;
  26. import org.apache.fop.fo.pagination.SideRegion;
  27. import org.apache.fop.fo.pagination.StaticContent;
  28. import org.apache.fop.fo.pagination.Title;
  29. import org.apache.fop.layoutmgr.inline.ContentLayoutManager;
  30. /**
  31. * The interface for all LayoutManager makers
  32. */
  33. public interface LayoutManagerMaker {
  34. /**
  35. * Make LayoutManagers for the node and add them to the list lms.
  36. * @param node the FO node for which the LayoutManagers are made
  37. * @param lms the list to which the LayoutManagers are added
  38. */
  39. void makeLayoutManagers(FONode node, List lms);
  40. /**
  41. * Make a specific LayoutManager for the node.
  42. * If not exactly one LayoutManagers is available,
  43. * an IllegalStateException is thrown.
  44. * @param node the FO node for which the LayoutManagers are made
  45. * @return The created LayoutManager
  46. */
  47. LayoutManager makeLayoutManager(FONode node);
  48. /**
  49. * Make a PageSequenceLayoutManager object.
  50. * @param ath the AreaTreeHandler object the PSLM interacts with
  51. * @param ps the fo:page-sequence object this PSLM will process
  52. * @return The created PageSequenceLayoutManager object
  53. */
  54. PageSequenceLayoutManager makePageSequenceLayoutManager(
  55. AreaTreeHandler ath, PageSequence ps);
  56. /**
  57. * Make a ExternalDocumentLayoutManager object for the fox:external-document extension.
  58. * @param ath the AreaTreeHandler object the external-document interacts with
  59. * @param ed the fox:external-document object to be processed
  60. * @return The created ExternalDocumentLayoutManager object
  61. */
  62. ExternalDocumentLayoutManager makeExternalDocumentLayoutManager(
  63. AreaTreeHandler ath, ExternalDocument ed);
  64. /**
  65. * Make a FlowLayoutManager object.
  66. * @param pslm the parent PageSequenceLayoutManager object
  67. * @param flow the fo:flow object this FLM will process
  68. * @return The created FlowLayoutManager object
  69. */
  70. FlowLayoutManager makeFlowLayoutManager(
  71. PageSequenceLayoutManager pslm, Flow flow);
  72. /**
  73. * Make a ContentLayoutManager object.
  74. * @param pslm the parent PageSequenceLayoutManager object
  75. * @param title the fo:title object this CLM will process
  76. * @return The created ContentLayoutManager object
  77. */
  78. ContentLayoutManager makeContentLayoutManager(
  79. PageSequenceLayoutManager pslm, Title title);
  80. /**
  81. * Make a StaticContentLayoutManager object.
  82. * @param pslm the parent PageSequenceLayoutManager object
  83. * @param sc the fo:static-content object this SCLM will process
  84. * @param reg the side region indicating where the static content
  85. * needs to be processed.
  86. * @return The created StaticContentLayoutManager object
  87. */
  88. StaticContentLayoutManager makeStaticContentLayoutManager(
  89. PageSequenceLayoutManager pslm, StaticContent sc, SideRegion reg);
  90. /**
  91. * Make a StaticContentLayoutManager object for a footnote-separator.
  92. * @param pslm the parent PageSequenceLayoutManager object
  93. * @param sc the fo:static-content object this SCLM will process
  94. * @param block the Block area this SCLM must add its areas to
  95. * @return The created StaticContentLayoutManager object
  96. */
  97. StaticContentLayoutManager makeStaticContentLayoutManager(
  98. PageSequenceLayoutManager pslm, StaticContent sc, Block block);
  99. }