public void setTag(String tagname) throws WrongValueException { if (tagname == null || tagname.length() == 0) throw new WrongValueException("A tag name is required"); _tagnm = tagname; } }
/** Sets the rows. * <p>Note: if both {@link #setHeight} is specified with non-empty, * {@link #setRows} is ignored */ public void setRows(int rows) throws WrongValueException { if (rows < 0) throw new WrongValueException("Illegal rows: " + rows); if (_rows != rows) { _rows = rows; smartUpdate("rows", _rows); } }
/** * Sets the start position of the scrollbar. * <p> Default: 0 * @param start the column number */ public void setStart(int start) { if (start < 0) throw new WrongValueException("Positive only"); if (_start != start) { _start = start; smartUpdate("start", _start); } }
/** * Sets the number of columns to freeze.(from left to right) * @param columns positive only */ public void setColumns(int columns) { if (columns < 0) throw new WrongValueException("Positive only"); if (_columns != columns) { _columns = columns; smartUpdate("columns", _columns); } }
/** Sets the cols. */ public void setCols(int cols) throws WrongValueException { if (cols <= 0) throw new WrongValueException("Illegal cols: " + cols); if (_cols != cols) { _cols = cols; smartUpdate("cols", _cols); } }
/** Sets the number of columns. */ public void setColumns(int columns) throws WrongValueException { if (columns <= 0) throw new WrongValueException("Positive only"); if (_columns != columns) { _columns = columns; invalidate(); } }
/** Sets the item height of {@link Fisheye}. */ public void setItemHeight(int itemhgh) throws WrongValueException { if (itemhgh <= 0) throw new WrongValueException("Positive is required: "+itemhgh); if (_itemhgh != itemhgh) { _itemhgh = itemhgh; smartUpdate("z.itemheight", itemhgh); } }
/** * Sets the number of page list icon when mold is "os" */ public void setPageIncrement(int pginc) throws WrongValueException { if (pginc <= 0) throw new WrongValueException("Nonpositive is not allowed: " + pginc); if (_pginc != pginc) { _pginc = pginc; smartUpdate("pageIncrement", pginc); } }
/** Sets the number of columns to span this header. * <p>It is the same as the colspan attribute of HTML TD tag. */ public void setColspan(int colspan) throws WrongValueException { if (colspan <= 0) throw new WrongValueException("Positive only"); if (_colspan != colspan) { _colspan = colspan; smartUpdate("colspan", _colspan); } }
/** Sets the orient. * <p>Default : "horizontal" * @param orient either "horizontal" or "vertical". * @since 3.5.0 */ public void setOrient(String orient) throws WrongValueException { if (!"horizontal".equals(orient) && !"vertical".equals(orient)) throw new WrongValueException("orient cannot be " + orient); if (!Objects.equals(orient, _orient)) { _orient = orient; smartUpdate("orient", _orient); } }
/** Sets the seltype. * "single","multiple" is supported. */ public void setSeltype(String seltype) throws WrongValueException { if ("single".equals(seltype)) setMultiple(false); else if ("multiple".equals(seltype)) setMultiple(true); else throw new WrongValueException("Unknown seltype: " + seltype); }
/** Sets the orientation of {@link Fisheye}. */ public void setOrient(String orient) throws WrongValueException { if (!"horizontal".equals(orient) && !"vertical".equals(orient)) throw new WrongValueException(orient); if (!Objects.equals(_orient, orient)) { _orient = orient; smartUpdate("z.orient", orient); } } /** Returns the attach edge.
/** * Sets the orientation of {@link Timeline}. */ public void setOrient(String orient) throws WrongValueException { if (!"horizontal".equals(orient) && !"vertical".equals(orient)) throw new WrongValueException(orient); if (!Objects.equals(_orient, orient)) { _orient = orient; smartUpdate("orient", orient); } }
/**Sets total size of items * */ public void setTotalSize(int size) throws WrongValueException { if (size < 0) throw new WrongValueException("non-negative only"); if (_ttsz != size) { _ttsz = size; smartUpdate("totalSize", _ttsz); updatePageNum(); } }
protected Object getTargetValue() throws WrongValueException { Object val = super.getTargetValue(); // ZK-1949, we need to accept the null value when invoking getValue() if (val == null) return null; if (val instanceof Double) { return val; } throw showCustomError(new WrongValueException(this, MZul.NUMBER_REQUIRED, val)); }
/** Sets the direction to layout with image. * @param dir either "normal" or "reverse". */ public void setDir(String dir) throws WrongValueException { if (!"normal".equals(dir) && !"reverse".equals(dir)) throw new WrongValueException(dir); if (!Objects.equals(_auxinf != null ? _auxinf.dir : "normal", dir)) { initAuxInfo().dir = dir; smartUpdate("dir", getDir()); } }
private WrongValueException outOfRangeValue(Component comp) { final String errmsg = getErrorMessage(comp); if (errmsg != null) return new WrongValueException(comp, errmsg); final String s = _beg != null ? _end != null ? dateToString(comp, _beg, _tzone) + " ~ " + dateToString(comp, _end, _tzone) : ">= " + dateToString(comp, _beg, _tzone) : "<= " + dateToString(comp, _end, _tzone); return new WrongValueException(comp, MZul.OUT_OF_RANGE, s); }
/** Sets the direction to layout image. * @param dir either "normal" or "reverse". */ public void setDir(String dir) throws WrongValueException { if (!NORMAL.equals(dir) && !"reverse".equals(dir)) throw new WrongValueException(dir); if (!Objects.equals(_auxinf != null ? _auxinf.dir : NORMAL, dir)) { initAuxInfo().dir = dir; smartUpdate("dir", getDir()); } }
/** * Sets the text value to be shown as the distortion captcha. * @param text the captcha text value */ public void setValue(String text) throws WrongValueException { if (Strings.isBlank(text)) throw new WrongValueException("empty not allowed"); if (!Objects.equals(text, _value)) { _value = text; smartDrawCaptcha(); } }
/** Sets the rows. */ public void setRows(int rows) throws WrongValueException { if (rows <= 0) throw new WrongValueException("Illegal rows: " + rows); if ((_auxinf != null ? _auxinf.rows : 1) != rows) { initAuxInfo().rows = rows; if (rows > 1) setMultiline(true); //auto-enable smartUpdate("rows", getRows()); } }