com.google.code.validationframework.swing.trigger
Class InvokeLaterTrigger

java.lang.Object
  extended by com.google.code.validationframework.base.trigger.AbstractTrigger
      extended by com.google.code.validationframework.swing.trigger.InvokeLaterTrigger
All Implemented Interfaces:
com.google.code.validationframework.api.common.Disposable, com.google.code.validationframework.api.trigger.Trigger

public class InvokeLaterTrigger
extends com.google.code.validationframework.base.trigger.AbstractTrigger

Trigger wrapper to re-schedule the wrapped trigger on the Event Dispatch Thread.

This can be useful when triggers are initially trigger outside the EDT, but also to schedule the trigger later. The latter case is useful if you have triggers initiated on keystrokes on an input field and data providers reading the text of the same input field: this trigger wrapper can be used to make sure that the input field treats the keystrokes before the trigger is initiated.


Field Summary
 
Fields inherited from class com.google.code.validationframework.base.trigger.AbstractTrigger
listeners
 
Constructor Summary
InvokeLaterTrigger(com.google.code.validationframework.api.trigger.Trigger wrappedTrigger)
          Constructor specifying the wrapped trigger and whether to re-schedule on the EDT only if the wrapped trigger was initiated outside the EDT.
InvokeLaterTrigger(com.google.code.validationframework.api.trigger.Trigger wrappedTrigger, boolean evenIfAlreadyOnEDT)
          Constructor specifying the wrapped trigger and whether to re-schedule on the EDT even if the wrapped trigger was initiated on the EDT.
 
Method Summary
 
Methods inherited from class com.google.code.validationframework.base.trigger.AbstractTrigger
addTriggerListener, dispose, fireTriggerEvent, removeTriggerListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InvokeLaterTrigger

public InvokeLaterTrigger(com.google.code.validationframework.api.trigger.Trigger wrappedTrigger)
Constructor specifying the wrapped trigger and whether to re-schedule on the EDT only if the wrapped trigger was initiated outside the EDT.

By default, the trigger will always be re-scheduled later on the EDT, even if it was already triggered on the EDT.

Parameters:
wrappedTrigger - Wrapped trigger to re-schedule later on the EDT.
See Also:
InvokeLaterTrigger(Trigger, boolean)

InvokeLaterTrigger

public InvokeLaterTrigger(com.google.code.validationframework.api.trigger.Trigger wrappedTrigger,
                          boolean evenIfAlreadyOnEDT)
Constructor specifying the wrapped trigger and whether to re-schedule on the EDT even if the wrapped trigger was initiated on the EDT.

Parameters:
wrappedTrigger - Wrapped trigger to re-schedule later on the EDT.
evenIfAlreadyOnEDT - Flag indicating whether to re-schedule even if the wrapped trigger was initiated on the EDT.


Copyright © 2013. All Rights Reserved.