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.

TableEventProducer.java 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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.fo.flow.table;
  19. import org.xml.sax.Locator;
  20. import org.apache.fop.events.EventBroadcaster;
  21. import org.apache.fop.events.EventProducer;
  22. import org.apache.fop.fo.ValidationException;
  23. import org.apache.fop.fo.expr.PropertyException;
  24. /**
  25. * Event producer interface for table-specific XSL-FO validation messages.
  26. */
  27. public interface TableEventProducer extends EventProducer {
  28. /** Provider class for the event producer. */
  29. class Provider {
  30. /**
  31. * Returns an event producer.
  32. * @param broadcaster the event broadcaster to use
  33. * @return the event producer
  34. */
  35. public static TableEventProducer get(EventBroadcaster broadcaster) {
  36. return (TableEventProducer)broadcaster.getEventProducerFor(
  37. TableEventProducer.class);
  38. }
  39. }
  40. /**
  41. * A value other than "auto" has been specified on fo:table.
  42. * @param source the event source
  43. * @param loc the location of the error or null
  44. * @event.severity WARN
  45. */
  46. void nonAutoBPDOnTable(Object source, Locator loc);
  47. /**
  48. * Padding on fo:table is ignored if the collapsing border model is active.
  49. * @param source the event source
  50. * @param loc the location of the error or null
  51. * @event.severity WARN
  52. */
  53. void noTablePaddingWithCollapsingBorderModel(Object source, Locator loc);
  54. /**
  55. * No mixing of table-rows and table-cells is allowed for direct children of table-body.
  56. * @param source the event source
  57. * @param elementName the name of the context node
  58. * @param loc the location of the error or null
  59. * @throws ValidationException the validation error provoked by the method call
  60. * @event.severity FATAL
  61. */
  62. void noMixRowsAndCells(Object source, String elementName, Locator loc)
  63. throws ValidationException;
  64. /**
  65. * The table-footer was found after the table-body. FOP cannot recover with collapsed border
  66. * model.
  67. * @param source the event source
  68. * @param elementName the name of the context node
  69. * @param loc the location of the error or null
  70. * @throws ValidationException the validation error provoked by the method call
  71. * @event.severity FATAL
  72. */
  73. void footerOrderCannotRecover(Object source, String elementName, Locator loc)
  74. throws ValidationException;
  75. /**
  76. * starts-row/ends-row for fo:table-cells non-applicable for children of an fo:table-row
  77. * @param source the event source
  78. * @param loc the location of the error or null
  79. * @event.severity WARN
  80. */
  81. void startEndRowUnderTableRowWarning(Object source, Locator loc);
  82. /**
  83. * Column-number or number of cells in the row overflows the number of fo:table-column
  84. * specified for the table.
  85. * @param source the event source
  86. * @param loc the location of the error or null
  87. * @throws ValidationException the validation error provoked by the method call
  88. * @event.severity FATAL
  89. */
  90. void tooManyCells(Object source, Locator loc) throws ValidationException;
  91. /**
  92. * Property value must be 1 or bigger.
  93. * @param source the event source
  94. * @param propName the property name
  95. * @param actualValue the actual value
  96. * @param loc the location of the error or null
  97. * @throws PropertyException the property error provoked by the method call
  98. * @event.severity FATAL
  99. */
  100. void valueMustBeBiggerGtEqOne(Object source, String propName,
  101. int actualValue, Locator loc) throws PropertyException;
  102. /**
  103. * table-layout=\"fixed\" and column-width unspecified
  104. * => falling back to proportional-column-width(1)
  105. * @param source the event source
  106. * @param loc the location of the error or null
  107. * @event.severity WARN
  108. */
  109. void warnImplicitColumns(Object source, Locator loc);
  110. /**
  111. * padding-* properties are not applicable.
  112. * @param source the event source
  113. * @param elementName the name of the context node
  114. * @param loc the location of the error or null
  115. * @event.severity WARN
  116. */
  117. void paddingNotApplicable(Object source, String elementName, Locator loc);
  118. /**
  119. * Cell overlap.
  120. * @param source the event source
  121. * @param elementName the name of the context node
  122. * @param column the column index of the overlapping cell
  123. * @param loc the location of the error or null
  124. * @throws PropertyException the property error provoked by the method call
  125. * @event.severity FATAL
  126. */
  127. void cellOverlap(Object source, String elementName, int column,
  128. Locator loc) throws PropertyException;
  129. /**
  130. * @param source the event source
  131. * @param elementName the name of the context node
  132. * @param propValue the user-specified value of the column-number property
  133. * @param columnNumber the generated value for the column-number property
  134. * @param loc the location of the error or null
  135. * @event.severity WARN
  136. */
  137. void forceNextColumnNumber(Object source, String elementName, Number propValue,
  138. int columnNumber, Locator loc);
  139. /**
  140. * Break ignored due to row spanning.
  141. * @param source the event source
  142. * @param elementName the name of the context node
  143. * @param breakBefore true for "break-before", false for "break-after"
  144. * @param loc the location of the error or null
  145. * @event.severity WARN
  146. */
  147. void breakIgnoredDueToRowSpanning(Object source, String elementName, boolean breakBefore,
  148. Locator loc);
  149. }