Package ca.phon.app.session.editor
Class EditorEventManager
java.lang.Object
ca.phon.app.session.editor.EditorEventManager
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.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the session editor we are dispatching events forvoid
queueEvent
(EditorEvent<?> ee) Queue the given event.<T> void
registerActionForEvent
(EditorEventType<T> eventType, EditorAction<T> action) <T> void
registerActionForEvent
(EditorEventType<T> eventName, EditorAction<T> action, EditorEventManager.RunOn runOn) Register a handler for the given event name<T> void
removeActionForEvent
(EditorEventType<T> eventType, EditorAction<T> action) Remove handler for the given eventvoid
shutdown()
Shutdown the even thread.
-
Constructor Details
-
EditorEventManager
Constructor- Parameters:
editor
-
-
-
Method Details
-
shutdown
public void shutdown()Shutdown the even thread. -
getEditor
Get the session editor we are dispatching events for -
queueEvent
Queue the given event.- Parameters:
ee
-
-
registerActionForEvent
-
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
Remove handler for the given event- Parameters:
eventType
-action
-
-