siouxsie.desktop.events
Class DesktopBus

java.lang.Object
  extended by siouxsie.desktop.events.DesktopBus

public class DesktopBus
extends java.lang.Object

Main bus for desktop scoped events. The bus receives events from differents sources in the desktop and forwards them to listeners. This centralized implementation of the observer pattern is used instead of using scattered event generators and listeners, which could lead to very messy event path and hard to debug code.

This solution is inspired of the JEdit text editor, where plugins register to an edit bus to receive events.

Version:
$Id$
Author:
Arnaud Cogoluegnes

Constructor Summary
DesktopBus()
           
 
Method Summary
 void addDesktopListener(DesktopListener desktopListener)
           
 void fireDesktopEvent(DesktopEvent event)
           
 java.util.List<DesktopActorContribution> getActors()
           
 void init()
          Init the actors with the bus.
 void removeDesktopListener(DesktopListener desktopListener)
           
 void setActors(java.util.List<DesktopActorContribution> actors)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DesktopBus

public DesktopBus()
Method Detail

addDesktopListener

public void addDesktopListener(DesktopListener desktopListener)

removeDesktopListener

public void removeDesktopListener(DesktopListener desktopListener)

fireDesktopEvent

public void fireDesktopEvent(DesktopEvent event)

init

public void init()
Init the actors with the bus.


getActors

public java.util.List<DesktopActorContribution> getActors()

setActors

public void setActors(java.util.List<DesktopActorContribution> actors)


Copyright © 2006-2008 null. All Rights Reserved.