|
org.eclipse.rse.ui.validators
Class ValidatorLongRangeInput
java.lang.Object
org.eclipse.rse.ui.validators.ValidatorLongInput
org.eclipse.rse.ui.validators.ValidatorLongRangeInput
-
All Implemented Interfaces:
-
IInputValidator,
ICellEditorValidator,
ISystemValidator
-
public class ValidatorLongRangeInput
- extends
ValidatorLongInput
For editable long numbers that must be within a certain range to be valid
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. |
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
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
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
-
-
Specified by:
-
isValid
in interface
IInputValidator
-
Overrides:
-
isValid
in class
ValidatorLongInput
-
-
See Also:
-
IInputValidator.isValid(java.lang.String) ,
ValidatorLongInput.getSystemMessage()
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|