Package org.zkoss.ztl

Examples of org.zkoss.ztl.JQuery


     * @param row - Base on 0
     * @return A JQuery object of row.
     */
    public JQuery getRow(int row) {
      if (isIE6() || isIE7()) {
        JQuery r = jq(".zsscroll .zsblock").children().eq(row);
        if (r.length() >= 1)
          return r;
      }
      return jq(".zsscroll div.zsrow[z\\\\.r=\"" + row + "\"]"); //IE7 does not work
    }
View Full Code Here


   
    /**
     *  Set cell plain text as input by the end user.
     */
    public void setCellEditText(int col, int row, String txt) {
      JQuery cell = getSpecifiedCell(col, row);
      clickCell(cell);
      typeKeys(cell, txt);
      keyPressEnter(jq(".zsedit"));
    }
View Full Code Here

    final int DOWN = 1;
    final int LEFT = 2;
    final int UP = 3;
    public void setRangeEditText(int col, int row, int orientation, String[] data) {
      //ensure focus
      JQuery cell = getSpecifiedCell(col, row);
      clickCell(cell);
     
      int topRow = row;
      int btmRow = row;
      int leftCol = col;
View Full Code Here

public class SS_091_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        // Select a cell
        JQuery cell_L_13 = getSpecifiedCell(11, 12);
        clickCell(cell_L_13);
        clickCell(cell_L_13);
        verifyEquals("L13", jq("$focusPosition .z-combobox-rounded-inp").val());
    }
View Full Code Here

      mouseOver(jq("$freezeCols"));
      waitResponse();
      click(jq("$freezeCol2"));
      waitResponse();
      // TODO: Verify correct row is frozen
      JQuery p = jq("div.zsleftblock");
      verifyTrue(p.width() != 0);
      JQuery r = p.children("div:nth-child(2)");
      int numOfCells = r.children().length();
      int width = r.width();
      verifyTrue("numOfCells=" + numOfCells + ", widht=" + width, r.width() != 0 && numOfCells == 2);
    }
View Full Code Here

public class SS_071_Test extends SSAbstractTestCase {

    @Override
    protected void executeTest() {
        // Select cell
        JQuery cell_L_13 = getSpecifiedCell(11, 12);
        clickCell(cell_L_13);
        clickCell(cell_L_13);
       
        // Click Border icon
        JQuery borderIcon = jq("$fastIconBtn $borderBtn:visible");
        mouseOver(borderIcon);
        waitResponse();
        clickAt(borderIcon, "30,0");
        waitResponse();
       
View Full Code Here

      mouseOver(jq("$freezeCols"));
      waitResponse();
      click(jq("$freezeCol3"));
      waitResponse();
      // TODO: Verify correct row is frozen
      JQuery p = jq("div.zsleftblock");
      verifyTrue(p.width() != 0);
      JQuery r = p.children("div:nth-child(3)");
      int numOfCells = r.children().length();
      int width = r.width();
      verifyTrue("numOfCells=" + numOfCells + ", widht=" + width, r.width() != 0 && numOfCells == 3);
    }
View Full Code Here

  /**
   *
   */
    @Override
    protected void executeTest() {
        JQuery cell_B_8 = getSpecifiedCell(1, 7);
        clickCell(cell_B_8);
        clickCell(cell_B_8);

      click(jq("$formatMenu"));
      waitResponse();
      mouseOver(jq("$font"));
      waitResponse();
      click(jq("$impactFont"));
      waitResponse();
      // TODO verify if cell is still selected
        String style = cell_B_8.css("font-family");
       
        if (style != null) {
            verifyTrue("Unexcepted result: " + style, "Impact".equalsIgnoreCase(style));
        } else {
            verifyTrue("Cannot get style of specified cell!", false);
View Full Code Here

    selectCells(10, 14, 10, 14);
    type(jq("$formulaEditor"), "=");
    waitResponse();

    selectCells(5, 14, 5, 14);
    JQuery f15 = getSpecifiedCell(5, 14);
    keyDown(jq("$formulaEditor"),ENTER);
    waitResponse();
    keyUp(jq("$formulaEditor"),ENTER);
    waitResponse();

    JQuery k15 = getSpecifiedCell(10, 14);
    String result = k15.text();
    verifyEquals(result, "125000");
  }
View Full Code Here

      mouseOver(jq("$freezeCols"));
      waitResponse();
      click(jq("$freezeCol9"));
      waitResponse();
      // TODO: Verify correct row is frozen
      JQuery p = jq("div.zsleftblock");
      verifyTrue(p.width() != 0);
      JQuery r = p.children("div:nth-child(9)");
      int numOfCells = r.children().length();
      int width = r.width();
      verifyTrue("numOfCells=" + numOfCells + ", widht=" + width, r.width() != 0 && numOfCells == 9);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.ztl.JQuery

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.