Package org.zkoss.zk.ui

Examples of org.zkoss.zk.ui.UiException


        result.setData("type","hide");
      }else{
        if(highlight.getLeft()<0 || highlight.getTop() < 0
            || highlight.getRight()>=this.getMaxcolumns() || highlight.getBottom() >= this.getMaxrows()
            || highlight.getLeft()>highlight.getRight() || highlight.getTop()>highlight.getBottom()){
            throw new UiException("illegal highlight : "+highlight.toString());
        }
        _highlightRect = (Rect)highlight.clone();
        result.setData("type","show");
        result.setData("left",_highlightRect.getLeft());
        result.setData("top",_highlightRect.getTop());
View Full Code Here


   */
  public void setCellFocus(Position focus){
    if(_focusRect.getLeft()!= focus.getColumn() || _focusRect.getTop()!=focus.getRow()){
      if(focus.getColumn()<0 || focus.getRow() < 0
          || focus.getColumn()>=this.getMaxcolumns() || focus.getRow() >= this.getMaxrows()){
          throw new UiException("illegal position : "+focus.toString());
      }
      _focusRect.set(focus.getColumn(),focus.getRow(),focus.getColumn(),focus.getRow());
      JSONObj result = new JSONObj();
      result.setData("type","move");
      result.setData("row",focus.getRow());
View Full Code Here

   
  }
 
 
  private MergeMatrixHelper getMergeMatrixHelper(Sheet sheet){
    if(sheet != getSelectedSheet()) throw new UiException("not current selected sheet ");
    MergeMatrixHelper mmhelper = (MergeMatrixHelper)getAttribute(MERGE_MATRIX_KEY);
    int fzr = getRowfreeze();
    int fzc = getColumnfreeze();
    if(mmhelper==null){
      mmhelper = new MergeMatrixHelper(sheet.getMergeRanges(),fzr,fzc);
View Full Code Here

    }
    return mmhelper;
  }
 
  private HeaderPositionHelper getRowPositionHelper(Sheet sheet){
    if(sheet != getSelectedSheet()) throw new UiException("not current selected sheet ");
    HeaderPositionHelper helper = (HeaderPositionHelper)getAttribute(ROW_SIZE_HELPER_KEY);
   
    if(helper==null){
      int defaultSize = this.getRowheight();
      int rhs[][] = sheet.getRowHeights();
View Full Code Here

      }
    }
  }
 
  private HeaderPositionHelper getColumnPositionHelper(Sheet sheet){
    if(sheet != getSelectedSheet()) throw new UiException("not current selected sheet ");
    HeaderPositionHelper helper = (HeaderPositionHelper)getAttribute(COLUMN_SIZE_HELPER_KEY);
   
    if(helper==null){
      int defaultSize = this.getColumnwidth();
      int cws[][] = sheet.getColumnWidths();
View Full Code Here

          wl = (WidgetLoader)Classes.newInstance(clzs[i], null,null);
          wl.init(this);
          _widgetLoaders.add(wl);
        }
      } catch (Exception x) {
        throw new UiException(x);
      }
    }
    return _widgetLoaders;
  }
View Full Code Here

    if(handlerclz!=null){
      try {
        _widgetHandler = (WidgetHandler)Classes.newInstance(handlerclz, null,null);
        _widgetHandler.init(this);
      } catch (Exception x) {
        throw new UiException(x);
      }
    }else{
      _widgetHandler = new VoidWidgetHandler();
      _widgetHandler.init(this);
    }
View Full Code Here

    //not all child can insert into spreadsheet
    //a child want to insert to spreadsheet must provide some speaciall attribute
    if (newChild.getAttribute(SpreadsheetCtrl.CHILD_PASSING_KEY)!=null){
      return super.insertBefore(newChild, refChild);
    }else{
      throw new UiException("Unsupported child for Spreadsheet: "+newChild);
    }
  }
View Full Code Here

    String url = ((String[]) param.get("url"))[0];
    if (Strings.isBlank(url)) return;
   
    url = getFolderUrl(url);
    if (application.getResourcePaths(url) == null)
      throw new UiException("Folder not found: " + url);
   
    Map rootFolderMap = new TreeMap();
    Map map = new TreeMap();
    rootFolderMap.put(url, map);
   
View Full Code Here

  }
 
  //-- Component --//
  public void beforeParentChanged(Component parent) {
    if (parent != null && !(parent instanceof Rows))
      throw new UiException("Unsupported parent for row: "+parent);
    super.beforeParentChanged(parent);
  }
View Full Code Here

TOP

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

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.