|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.validation.XBaseValidator
net.xoetrope.xui.validation.XMinMaxValidator
public class XMinMaxValidator
Performs a min/max check, reading the minimum and maximum values from the configuration file
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
| Field Summary | |
|---|---|
protected float |
max
|
protected float |
min
|
| Fields inherited from class net.xoetrope.xui.validation.XBaseValidator |
|---|
container, currentProject, errorLevel, formattedMessage, mandatory, mask, message, start, USE_FAIL_STYLE, USE_NORMAL_STYLE, USE_WARN_STYLE, validationMethod, validationName, value |
| Fields inherited from interface net.xoetrope.xui.validation.XValidator |
|---|
IGNORE_BLANKS, LEVEL_ERROR, LEVEL_IGNORE, LEVEL_WARNING, MANDATORY, STRICT_CHECK, WEAK_CHECK |
| Constructor Summary | |
|---|---|
XMinMaxValidator(XProject project)
Constructors the XMinMaxValidator |
|
| Method Summary | |
|---|---|
float |
getMax()
Retrieve the maximun value assigned to this validation |
float |
getMin()
Retrieve the minimum value assigned to this validation |
protected float |
getValue(java.lang.String in)
Used to get converted unit values when working with subclasses |
void |
setMax(float f)
Set the maximum value being validated against |
void |
setMin(float f)
Set the minimum value being validated against |
void |
setup(XmlElement element)
Set the validation parameters |
void |
validate(java.lang.Object c,
boolean forceMandatory)
Carries out the min-max validation on the fValue entered. |
| Methods inherited from class net.xoetrope.xui.validation.XBaseValidator |
|---|
applyErrorStyle, getLevel, getMask, getMessage, getName, getText, getValueAsString, invokeMethod, replaceToken, replaceTokens, setMask, setName, setValidationColors, setValidationMethod, throwException |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected float min
protected float max
| Constructor Detail |
|---|
public XMinMaxValidator(XProject project)
project - the owner project| Method Detail |
|---|
public void setup(XmlElement element)
setup in interface XValidatorsetup in class XBaseValidatorelement - the validator parameters
public void validate(java.lang.Object c,
boolean forceMandatory)
throws java.lang.Exception
forceMandatory - Indicates that its a page validation and not an inline validation so mandatory entries should be checkedc - The component triggering the validation
java.lang.Exception - Contains the details of the messageprotected float getValue(java.lang.String in)
in - the value being compared
public float getMin()
public float getMax()
public void setMin(float f)
f - The minimum value to be setpublic void setMax(float f)
f - The maximum value to be set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||