public class SimpleDoubleSpinnerConstraint extends SimpleConstraint
_flags, AFTER_END, AFTER_POINTER, AFTER_START, AT_POINTER, BEFORE_END, BEFORE_START, END_AFTER, END_BEFORE, NO_EMPTY, NO_FUTURE, NO_NEGATIVE, NO_PAST, NO_POSITIVE, NO_TODAY, NO_ZERO, OVERLAP, OVERLAP_AFTER, OVERLAP_BEFORE, OVERLAP_END, SERVER, START_AFTER, START_BEFORE, STRICT| Constructor and Description |
|---|
SimpleDoubleSpinnerConstraint()
Constraints a constraint.
|
SimpleDoubleSpinnerConstraint(int flags)
Constraints a constraint.
|
SimpleDoubleSpinnerConstraint(String constraint)
Constructs a constraint with a list of constraints separated by comma.
|
| Modifier and Type | Method and Description |
|---|---|
Double |
getMax()
Returns the maximum value.
|
Double |
getMin()
Returns the minimum value.
|
protected int |
parseConstraint(String constraint)
Parses a constraint into an integer value.
|
void |
setMax(Double max)
Set the maximum value.
|
void |
setMin(Double min)
Set the minimum value.
|
void |
validate(org.zkoss.zk.ui.Component comp,
Object value)
Verifies whether the value is acceptable.
|
getClientConstraint, getClientPackages, getErrorMessage, getFlags, getInstancepublic SimpleDoubleSpinnerConstraint()
public SimpleDoubleSpinnerConstraint(int flags)
flags - a combination of SimpleConstraint.NO_POSITIVE, SimpleConstraint.NO_NEGATIVE,
SimpleConstraint.NO_ZERO, and so on.public SimpleDoubleSpinnerConstraint(String constraint)
constraint - a list of constraints separated by comma.
Example: no positive, no zeropublic Double getMin()
public void setMin(Double min)
public Double getMax()
public void setMax(Double max)
protected int parseConstraint(String constraint) throws org.zkoss.zk.ui.UiException
SimpleConstraintSimpleConstraint.NO_POSITIVE.
Deriving classes might override this to provide more constraints.
parseConstraint in class SimpleConstraintorg.zkoss.zk.ui.UiExceptionpublic void validate(org.zkoss.zk.ui.Component comp,
Object value)
throws org.zkoss.zk.ui.WrongValueException
Constraintvalidate in interface Constraintvalidate in class SimpleConstraintcomp - the component being validatedorg.zkoss.zk.ui.WrongValueExceptionCopyright © 2015. All rights reserved.