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 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