Package org.apache.fop.events
Class FOPEventListenerProxy
- java.lang.Object
-
- org.apache.fop.events.FOPEventListenerProxy
-
- All Implemented Interfaces:
java.util.EventListener
,EventListener
public class FOPEventListenerProxy extends java.lang.Object implements EventListener
EventListener proxy that inspects all events and adjusts severity levels where necessary. For validation events, it reacts on each event based on the strict validation setting in the user agent. For layout events, it reduces the default severity level if FOP signals that it can recover from the event.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
BLOCK_LEVEL_EVENT_ID_PREFIX
private EventListener
delegate
private static java.lang.String
FOVALIDATION_EVENT_ID_PREFIX
private FOUserAgent
userAgent
-
Constructor Summary
Constructors Constructor Description FOPEventListenerProxy(EventListener delegate, FOUserAgent userAgent)
Main constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
processEvent(Event event)
This method is called for each event that is generated.
-
-
-
Field Detail
-
FOVALIDATION_EVENT_ID_PREFIX
private static final java.lang.String FOVALIDATION_EVENT_ID_PREFIX
-
BLOCK_LEVEL_EVENT_ID_PREFIX
private static final java.lang.String BLOCK_LEVEL_EVENT_ID_PREFIX
-
delegate
private EventListener delegate
-
userAgent
private FOUserAgent userAgent
-
-
Constructor Detail
-
FOPEventListenerProxy
public FOPEventListenerProxy(EventListener delegate, FOUserAgent userAgent)
Main constructor.- Parameters:
delegate
- the event listener to delegate events touserAgent
- the FO user agent
-
-
Method Detail
-
processEvent
public void processEvent(Event event)
This method is called for each event that is generated. With the event's ID it is possible to react to certain events. Events can also simply be recorded and presented to a user. It is possible to throw an (unchecked) exception if the processing needs to be aborted because some special event occurred. This way the client can configure the behaviour of the observed application.- Specified by:
processEvent
in interfaceEventListener
- Parameters:
event
- the event
-
-