/** * @param constr a list of constraints separated by comma. * Example: "between 20071012 and 20071223", "before 20080103" */ // -- super --// public void setConstraint(String constr) { SimpleDateConstraint sc = null; if (constr != null) { sc = new SimpleDateConstraint(constr); sc.setTimeZone(this.getTimeZone()); } setConstraint(sc); // Bug 2564298 }
/** Sets the time zone that this date box belongs to, or null if * the default time zone is used. * <p>The default time zone is determined by {@link TimeZones#getCurrent}. * * <p>Notice that if {@link #getDisplayedTimeZones} was called with * a non-empty list, the time zone must be one of it. * Otherwise (including <code>tzone</tt> is null), * the first timezone is selected. */ public void setTimeZone(TimeZone tzone) { if (_tzone != tzone) { if (_dtzones != null) { _tzone = _dtzones.contains(tzone) ? tzone : _dtzones.get(0); } else { _tzone = tzone; } SimpleDateConstraint cst = ((SimpleDateConstraint) this.getConstraint()); if (cst != null) cst.setTimeZone(_tzone); smartUpdate("timeZone", _tzone.getID()); smartUpdate("_value", marshall(_value)); } }