Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.ui.preferences
Class ValidatorCobolIntegerInput

java.lang.Object
  extended by com.ibm.etools.iseries.edit.ui.preferences.ValidatorCobolIntegerInput

public class ValidatorCobolIntegerInput
extends Object

For editable numeric properties. Ensures only digits are entered.


Field Summary
static String copyright
           
protected  SystemMessage currentMessage
           
protected  SystemMessage emptyMsg
           
protected  SystemMessage invalidMsg
           
protected  int number
           
 
Constructor Summary
ValidatorCobolIntegerInput(SystemMessage emptyMsg, SystemMessage invalidMsg)
          Constructor to use when wanting to specify both error messages
 
Method Summary
 int getMaximumNameLength()
          Return the max length for this name, or -1 if no max
 int getNumber()
          If validation is true, you can call this to get the input as a number
 SystemMessage getSystemMessage()
          When isValid returns non-null, call this to get the SystemMessage object for the error versus the simple string message.
 String isValid(Object input)
           
 String isValid(String input)
           
 SystemMessage validate(String text)
          For convenience, this is a shortcut to calling:
 
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

number

protected int number

emptyMsg

protected SystemMessage emptyMsg

invalidMsg

protected SystemMessage invalidMsg

currentMessage

protected SystemMessage currentMessage
Constructor Detail

ValidatorCobolIntegerInput

public ValidatorCobolIntegerInput(SystemMessage emptyMsg,
                                  SystemMessage invalidMsg)
Constructor to use when wanting to specify both error messages

Method Detail

isValid

public String isValid(Object input)
See Also:
ICellEditorValidator

isValid

public String isValid(String input)
See Also:
IInputValidator, getSystemMessage()

getSystemMessage

public SystemMessage getSystemMessage()
When isValid returns non-null, call this to get the SystemMessage object for the error versus the simple string message.


getMaximumNameLength

public int getMaximumNameLength()
Return the max length for this name, or -1 if no max


validate

public SystemMessage validate(String text)
For convenience, this is a shortcut to calling:

  if (isValid(text) != null)
    msg = getSystemMessage();
 


getNumber

public int getNumber()
If validation is true, you can call this to get the input as a number


Rational Developer for Power Systems Software
V7.6

Copyright 2011 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.