Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.validators
Class ValidatorIntegerRangeInput


java.lang.Object
  extended by 

org.eclipse.rse.ui.validators.ValidatorIntegerInput
      extended by 
org.eclipse.rse.ui.validators.ValidatorIntegerRangeInput
All Implemented Interfaces:
IInputValidator, ICellEditorValidator, ISystemValidator

public class ValidatorIntegerRangeInput
extends ValidatorIntegerInput

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


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.validators. ValidatorIntegerInput
allowBlank, currentMessage, emptyMsg, invalidMsg, number
 
Constructor Summary
ValidatorIntegerRangeInput (int minRange, int maxRange)
          Constructor when an empty field is not allowed (will result in an error message)
ValidatorIntegerRangeInput (int minRange, int 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 (int minRange, int maxRange)
          Reset the range
 
Methods inherited from class org.eclipse.rse.ui.validators. ValidatorIntegerInput
getNumber, getSystemMessage, isValid, setBlankAllowed, setErrorMessages, validate
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorIntegerRangeInput

public ValidatorIntegerRangeInput(int minRange,
                                  int 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

ValidatorIntegerRangeInput

public ValidatorIntegerRangeInput(int minRange,
                                  int 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(int minRange,
                     int 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 ValidatorIntegerInput

isValid

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

Specified by:
isValid in interface IInputValidator
Overrides:
isValid in class ValidatorIntegerInput
See Also:
IInputValidator.isValid(java.lang.String), ValidatorIntegerInput.getSystemMessage()

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire