|
RSE Release 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.rse.ui.validators.ValidatorLongInput
public class ValidatorLongInput
For editable large numeric properties. Ensures only digits are entered.
| Field Summary | |
|---|---|
protected boolean |
allowBlank
|
protected SystemMessage |
currentMessage
|
protected SystemMessage |
emptyMsg
|
protected SystemMessage |
invalidMsg
|
protected long |
number
|
| Constructor Summary | |
|---|---|
ValidatorLongInput()
Constructor to use when the default error messages are ok |
|
ValidatorLongInput(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 |
|
ValidatorLongInput(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. |
long |
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 long number
protected SystemMessage emptyMsg
protected SystemMessage invalidMsg
protected SystemMessage currentMessage
| Constructor Detail |
|---|
public ValidatorLongInput()
setBlankAllowed(boolean)public ValidatorLongInput(SystemMessage emptyMsg)
setBlankAllowed(boolean)
public ValidatorLongInput(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 ICellEditorValidatorICellEditorValidator.isValid(java.lang.Object)public String isValid(String input)
isValid in interface IInputValidatorIInputValidator.isValid(java.lang.String),
getSystemMessage()public SystemMessage getSystemMessage()
getSystemMessage in interface ISystemValidatorpublic int getMaximumNameLength()
getMaximumNameLength in interface ISystemValidatorpublic SystemMessage validate(String text)
if (isValid(text) != null)
msg = getSystemMessage();
validate in interface ISystemValidatorpublic long getNumber()
|
RSE Release 3.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||