obsolete (cf. isabelle.EventBus in Pure/General/event_bus.scala);
authorwenzelm
Mon, 29 Dec 2008 20:36:34 +0100
changeset 34455 4900605ebd0c
parent 34454 feeab430c3eb
child 34456 14367c0715e8
obsolete (cf. isabelle.EventBus in Pure/General/event_bus.scala);
src/Tools/jEdit/src/utils/EventSource.scala
--- a/src/Tools/jEdit/src/utils/EventSource.scala	Mon Dec 29 17:50:39 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-/*
- * Event sources with multiple handlers
- *
- * @author Johannes Hölzl, TU Munich
- */
-
-package isabelle.utils
-
-import scala.collection.mutable.HashSet
-
-class EventSource[Event] {
-  private val handlers = new HashSet[(Event) => Unit]()
-
-  def add(handler : (Event) => Unit) { handlers += handler }
-  def remove(handler : (Event) => Unit) { handlers -= handler }
-	
-  def fire(event : Event) { for(h <- handlers) h(event) }
-}
\ No newline at end of file