Class EditorEventManager

java.lang.Object
ca.phon.app.session.editor.EditorEventManager

public class EditorEventManager extends Object

Handles passing of internal EditorEvents. Events can be dispatched on the AWT event thread or on a background thread.

Events are placed into a queue until they can be processed. Events are processed using a background thread.

  • Constructor Details

    • EditorEventManager

      public EditorEventManager(SessionEditor editor)
      Constructor
      Parameters:
      editor -
  • Method Details

    • shutdown

      public void shutdown()
      Shutdown the even thread.
    • getEditor

      public SessionEditor getEditor()
      Get the session editor we are dispatching events for
    • queueEvent

      public void queueEvent(EditorEvent<?> ee)
      Queue the given event.
      Parameters:
      ee -
    • registerActionForEvent

      public <T> void registerActionForEvent(EditorEventType<T> eventType, EditorAction<T> action)
    • registerActionForEvent

      public <T> void registerActionForEvent(EditorEventType<T> eventName, EditorAction<T> action, EditorEventManager.RunOn runOn)
      Register a handler for the given event name
      Parameters:
      eventName -
      action -
      runOn -
      blocking -
    • removeActionForEvent

      public <T> void removeActionForEvent(EditorEventType<T> eventType, EditorAction<T> action)
      Remove handler for the given event
      Parameters:
      eventType -
      action -