Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.validators
Class ValidatorLongRangeInput

java.lang.Object
  extended bycom.ibm.etools.systems.core.ui.validators.ValidatorLongInput
      extended bycom.ibm.etools.systems.core.ui.validators.ValidatorLongRangeInput
All Implemented Interfaces:
ISystemValidator

public class ValidatorLongRangeInput
extends ValidatorLongInput

For editable long numbers that must be within a certain range to be valid


Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.systems.core.ui.validators.ValidatorLongInput
allowBlank, currentMessage, emptyMsg, invalidMsg, number
 
Fields inherited from interface com.ibm.etools.systems.core.ui.validators.ISystemValidator
Copyright
 
Constructor Summary
ValidatorLongRangeInput(long minRange, long maxRange)
          Constructor when an empty field is not allowed (will result in an error message)
ValidatorLongRangeInput(long minRange, long maxRange, boolean allowBlank)
          Constructor when an empty field is allowed.
 
Method Summary
 int getMaximumNameLength()
          Return the max length for this name, or -1 if no max.
 String isValid(String input)
          Intercept of parent to also add range checking
 void restoreRange()
          Restore the range originally specified in the constructor
 void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg, SystemMessage outOfRangeMsg)
          Set the error messages, overriding the defaults
 void setRange(long minRange, long maxRange)
          Reset the range
 
Methods inherited from class com.ibm.etools.systems.core.ui.validators.ValidatorLongInput
getNumber, getSystemMessage, isValid, setBlankAllowed, setErrorMessages, validate
 
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
Constructor Detail

ValidatorLongRangeInput

public ValidatorLongRangeInput(long minRange,
                               long maxRange)
Constructor when an empty field is not allowed (will result in an error message)

Parameters:
minRange - - the lowest valid number
maxRange - - the highest valid number

ValidatorLongRangeInput

public ValidatorLongRangeInput(long minRange,
                               long maxRange,
                               boolean allowBlank)
Constructor when an empty field is allowed.

Parameters:
minRange - - the lowest valid number
maxRange - - the highest valid number
allowBlank - - true if blanks allowed, false if not
Method Detail

setRange

public void setRange(long minRange,
                     long maxRange)
Reset the range


restoreRange

public void restoreRange()
Restore the range originally specified in the constructor


setErrorMessages

public void setErrorMessages(SystemMessage emptyMsg,
                             SystemMessage invalidMsg,
                             SystemMessage outOfRangeMsg)
Set the error messages, overriding the defaults


getMaximumNameLength

public int getMaximumNameLength()
Return the max length for this name, or -1 if no max. We return a max length that just allows the largest number in the range to be set, plus the sign if negative

Specified by:
getMaximumNameLength in interface ISystemValidator
Overrides:
getMaximumNameLength in class ValidatorLongInput

isValid

public String isValid(String input)
Intercept of parent to also add range checking

Overrides:
isValid in class ValidatorLongInput
See Also:
IInputValidator, ValidatorLongInput.getSystemMessage()

Remote Systems
v6.4.1

Copyright © 2005 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.