Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.ui
Class DefaultValidator

java.lang.Object
  extended by com.ibm.etools.iseries.ui.AbstractValidator
      extended by com.ibm.etools.iseries.ui.DefaultValidator
All Implemented Interfaces:
Validator, PropertyChangeListener, VetoableChangeListener, Serializable, EventListener

public class DefaultValidator
extends AbstractValidator
implements PropertyChangeListener, VetoableChangeListener, Serializable

DefaultValidator extends AbstractValidator. This validator does nothing. It always returns true for the method isDataValid. If you do not want any validation to be performed for JFormattedTextField, JFormattedLabel or JFormattedComboBox, then set this DefaultValidator in the field model. However, a JFormattedComponent itself will verify the data type, data length, and decimal places of the field.

See Also:
ComparisonRangeValidator, AbstractValidator, Validator, Serialized Form

Field Summary
static String Copyright
           
protected  Attributes dataAttributes
           
protected  PropertyChangeSupport propertyChange
           
protected  VetoableChangeSupport vetoPropertyChange
           
 
Fields inherited from interface com.ibm.etools.iseries.ui.Validator
copyright
 
Constructor Summary
DefaultValidator()
          Constructs a new DefaultValidator.
DefaultValidator(Attributes dataAttributes)
          Constructs a new DefaultValidator with the specified DataAttributes.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void addVetoableChangeListener(VetoableChangeListener l)
          Add a vetoableChangeListener.
static String Copyright()
          This method returns the copyright notice for this class.
 Attributes getDataAttributes()
          Gets the dataAttributes property (com.ibm.etools.iseries.ui.Attributes) value.
 boolean isDataValid(String text)
          Always return true.
 void propertyChange(PropertyChangeEvent e)
          Examine the PropertyChangeEvent and decides what to do on a particular event.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes a propertyChangeListener.
 void removeVetoableChangeListener(VetoableChangeListener l)
          Removes a vetoableChangeListener.
 void setDataAttributes(Attributes a)
          Sets the dataAttributes property (com.ibm.etools.iseries.ui.Attributes) value.
 void vetoableChange(PropertyChangeEvent e)
          This method gets called when a constrained property is changed.
 
Methods inherited from class com.ibm.etools.iseries.ui.AbstractValidator
fireVetoableChange, getVetoPropertyChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

public static final String Copyright
See Also:
Constant Field Values

dataAttributes

protected Attributes dataAttributes

propertyChange

protected transient PropertyChangeSupport propertyChange

vetoPropertyChange

protected transient VetoableChangeSupport vetoPropertyChange
Constructor Detail

DefaultValidator

public DefaultValidator()
Constructs a new DefaultValidator.


DefaultValidator

public DefaultValidator(Attributes dataAttributes)
Constructs a new DefaultValidator with the specified DataAttributes. Please note that the parameter must be an instance of com.ibm.etools.iseries.ui.DataAttributes; otherwise java.beans.PropertyVetoException will be thrown at run time.

Parameters:
dataAttributes - com.ibm.etools.iseries.ui.Attributes
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener l)
Add a vetoableChangeListener.

Overrides:
addVetoableChangeListener in class AbstractValidator
Parameters:
l - java.beans.VetoableChangeListener

Copyright

public static String Copyright()
This method returns the copyright notice for this class.

Returns:
java.lang.String

getDataAttributes

public Attributes getDataAttributes()
Gets the dataAttributes property (com.ibm.etools.iseries.ui.Attributes) value.

Specified by:
getDataAttributes in interface Validator
Specified by:
getDataAttributes in class AbstractValidator
Returns:
The dataAttributes property value.
See Also:
setDataAttributes(com.ibm.etools.iseries.ui.Attributes)

isDataValid

public boolean isDataValid(String text)
Always return true.

Specified by:
isDataValid in interface Validator
Specified by:
isDataValid in class AbstractValidator
Parameters:
text - String
Returns:
true

propertyChange

public void propertyChange(PropertyChangeEvent e)
Examine the PropertyChangeEvent and decides what to do on a particular event.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
e - java.beans.PropertyChangeEvent

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes a propertyChangeListener.

Parameters:
l - PropertyChangeListener

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener l)
Removes a vetoableChangeListener.

Overrides:
removeVetoableChangeListener in class AbstractValidator
Parameters:
l - java.beans.VetoableChangeListener

setDataAttributes

public void setDataAttributes(Attributes a)
                       throws PropertyVetoException
Sets the dataAttributes property (com.ibm.etools.iseries.ui.Attributes) value. Please note that the parameter must be an instance of com.ibm.etools.iseries.ui.DataAttributes; otherwise java.beans.PropertyVetoException will be thrown at run time.

Specified by:
setDataAttributes in interface Validator
Specified by:
setDataAttributes in class AbstractValidator
Parameters:
dataAttributes - The new value for the property.
Throws:
PropertyVetoException
See Also:
getDataAttributes()

vetoableChange

public void vetoableChange(PropertyChangeEvent e)
                    throws PropertyVetoException
This method gets called when a constrained property is changed.

Specified by:
vetoableChange in interface VetoableChangeListener
Parameters:
e - java.beans.PropertyChangeEvent a PropertyChangeEvent object describing the event source and the property that has changed.
Throws:
PropertyVetoException - if the recipient wishes the property change to be rolled back.

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.