Package org.zkoss.zul

Class SimpleLocalTimeConstraint

    • Constructor Detail

      • SimpleLocalTimeConstraint

        public SimpleLocalTimeConstraint​(java.util.regex.Pattern regex,
                                         java.lang.String errmsg)
        Constructs a regular-expression constraint.
        Parameters:
        regex - ignored if null or empty
        errmsg - the error message to display. Ignored if null or empty.
      • SimpleLocalTimeConstraint

        public SimpleLocalTimeConstraint​(int flags,
                                         java.util.regex.Pattern regex,
                                         java.lang.String errmsg)
        Constructs a constraint combining regular expression.
        Parameters:
        flags - a combination of SimpleConstraint.NO_POSITIVE, SimpleConstraint.NO_NEGATIVE, SimpleConstraint.NO_ZERO, and so on.
        regex - ignored if null or empty
        errmsg - the error message to display. Ignored if null or empty.
      • SimpleLocalTimeConstraint

        public SimpleLocalTimeConstraint​(int flags,
                                         java.time.LocalTime begin,
                                         java.time.LocalTime end,
                                         java.lang.String errmsg)
        Constructs a constraint with beginning and ending date.
        Parameters:
        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.
      • SimpleLocalTimeConstraint

        public SimpleLocalTimeConstraint​(java.lang.String constraint)
        Constructs a constraint with a list of constraints separated by comma.
        Parameters:
        constraint - a list of constraints separated by comma. Example: between 093000 and 183000, before 210000
    • Method Detail

      • validate

        public void validate​(org.zkoss.zk.ui.Component comp,
                             java.lang.Object value)
                      throws org.zkoss.zk.ui.WrongValueException
        Description copied from interface: Constraint
        Verifies whether the value is acceptable.
        Specified by:
        validate in interface Constraint
        Overrides:
        validate in class AbstractSimpleDateTimeConstraint<java.time.LocalTime>
        Parameters:
        comp - the component being validated
        Throws:
        org.zkoss.zk.ui.WrongValueException
      • parseFrom

        protected java.time.LocalTime parseFrom​(java.lang.String val)
                                         throws org.zkoss.zk.ui.UiException
        Specified by:
        parseFrom in class AbstractSimpleDateTimeConstraint<java.time.LocalTime>
        Throws:
        org.zkoss.zk.ui.UiException