Package org.zkoss.ztl

Examples of org.zkoss.ztl.JQuery$JQueryIerator


     */
    public String setCellFontColorByFastToolbarbutton(int lCol, int tRow, int rCol, int bRow, int nthColorPalette) {
      rightClickCells(lCol, tRow, rCol, bRow);
      click("$cellContext $fontCtrlPanel:visible $fontColorBtn");
     
        JQuery color = jq(".z-colorpalette:visible div.z-colorpalette-colorbox:nth-child(" + nthColorPalette + ")");
        String selectedColor = color.first().text();
      mouseOver(color);
      click(color);
      waitResponse();
      return selectedColor;
    }
View Full Code Here


   
    public String setCellBackgroundColorByFastToolbarbutton(int lCol, int tRow, int rCol, int bRow, int nthColorPalette) {
      rightClickCells(lCol, tRow, rCol, bRow);
      click("$cellContext $fontCtrlPanel:visible $cellColorBtn");
     
        JQuery color = jq(".z-colorpalette:visible div.z-colorpalette-colorbox:nth-child(" + nthColorPalette + ")");
        String selectedColor = color.first().text();
      mouseOver(color);
      click(color);
      waitResponse();
      return selectedColor;
    }
View Full Code Here

     * @param row - Base on 0
     * @return A JQuery object of cell. (Inner div)
     */
    public JQuery getSpecifiedCell(int col, int row) {
      if (isIE6() || isIE7()) {
        JQuery r = getRow(row);
        JQuery cell = r.children().eq(col);
        return cell.children().first();
      }
      return jq("div.zscell[z\\\\.c=\"" + col + "\"][z\\\\.r=\"" + row + "\"] div").first()
    }
View Full Code Here

     * @param col - Base on 0
     * @return A JQuery object of column header.
     */
    public JQuery getColumnHeader(int col) {
      if (isIE6() || isIE7()) {
        JQuery cols =  jq("div.zstopcell");
        return cols.eq(col);
      }
        return jq("div.zstopcell[z\\\\.c=\"" + col + "\"] div");
    }
View Full Code Here

     * @param row - Base on 0
     * @return A JQuery object of row header.
     */
    public JQuery getRowHeader(int row) {
      if (isIE6() || isIE7()) {
        JQuery rows = jq("div.zsleftcell");
        return rows.eq(row);
      }
       return jq("div.zsleftcell[z\\\\.r=\"" + row + "\"] div");
    }
View Full Code Here

       return jq("div.zsleftcell[z\\\\.r=\"" + row + "\"] div");
    }
   
    public String getCellText(int col, int row) {
      if (isFF3() || isIE()) {
        JQuery cell = getSpecifiedCell(col, row).children().children();
        Iterator<JQuery> i = cell.iterator();
        while (i.hasNext()) {
          JQuery j = i.next();
          if (!j.isVisible())
            continue;
          String str = j.text();
          if (str != null && str.length() > 0) {
            return str;
          }
        }
        return "";
View Full Code Here

      return getSpecifiedCell(col, row).text();
    }
   
    public String getCellText(JQuery cellLocator) {
      if (isFF3() || isIE()) {
        JQuery cell = cellLocator.children().children();
        Iterator<JQuery> i = cell.iterator();
        while (i.hasNext()) {
          JQuery j = i.next();
          if (!j.isVisible())
            continue;
          String str = j.text();
          if (str != null && str.length() > 0) {
            return str;
          }
        }
        return "";
View Full Code Here

     *
     * @param column: 0-based
     * @param row: 0-based
     */
    public JQuery rightClickCell(int column, int row){
      JQuery cell = getSpecifiedCell(column, row);
    mouseDownAt(cell,"4,4");
    mouseUpAt(cell,"4,4");
    waitResponse();
    mouseDownAt(cell,"4,4");
    mouseUpAt(cell,"4,4");
View Full Code Here

    /**
     * Click dropdown button at nth-menu
     * @param selector
     */
    public void clickDropdownButtonMenu(String buttonSelector, int nthIndex) {
      JQuery jq = jq(buttonSelector);
      mouseOver(jq);
      clickAt(jq, "30, 0");
      click(jq(".z-menu-popup:visible .z-menu-item:eq(" + nthIndex + ")"));
      waitResponse();
    }
View Full Code Here

     * Click dropdown button at menu
     * @param selector
     * @param string
     */
    public void clickDropdownButtonMenu(String buttonSelector, String menuLabel) {
      JQuery jq = jq(buttonSelector);
      mouseOver(jq);
      clickAt(jq, "30, 0");
      waitResponse();
      JQuery menus = jq(".z-menu-popup:visible .z-menu-item .z-menu-item-cnt");
      int size = menus.length();
      if (size == 0)
        throw new RuntimeException("menu item not found: " + menuLabel);
      for (int i = 0; i < size; i++) {
        JQuery menu = jq(".z-menu-popup:visible .z-menu-item .z-menu-item-cnt:eq(" + i + ")");
        if (menu.text().indexOf(menuLabel) >= 0) {
          click(menu.parent());
          return;
        }
      }
      throw new RuntimeException("menu item not found: " + menuLabel);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.ztl.JQuery$JQueryIerator

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.