|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.rse.ui.validators.ValidatorIntegerInput
public class ValidatorIntegerInput
For editable numeric properties. Ensures only digits are entered.
Field Summary | |
---|---|
protected boolean |
allowBlank
|
protected SystemMessage |
currentMessage
|
protected SystemMessage |
emptyMsg
|
protected SystemMessage |
invalidMsg
|
protected int |
number
|
Constructor Summary | |
---|---|
ValidatorIntegerInput()
Constructor to use when the default error messages are ok |
|
ValidatorIntegerInput(SystemMessage emptyMsg)
Constructor to use when wanting to specify the "value required" error message, but use the default for the "Value not valid" error message |
|
ValidatorIntegerInput(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)
|
void |
setBlankAllowed(boolean allowBlank)
Specify if an empty field is ok or not. |
void |
setErrorMessages(SystemMessage emptyMsg,
SystemMessage invalidMsg)
Set the error messages, overriding the defaults |
SystemMessage |
validate(String text)
For convenience, this is a shortcut to calling:
if (isValid(text) ! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean allowBlank
protected int number
protected SystemMessage emptyMsg
protected SystemMessage invalidMsg
protected SystemMessage currentMessage
Constructor Detail |
---|
public ValidatorIntegerInput()
setBlankAllowed(boolean)
public ValidatorIntegerInput(SystemMessage emptyMsg)
setBlankAllowed(boolean)
public ValidatorIntegerInput(SystemMessage emptyMsg, SystemMessage invalidMsg)
setBlankAllowed(boolean)
Method Detail |
---|
public void setBlankAllowed(boolean allowBlank)
public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
public String isValid(Object input)
isValid
in interface ICellEditorValidator
ICellEditorValidator.isValid(java.lang.Object)
public String isValid(String input)
isValid
in interface IInputValidator
IInputValidator.isValid(java.lang.String)
,
getSystemMessage()
public SystemMessage getSystemMessage()
getSystemMessage
in interface ISystemValidator
public int getMaximumNameLength()
getMaximumNameLength
in interface ISystemValidator
public SystemMessage validate(String text)
if (isValid(text) != null)
msg = getSystemMessage();
validate
in interface ISystemValidator
public int getNumber()
|
RSE Release 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |