Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

SVGEventProducer.java 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.svg;
  19. import org.apache.fop.events.EventBroadcaster;
  20. import org.apache.fop.events.EventProducer;
  21. /**
  22. * Event producer interface for SVG-related events.
  23. */
  24. public interface SVGEventProducer extends EventProducer {
  25. /**
  26. * Provider class for the event producer.
  27. */
  28. class Provider {
  29. /**
  30. * Returns an event producer.
  31. * @param broadcaster the event broadcaster to use
  32. * @return the event producer
  33. */
  34. public static SVGEventProducer get(EventBroadcaster broadcaster) {
  35. return (SVGEventProducer)broadcaster.getEventProducerFor(
  36. SVGEventProducer.class);
  37. }
  38. }
  39. /**
  40. * Error during SVG processing. Either message or e must be set.
  41. * @param source the event source
  42. * @param message the error message (or null)
  43. * @param e the exception (or null)
  44. * @event.severity ERROR
  45. */
  46. void error(Object source, String message, Exception e);
  47. /**
  48. * Alert during SVG processing.
  49. * @param source the event source
  50. * @param message the error message
  51. * @event.severity WARN
  52. */
  53. void alert(Object source, String message);
  54. /**
  55. * Info during SVG processing.
  56. * @param source the event source
  57. * @param message the error message
  58. * @event.severity INFO
  59. */
  60. void info(Object source, String message);
  61. /**
  62. * SVG graphic could not be built due to an exception.
  63. * @param source the event source
  64. * @param e the original exception
  65. * @param uri the URI of the SVG graphic
  66. * @event.severity ERROR
  67. */
  68. void svgNotBuilt(Object source, Exception e, String uri);
  69. /**
  70. * SVG graphic could not be rendered due to an exception.
  71. * @param source the event source
  72. * @param e the original exception
  73. * @param uri the URI of the SVG graphic
  74. * @event.severity ERROR
  75. */
  76. void svgRenderingError(Object source, Exception e, String uri);
  77. }