IBM Branch Transformation Toolkit Javadoc

com.ibm.dse.gui
Class Converter

java.lang.Object
  extended bycom.ibm.dse.gui.Formatter
      extended bycom.ibm.dse.gui.Converter
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
DateConverter, FloatConverter, IntegerConverter, NumericConverter

public abstract class Converter
extends Formatter
implements java.io.Serializable, java.lang.Cloneable

The Converter abstract class defines the default validation behavior.

See Also:
Serialized Form

Field Summary
protected  java.beans.PropertyChangeSupport propertyChange
           
 
Constructor Summary
Converter()
          This constructor creates a Converter object.
Converter(java.lang.String Error)
          This constructor creates a Converter object.
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Generated to support the propertyChange field.
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Generated to support the propertyChange field.
 java.lang.String getErrorMessage()
          Returns the errorMessage property (java.lang.String) value.
 boolean getIsConvertible()
          Returns the isConvertible property (boolean) value.
 boolean getIsNull()
          Returns the isNull property (boolean) value.
protected  java.beans.PropertyChangeSupport getPropertyChange()
          Accessor for the propertyChange field.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Generated to support the propertyChange field.
 void setErrorMessage(java.lang.String errorMessage)
          Sets the errorMessage property (java.lang.String) value.
 void setIsConvertible(boolean isConvertible)
          Sets the isConvertible property (boolean) value.
 void setIsNull(boolean isNull)
          Sets the isNull property (boolean) value.
 boolean validate(java.lang.String userInput)
          Returns a boolean that indicates if the validation has been achieved successfully or not.
 boolean validateKey(java.lang.String userInput, java.awt.event.KeyEvent keyEvent)
          Returns a boolean that indicates if the validation has been achieved successfully or not for this new key.
 java.lang.String validateWithError(java.lang.String userInput)
          Returns a String that indicates if the validation has been achieved successfully or not.
 
Methods inherited from class com.ibm.dse.gui.Formatter
format, formatAsConversionType, formatFromConversionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyChange

protected transient java.beans.PropertyChangeSupport propertyChange
Constructor Detail

Converter

public Converter()
This constructor creates a Converter object.


Converter

public Converter(java.lang.String Error)
This constructor creates a Converter object.

Parameters:
Error - java.lang.String, the error message
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Generated to support the propertyChange field.


firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Generated to support the propertyChange field.


getErrorMessage

public java.lang.String getErrorMessage()
Returns the errorMessage property (java.lang.String) value.

Returns:
String - the errorMessage property value.
See Also:
setErrorMessage(java.lang.String)

getIsConvertible

public boolean getIsConvertible()
Returns the isConvertible property (boolean) value.

Returns:
boolean - the isConvertible property value.
See Also:
setIsConvertible(boolean)

getIsNull

public boolean getIsNull()
Returns the isNull property (boolean) value.

Returns:
boolean - the isNull property value.
See Also:
setIsNull(boolean)

getPropertyChange

protected java.beans.PropertyChangeSupport getPropertyChange()
Accessor for the propertyChange field.


removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Generated to support the propertyChange field.


setErrorMessage

public void setErrorMessage(java.lang.String errorMessage)
Sets the errorMessage property (java.lang.String) value.

Parameters:
errorMessage - String, the new value for the errorMessage property.
See Also:
getErrorMessage()

setIsConvertible

public void setIsConvertible(boolean isConvertible)
Sets the isConvertible property (boolean) value.

Parameters:
isConvertible - boolean, the new value for the isConvertible property.
See Also:
getIsConvertible()

setIsNull

public void setIsNull(boolean isNull)
Sets the isNull property (boolean) value.

Parameters:
isNull - boolean, the new value for the isNull property.
See Also:
getIsNull()

validate

public boolean validate(java.lang.String userInput)
Returns a boolean that indicates if the validation has been achieved successfully or not.

Parameters:
userInput - java.lang.String - the string to be validated
Returns:
boolean - the result of the validation

validateKey

public boolean validateKey(java.lang.String userInput,
                           java.awt.event.KeyEvent keyEvent)
Returns a boolean that indicates if the validation has been achieved successfully or not for this new key.

Parameters:
userInput - java.lang.String - the string writed.
keyEvent - java.awt.event.KeyEvent - new key.
Returns:
boolean - the result of the validation.

validateWithError

public java.lang.String validateWithError(java.lang.String userInput)
Returns a String that indicates if the validation has been achieved successfully or not. If null the validation has been achieved successfully if is a String then the validation has not been achieved succefully and returns its error message.

Parameters:
userInput - java.lang.String - the string to be validated
Returns:
String - the result of the validation (null or error message).

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005