MDACC
Biostatistics

org.mdanderson.biostat.util
Class ValidationAdapter

java.lang.Object
  extended byorg.mdanderson.biostat.util.ValidationAdapter
All Implemented Interfaces:
DocumentListener, EventListener, StatusSource, Validator
Direct Known Subclasses:
NonWhitespaceValidator, NumericValidator, PathnameValidator

public abstract class ValidationAdapter
extends Object
implements Validator, StatusSource

ValidationAdapter - Textfield validation adapter


Constructor Summary
ValidationAdapter()
           
 
Method Summary
 void addStatusListener(StatusListener listener)
          Adds a status listener for notification of state of data changes
 void changedUpdate(DocumentEvent event)
          Gives notification that an attribute or set of attributes changed
 void insertUpdate(DocumentEvent event)
          Gives notification that there was an insert into the document
abstract  boolean isValid(Object value)
          Determines the validity of data
 void removeStatusListener(StatusListener listener)
          Removes a status listener
 void removeUpdate(DocumentEvent event)
          Gives notification that a portion of the document has been removed
 boolean validate(Object value)
          Determines the validity of data and fires an event if state has changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationAdapter

public ValidationAdapter()
Method Detail

isValid

public abstract boolean isValid(Object value)
Determines the validity of data

Specified by:
isValid in interface Validator
Parameters:
value - data to be checked
Returns:
true if data is valid; otherwise, false

validate

public boolean validate(Object value)
Determines the validity of data and fires an event if state has changed

Specified by:
validate in interface Validator
Parameters:
value - data to be checked
Returns:
true if data is valid; otherwise, false
See Also:
isValid(java.lang.Object)

changedUpdate

public void changedUpdate(DocumentEvent event)
Gives notification that an attribute or set of attributes changed

Specified by:
changedUpdate in interface Validator
Parameters:
event - document change notification event

insertUpdate

public void insertUpdate(DocumentEvent event)
Gives notification that there was an insert into the document

Specified by:
insertUpdate in interface Validator
Parameters:
event - document change notification event

removeUpdate

public void removeUpdate(DocumentEvent event)
Gives notification that a portion of the document has been removed

Specified by:
removeUpdate in interface Validator
Parameters:
event - document change notification event

addStatusListener

public void addStatusListener(StatusListener listener)
Adds a status listener for notification of state of data changes

Specified by:
addStatusListener in interface Validator
Parameters:
listener - status listener

removeStatusListener

public void removeStatusListener(StatusListener listener)
Removes a status listener

Specified by:
removeStatusListener in interface Validator
Parameters:
listener - status listener

MDACC
Biostatistics

Copyright © 2002 M.D. Anderson Cancer Center. All Rights Reserved.