com.google.code.validationframework.swing.trigger
Class BaseComponentPropertyChangedTrigger<C extends Component>

java.lang.Object
  extended by com.google.code.validationframework.base.trigger.AbstractTrigger
      extended by com.google.code.validationframework.swing.trigger.BaseComponentPropertyChangedTrigger<C>
All Implemented Interfaces:
com.google.code.validationframework.api.common.Disposable, com.google.code.validationframework.api.trigger.Trigger
Direct Known Subclasses:
ComponentPropertyChangedTrigger, ComponentPropertyChangeTrigger

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

Trigger initiating the validation when one or several properties of a component change.


Field Summary
 
Fields inherited from class com.google.code.validationframework.base.trigger.AbstractTrigger
listeners
 
Constructor Summary
BaseComponentPropertyChangedTrigger(C source)
          Constructor specifying the component whose property changes are to be watched.
Using this constructor will be the trigger initiate the validation upon any property change.
BaseComponentPropertyChangedTrigger(C component, String... propertyNames)
          Constructor specifying the component for which the specified property changes are to be watched.
 
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

BaseComponentPropertyChangedTrigger

public BaseComponentPropertyChangedTrigger(C source)
Constructor specifying the component whose property changes are to be watched.
Using this constructor will be the trigger initiate the validation upon any property change.

Parameters:
source - Component whose property changes are to be listened to.

BaseComponentPropertyChangedTrigger

public BaseComponentPropertyChangedTrigger(C component,
                                           String... propertyNames)
Constructor specifying the component for which the specified property changes are to be watched.

Parameters:
component - Component whose property changes are to be listened to.
propertyNames - Optional names of the properties of the component to listen to.
If no property name is specified, changes on any property will initiate the trigger.
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.