types
Enum EventHandlerDef

java.lang.Object
  extended by java.lang.Enum<EventHandlerDef>
      extended by types.EventHandlerDef
All Implemented Interfaces:
Serializable, Comparable<EventHandlerDef>

public enum EventHandlerDef
extends Enum<EventHandlerDef>

Defines the event handler types allowed in %controller blocks in .gui files, along with the signatures of the methods generated in the output Controller interface.


Enum Constant Summary
Action
          An event handler which is passed no additional information.
Tree
          A listener handler for a Tree.
 
Field Summary
 String handlerSig
          The signature of the generated event handling method, without the return type or the name of the method.
 String[] imports
          The classes that need to be imported for use in the handler signature.
 
Method Summary
static EventHandlerDef valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EventHandlerDef[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Action

public static final EventHandlerDef Action
An event handler which is passed no additional information.


Tree

public static final EventHandlerDef Tree
A listener handler for a Tree.

Field Detail

handlerSig

public final String handlerSig
The signature of the generated event handling method, without the return type or the name of the method. In other words, the argument list, without the parentheses.

For instance, an Action has a handlerSig of "Component widget", so the controller code generated for a declaration like this:

 %controller {
     ActionHandler frobButtonClicked;
 }
 
... might look like this:
 public interface Controller {
     // ...
     void frobButtonClicked(Component widget);
     // ...
 }
 


imports

public final String[] imports
The classes that need to be imported for use in the handler signature.

Method Detail

values

public static final EventHandlerDef[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(EventHandlerDef c : EventHandlerDef.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static EventHandlerDef valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name