public class SimpleLocalTimeConstraint extends AbstractSimpleDateTimeConstraint<LocalTime>
LocalTime constraint.
The time format is HHmmss (24-hour clock system, ISO 8601)._beg, _end, _tzone_finishParseCst, _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 |
|---|
SimpleLocalTimeConstraint(int flags)
Constraints a constraint.
|
SimpleLocalTimeConstraint(int flags,
LocalTime begin,
LocalTime end,
String errmsg)
Constructs a constraint with beginning and ending date.
|
SimpleLocalTimeConstraint(int flags,
Pattern regex,
String errmsg)
Constructs a constraint combining regular expression.
|
SimpleLocalTimeConstraint(int flags,
String errmsg)
Constraints a constraint.
|
SimpleLocalTimeConstraint(Pattern regex,
String errmsg)
Constructs a regular-expression constraint.
|
SimpleLocalTimeConstraint(String constraint)
Constructs a constraint with a list of constraints separated by comma.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
fixConstraint() |
protected LocalTime |
parseFrom(String val) |
void |
validate(org.zkoss.zk.ui.Component comp,
Object value)
Verifies whether the value is acceptable.
|
protected String |
valueToString(org.zkoss.zk.ui.Component comp,
LocalTime value) |
getBeginDate, getEndDate, parseConstraint, setTimeZone, validate0getClientConstraint, getClientPackages, getErrorMessage, getFlags, getInstancepublic SimpleLocalTimeConstraint(int flags)
flags - a combination of SimpleConstraint.NO_POSITIVE, SimpleConstraint.NO_NEGATIVE,
SimpleConstraint.NO_ZERO, and so on.public SimpleLocalTimeConstraint(int flags,
String errmsg)
flags - a combination of SimpleConstraint.NO_POSITIVE, SimpleConstraint.NO_NEGATIVE,
SimpleConstraint.NO_ZERO, and so on.errmsg - the error message to display. Ignored if null or empty.public SimpleLocalTimeConstraint(Pattern regex, String errmsg)
regex - ignored if null or emptyerrmsg - the error message to display. Ignored if null or empty.public SimpleLocalTimeConstraint(int flags,
Pattern regex,
String errmsg)
flags - a combination of SimpleConstraint.NO_POSITIVE, SimpleConstraint.NO_NEGATIVE,
SimpleConstraint.NO_ZERO, and so on.regex - ignored if null or emptyerrmsg - the error message to display. Ignored if null or empty.public SimpleLocalTimeConstraint(int flags,
LocalTime begin,
LocalTime end,
String errmsg)
flags - a combination of SimpleConstraint.NO_POSITIVE, SimpleConstraint.NO_NEGATIVE,
SimpleConstraint.NO_ZERO, and so on.begin - the beginning date, or null if no constraint at the beginning
date.end - the ending date, or null if no constraint at the ending
date.errmsg - the error message to display. Ignored if null or empty.public SimpleLocalTimeConstraint(String constraint)
constraint - a list of constraints separated by comma.
Example: between 093000 and 183000, before 210000protected void fixConstraint()
fixConstraint in class AbstractSimpleDateTimeConstraint<LocalTime>public void validate(org.zkoss.zk.ui.Component comp,
Object value)
throws org.zkoss.zk.ui.WrongValueException
Constraintvalidate in interface Constraintvalidate in class AbstractSimpleDateTimeConstraint<LocalTime>comp - the component being validatedorg.zkoss.zk.ui.WrongValueExceptionprotected LocalTime parseFrom(String val) throws org.zkoss.zk.ui.UiException
parseFrom in class AbstractSimpleDateTimeConstraint<LocalTime>org.zkoss.zk.ui.UiExceptionprotected String valueToString(org.zkoss.zk.ui.Component comp, LocalTime value)
valueToString in class AbstractSimpleDateTimeConstraint<LocalTime>Copyright © 2023. All rights reserved.