com.google.code.validationframework.swing.trigger
Class BaseJComponentFocusLostTrigger<C extends JComponent>

java.lang.Object
  extended by com.google.code.validationframework.base.trigger.AbstractTrigger
      extended by com.google.code.validationframework.swing.trigger.BaseJComponentFocusLostTrigger<C>
Type Parameters:
C - Type of component whose focus is to be tracked.
All Implemented Interfaces:
com.google.code.validationframework.api.common.Disposable, com.google.code.validationframework.api.trigger.Trigger
Direct Known Subclasses:
JComponentFocusLostTrigger, JFormattedTextFieldFocusLostTrigger, JTextFieldFocusLostTrigger

public class BaseJComponentFocusLostTrigger<C extends JComponent>
extends com.google.code.validationframework.base.trigger.AbstractTrigger
implements com.google.code.validationframework.api.common.Disposable

Base class for triggers on focus loss.
When this trigger is not longer required, do not forget to call dispose().

See Also:
AbstractTrigger, dispose()

Field Summary
 
Fields inherited from class com.google.code.validationframework.base.trigger.AbstractTrigger
listeners
 
Constructor Summary
BaseJComponentFocusLostTrigger(C source)
          Constructor specified the component whose focus is to be tracked.
A focus listener will be installed.
 
Method Summary
 void dispose()
           
 C getComponent()
          Gets the source component.
 
Methods inherited from class com.google.code.validationframework.base.trigger.AbstractTrigger
addTriggerListener, fireTriggerEvent, removeTriggerListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseJComponentFocusLostTrigger

public BaseJComponentFocusLostTrigger(C source)
Constructor specified the component whose focus is to be tracked.
A focus listener will be installed. So you may need to call dispose() when trigger is no longer needed.

Parameters:
source - Component whose focus is to be tracked.
See Also:
dispose()
Method Detail

getComponent

public C getComponent()
Gets the source component.

Returns:
Source component.

dispose

public void dispose()
Specified by:
dispose in interface com.google.code.validationframework.api.common.Disposable
Overrides:
dispose in class com.google.code.validationframework.base.trigger.AbstractTrigger
See Also:
Disposable.dispose()


Copyright © 2013. All Rights Reserved.