Publisher

trait Publisher extends Reactor

Notifies registered reactions when an event is published. Publishers are also reactors and listen to themselves per default as a convenience.

Notifies registered reactions when an event is published. Publishers are also reactors and listen to themselves per default as a convenience.

In order to reduce memory leaks, reactions are weakly referenced by default, unless they implement Reactions.StronglyReferenced. That way, the lifetime of reactions are more easily bound to the registering object, which are reactors in common client code and hold strong references to their reactions. As a result, reactors can be garbage collected even though they still have reactions registered at some publisher, but not vice versa since reactors (strongly) reference publishers they are interested in.

trait Reactor
class Object
trait Matchable
class Any
class Button
class MenuItem
class Menu
class CheckBox
trait Editor[A]
class BuiltInEditor[A]
object selection
class ComboBox[A]
object keys
trait Wrapper
class Panel
class BoxPanel
class FlowPanel
class GridPanel
trait Wrapper
class MenuBar
object NoMenuBar
class PopupMenu
class ToolBar
object selection
class Slider
object selection
object selection
class Caret
object caret
class TextArea
class TextField
trait HasRows
class TextPane
class Window
class Dialog
class Frame
class MainFrame

Value members

Concrete methods

def publish(e: Event): Unit

Notify all registered reactions.

Notify all registered reactions.

Inherited methods

def deafTo(ps: Publisher*): Unit

Installed reaction won't receive events from the given publisher anylonger.

Installed reaction won't receive events from the given publisher anylonger.

Inherited from
Reactor
def listenTo(ps: Publisher*): Unit

Listen to the given publisher as long as deafTo isn't called for them.

Listen to the given publisher as long as deafTo isn't called for them.

Inherited from
Reactor

Concrete fields

protected val listeners: RefSet[Reaction]

Inherited fields

All reactions of this reactor.

All reactions of this reactor.

Inherited from
Reactor