Package org.apache.groovy.swing.binding

# Class EventTriggerBinding

java.lang.Object
org.apache.groovy.swing.binding.EventTriggerBinding

All Implemented Interfaces:
  `TriggerBinding`

public class EventTriggerBinding extends Object implements TriggerBinding
Creates bindings that update whenever a named event handler property fires.

Since:
  Groovy 1.1

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EventTriggerBinding(Object triggerBean, String eventName)`
  Creates a trigger binding for the supplied bean event property.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FullBinding`
  `createBinding(SourceBinding sourceBinding, TargetBinding targetBinding)`
  Creates a full binding that reacts when the event handler is invoked.
  `String`
  `getEventName()`
  Returns the event handler property name.
  `Object`
  `getTriggerBean()`
  Returns the bean that exposes the event handler property.
  `void`
  `setEventName(String eventName)`
  Replaces the event handler property name.
  `void`
  `setTriggerBean(Object triggerBean)`
  Replaces the bean that exposes the event handler property.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### EventTriggerBinding

    public EventTriggerBinding(Object triggerBean, String eventName)
    Creates a trigger binding for the supplied bean event property.
    Parameters:
      `triggerBean` - the bean that exposes the event property
      `eventName` - the event property name

- ## Method Details

  - ### createBinding

    public FullBinding createBinding(SourceBinding sourceBinding, TargetBinding targetBinding)
    Creates a full binding that reacts when the event handler is invoked.
    Specified by:
      `createBinding` in interface `TriggerBinding`
    Parameters:
      `sourceBinding` - the source binding to read from
      `targetBinding` - the target binding to update
    Returns:
      the created event-triggered binding

  - ### getTriggerBean

    public Object getTriggerBean()
    Returns the bean that exposes the event handler property.
    Returns:
      the trigger bean

  - ### setTriggerBean

    public void setTriggerBean(Object triggerBean)
    Replaces the bean that exposes the event handler property.
    Parameters:
      `triggerBean` - the new trigger bean

  - ### getEventName

    public String getEventName()
    Returns the event handler property name.
    Returns:
      the event property name

  - ### setEventName

    public void setEventName(String eventName)
    Replaces the event handler property name.
    Parameters:
      `eventName` - the new event property name