Package org.apache.groovy.swing.binding
Class EventTriggerBinding
java.lang.Object
org.apache.groovy.swing.binding.EventTriggerBinding
- All Implemented Interfaces:
TriggerBinding
Creates bindings that update whenever a named event handler property fires.
- Since:
- Groovy 1.1
-
Constructor Summary
ConstructorsConstructorDescriptionEventTriggerBinding(Object triggerBean, String eventName) Creates a trigger binding for the supplied bean event property. -
Method Summary
Modifier and TypeMethodDescriptioncreateBinding(SourceBinding sourceBinding, TargetBinding targetBinding) Creates a full binding that reacts when the event handler is invoked.Returns the event handler property name.Returns the bean that exposes the event handler property.voidsetEventName(String eventName) Replaces the event handler property name.voidsetTriggerBean(Object triggerBean) Replaces the bean that exposes the event handler property.
-
Constructor Details
-
EventTriggerBinding
Creates a trigger binding for the supplied bean event property.- Parameters:
triggerBean- the bean that exposes the event propertyeventName- the event property name
-
-
Method Details
-
createBinding
Creates a full binding that reacts when the event handler is invoked.- Specified by:
createBindingin interfaceTriggerBinding- Parameters:
sourceBinding- the source binding to read fromtargetBinding- the target binding to update- Returns:
- the created event-triggered binding
-
getTriggerBean
Returns the bean that exposes the event handler property.- Returns:
- the trigger bean
-
setTriggerBean
Replaces the bean that exposes the event handler property.- Parameters:
triggerBean- the new trigger bean
-
getEventName
Returns the event handler property name.- Returns:
- the event property name
-
setEventName
Replaces the event handler property name.- Parameters:
eventName- the new event property name
-