Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.events
Interface EventBroadcaster

All Known Implementing Classes:
  DefaultEventBroadcaster

public interface EventBroadcaster

The EventBroadcaster is the central relay point for events. It receives events from various parts of the application and forwards them to any registered EventListener.

Method Summary
`void` | `addEventListener(EventListener listener)` Adds an event listener to the broadcaster.
`void` | `broadcastEvent(Event event)` Broadcasts an event.
`EventProducer` | `getEventProducerFor(java.lang.Class clazz)` Returns an event producer instance for the given interface class.
`boolean` | `hasEventListeners()` Indicates whether any listeners have been registered with the broadcaster.
`void` | `removeEventListener(EventListener listener)` Removes an event listener from the broadcaster.

Method Detail

### addEventListener

    public void addEventListener(EventListener listener)

  Adds an event listener to the broadcaster. It is appended to the list of previously registered listeners (the order of registration defines the calling order).

  Parameters:
    `listener` - the listener to be added

### removeEventListener

    public void removeEventListener(EventListener listener)

  Removes an event listener from the broadcaster. If the event listener is not registered, nothing happens.

  Parameters:
    `listener` - the listener to be removed

### hasEventListeners

    public boolean hasEventListeners()

  Indicates whether any listeners have been registered with the broadcaster.

  Returns:
    true if listeners are present, false otherwise

### broadcastEvent

    public void broadcastEvent(Event event)

  Broadcasts an event. This method is usually called from within the observed component.

  Parameters:
    `event` - the event to be broadcast

### getEventProducerFor

    public EventProducer getEventProducerFor(java.lang.Class clazz)

  Returns an event producer instance for the given interface class.

  Parameters:
    `clazz` - the Class object identifying an `EventProducer` interface
  Returns:
    the event producer instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.