talx x1.0.5

talx.view
Class ActionDispatcher

java.lang.Object
  extended bytalx.view.ActionDispatcher
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class ActionDispatcher
extends java.lang.Object
implements java.awt.event.ActionListener

Class to provide system-wide action dispatch services. All components that wish to generate action events should register through the static addActionGenerator method. Eventually, the controller will put itself in as the listener. This class merely serves as a placeholder for the controller because the controller cannot be created until the view is created, but by then the view already needed to send its actions somewhere.


Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Sends the ActionEvent to the controller.
static void addActionGenerator(javax.swing.AbstractButton b)
           
static void addActionGenerator(InboxControl c)
          Objects wishing to broadcast actions should register via this method.
static void clear()
          Shuts down the controller and discards all object references.
static void fireActionEvent(java.awt.event.ActionEvent e)
           
static java.lang.ThreadGroup getCurrentFeatureThreadGroup()
          Returns a thread group that is shared amoung features.
static void setController(Controller c)
          Objects wishing to hear the action broadcast should subsribe via this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setController

public static void setController(Controller c)
Objects wishing to hear the action broadcast should subsribe via this method.


addActionGenerator

public static void addActionGenerator(javax.swing.AbstractButton b)

addActionGenerator

public static void addActionGenerator(InboxControl c)
Objects wishing to broadcast actions should register via this method.


fireActionEvent

public static void fireActionEvent(java.awt.event.ActionEvent e)

clear

public static void clear()
Shuts down the controller and discards all object references.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Sends the ActionEvent to the controller.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getCurrentFeatureThreadGroup

public static java.lang.ThreadGroup getCurrentFeatureThreadGroup()
Returns a thread group that is shared amoung features. Using this thread group for features that spawn new threads, along with meaningful thread names, allows easy debugging of concurrency issues.


talx x1.0.5

© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.