com.threerings.opengl.gui.util
Class ControllerUtil

java.lang.Object
  extended by com.threerings.opengl.gui.util.ControllerUtil

public class ControllerUtil
extends Object

Provides some OpenGL GUI equivalents to the static methods in Controller.


Field Summary
static ActionListener DISPATCHER
          An action listener that uses postAction(com.threerings.opengl.gui.Component, java.lang.String) to forward the event to a controller.
 
Constructor Summary
ControllerUtil()
           
 
Method Summary
static void postAction(ActionEvent event)
          Attempts to find a Controller to handle the specified event by rising up through the component hierarchy starting at the event's target.
static void postAction(Component source, String action)
          Posts a new ActionEvent with the supplied parameters to the controller hierarchy.
static void postAction(Component source, String action, Object argument)
          Posts a new ActionEvent with the supplied parameters to the controller hierarchy.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISPATCHER

public static final ActionListener DISPATCHER
An action listener that uses postAction(com.threerings.opengl.gui.Component, java.lang.String) to forward the event to a controller.

Constructor Detail

ControllerUtil

public ControllerUtil()
Method Detail

postAction

public static void postAction(Component source,
                              String action)
Posts a new ActionEvent with the supplied parameters to the controller hierarchy.


postAction

public static void postAction(Component source,
                              String action,
                              Object argument)
Posts a new ActionEvent with the supplied parameters to the controller hierarchy.


postAction

public static void postAction(ActionEvent event)
Attempts to find a Controller to handle the specified event by rising up through the component hierarchy starting at the event's target. Unlike Controller.postAction(java.awt.event.ActionEvent), this method handles the event immediately, rather than posting an action on the AWT thread.



Copyright © 2011. All Rights Reserved.