Package org.zkoss.zss.model.impl

Examples of org.zkoss.zss.model.impl.BookImpl


  }
  public void removePrecedent(Reference ref) {
    // do nothing.
  }
  public void update() {
    final BookImpl book = (BookImpl) getSheet().getBook();
    book.fireSSDataEvent(this, SSDataEvent.CONTENTS_CHANGE, 0);
  }
View Full Code Here


    super(name);
  }

  protected void setUp() throws Exception {
    super.setUp();
    _book = new BookImpl("Mybook");
    _sheet = new SheetImpl(_book, "Sheet1", 256, 64*1024);
  }
 
View Full Code Here

    assertTokenEquals((Token) tokens.get(j++), "function", "start", "SUM");
    assertTokenEquals((Token) tokens.get(j++), "operand", "range", "A");
    assertTokenEquals((Token) tokens.get(j++), "function", "stop", "");

   
    Token root = parser.parse(tokens, null, new BookImpl("Mybook"));
    assertTokenEquals((Token) root, "function", "start", "SUM");
    assertTokenEquals((Token) root.getOperands().get(0), "operand", "var", "A");
  }
View Full Code Here

    assertTokenEquals((Token) tokens.get(j++), "operand", "range", "a");
    assertTokenEquals((Token) tokens.get(j++), "operator-infix", "math", "+");
    assertTokenEquals((Token) tokens.get(j++), "operand", "range", "b");
    assertTokenEquals((Token) tokens.get(j++), "operator-postfix","", "%");
    assertTokenEquals((Token) tokens.get(j++), "subexpression", "stop", "");
    Token root = parser.parse(tokens, null, new BookImpl("Mybook"));

    assertTokenEquals(root, "operator-infix", "math", "+");
    assertTokenEquals((Token)root.getOperands().get(0), "operand", "var", "a");
    assertTokenEquals((Token)root.getOperands().get(1), "operator-postfix","", "%");
  }
View Full Code Here

    List tokens = parser.parseFormulaTokens(expr);
   
    assertNotNull(tokens);
    assertEquals(23, tokens.size());

    Token root = parser.parse(tokens, null, new BookImpl("Mybook"));

    assertTokenEquals(root, "function", "start", "SUM");
  }
View Full Code Here

  throws XelException {
    if (_type == TokenType.OPERAND && _subtype == TokenSubtype.VAR) { //refer to a variable
      final VariableResolver resolver = ctx.getVariableResolver();
      final Reference ref =
        (Reference) resolver.resolveVariable("zkoss.ss.Ref");
      final BookImpl book = (BookImpl) ref.getSheet().getBook();
      book.removeVariable((String)_value, ref);
    }
   
    //scan thru kid tokens
    if (_operands != null) {
      for (final Iterator it = _operands.iterator(); it.hasNext(); ) {
View Full Code Here

    super(name);
  }

  protected void setUp() throws Exception {
    super.setUp();
    final Book book = new BookImpl("Mybook");
    _sheet = new SheetImpl(book, "Sheet1", 256, 64*1024);
  }
 
View Full Code Here

  public void evalRef(Reference ref) {
    evalDependent(ref, new HashSet(), true);
  }
  public Collection getIntersectRefs(Sheet sheet, int row, int col) {
    final Collection lst = new HashSet();
    final BookImpl book = (BookImpl) sheet.getBook();
    ((SheetImpl)sheet).getMatrix().getIntersectRefs(row, col, -1, lst); //2d ranges
    return book.getMatrix().getIntersectRefs(row, col, book.getSheetIndex(sheet), lst); //3d ranges
  }
View Full Code Here

  /* (non-Javadoc)
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception {
    super.setUp();
    final Book book = new BookImpl("Mybook");
    _sheet = new SheetImpl(book, "Sheet1", 256, 64*1024);
    _im = ((SheetImpl)_sheet).getMatrix();
   
    _ref1 = (Ref2d)_im.addRef(_sheet, null, 1, 2, 2, 4); //B3:C5
    _ref2 = (Ref2d)_im.addRef(_sheet, null, 3, 7, 4, 10); //D8:E11
View Full Code Here

  /* (non-Javadoc)
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() throws Exception {
    super.setUp();
    _book = new BookImpl("Mybook");
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.model.impl.BookImpl

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.