Package org.zkoss.zk.ui

Examples of org.zkoss.zk.ui.WrongValueException


  /** Sets the number of rows to span this header.
   * <p>It is the same as the rowspan attribute of HTML TD tag.
   */
  public void setRowspan(int rowspan) throws WrongValueException {
    if (rowspan <= 0)
      throw new WrongValueException("Positive only");
    if (_rowspan != rowspan) {
      _rowspan = rowspan;
      smartUpdate("rowspan", _rowspan);
    }
  }
View Full Code Here


      while (v != 0 && --divscale >= 0)
        v /= 10;
      return new Long(v);
    } catch (NumberFormatException ex) {
      throw showCustomError(
        new WrongValueException(this, MZul.NUMBER_REQUIRED, value));
    }
  }
View Full Code Here

  /** Sets the direction.
   * @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());
    }
View Full Code Here

  /** Sets the orient.
   * @param orient either "horizontal" or "vertical".
   */
  public void setOrient(String orient) throws WrongValueException {
    if (!HORIZONTAL.equals(orient) && !"vertical".equals(orient))
      throw new WrongValueException(orient);

    if (!Objects.equals(_auxinf != null ? _auxinf.orient: HORIZONTAL, orient)) {
      initAuxInfo().orient = orient;
      smartUpdate("orient", getOrient());
    }
View Full Code Here

   * @param type either "button", "submit" or "reset".
   * @since 5.0.4
   */
  public void setType(String type) throws WrongValueException {
    if (!BUTTON.equals(type) && !"submit".equals(type) && !"reset".equals(type))
      throw new WrongValueException(type);

    if (!Objects.equals(_auxinf != null ? _auxinf.type: BUTTON, type)) {
      initAuxInfo().type = type;
      smartUpdate("type", getType());
    }
View Full Code Here

  public int getPageSize() {
    return _pgsz;
  }
  public void setPageSize(int size) throws WrongValueException {
    if (size <= 0)
      throw new WrongValueException("positive only");

    if (_pgsz != size) {
      _pgsz = size;
      smartUpdate("pageSize", _pgsz);
      updatePageNum();
View Full Code Here

  public int getTotalSize() {
    return _ttsz;
  }
  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();
View Full Code Here

  public int getActivePage() {
    return _actpg;
  }
  public void setActivePage(int pg) throws WrongValueException {
    if (pg >= _npg || pg < 0)
      throw new WrongValueException("Unable to set active page to "+pg+" since only "+_npg+" pages");
    if (_actpg != pg) {
      _actpg = pg;
      smartUpdate("activePage", pg);
      Events.postEvent(new PagingEvent("onPagingImpl", this, _actpg));
        //onPagingImpl is used for implementation purpose only
View Full Code Here

  public int getPageIncrement() {
    return _pginc;
  }
  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);
    }
  }
View Full Code Here

    if (shape != null)
      if (shape.length() == 0) shape = null;
      else if (!"rect".equals(shape) && !"rectangle".equals(shape)
      && !"circle".equals(shape) && !"circ".equals(shape)
      && !"polygon".equals(shape) && !"poly".equals(shape))
        throw new WrongValueException("Unknown shape: "+shape);
    if (!Objects.equals(shape, _shape)) {
      _shape = shape;
      smartUpdate("shape", _shape);
    }
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.WrongValueException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.