Package ag.ion.bion.officelayer.internal.text.table

Examples of ag.ion.bion.officelayer.internal.text.table.TextTableCellReference


  }
  public void testTextTableFormulaModel2() {
    try {
      TextTableFormulaExpression textTableFormulaExpression = new TextTableFormulaExpression("<A1>+<b2>");
      TextTableCellReference[] references = new TextTableCellReference[3];
      TextTableCellReference reference1 = new TextTableCellReference("<D6>");
      TextTableCellReference reference2 = new TextTableCellReference("<E6>");
      TextTableCellReference reference3 = new TextTableCellReference("<F6>");
      references[0] = reference1;
      references[1] = reference2;
      references[2] = reference3;
      TextTableFormulaModel formulaModel = new TextTableFormulaModel(textTableFormulaExpression);
      TextTableCellReference cellReference = formulaModel.getCellReferences()[0];
      formulaModel.replaceCellReference(cellReference,references);
      references = formulaModel.getCellReferences();
      Assert.assertEquals(4, references.length);
      Assert.assertEquals("(<D6>+<E6>+<F6>)+<b2>", formulaModel.getExpression());
    }
View Full Code Here


* @author Andreas Br�ker
*/
public class TextTableCellReferenceTest extends TestCase {

  public void testIsRangeReference() {
    TextTableCellReference reference = new TextTableCellReference("<A4:B6>");
    Assert.assertEquals(true, reference.isRangeReference());
  }
View Full Code Here

    TextTableCellReference reference = new TextTableCellReference("<A4:B6>");
    Assert.assertEquals(true, reference.isRangeReference());
  }

  public void testGetTableName() {
    TextTableCellReference reference = new TextTableCellReference(
        "<Table1.A4.1:B6>");
    Assert.assertEquals("Table1", reference.getTableName());
  }
View Full Code Here

        "<Table1.A4.1:B6>");
    Assert.assertEquals("Table1", reference.getTableName());
  }

  public void testGetStartColumnIndex() {
    TextTableCellReference reference = new TextTableCellReference(
        "<Table1.A4.1:B6>");
    Assert.assertEquals(0, reference.getStartColumnIndex());
  }
View Full Code Here

        "<Table1.A4.1:B6>");
    Assert.assertEquals(0, reference.getStartColumnIndex());
  }

  public void testGetEndColumnIndex() {
    TextTableCellReference reference = new TextTableCellReference(
        "<Table1.A4.1:B6>");
    Assert.assertEquals(1, reference.getEndColumnIndex());
  }
View Full Code Here

        "<Table1.A4.1:B6>");
    Assert.assertEquals(1, reference.getEndColumnIndex());
  }

  public void testGetStartRowIndex() {
    TextTableCellReference reference = new TextTableCellReference(
        "<Table1.A4:B6>");
    Assert.assertEquals(3, reference.getStartRowIndex());
  }
View Full Code Here

        "<Table1.A4:B6>");
    Assert.assertEquals(3, reference.getStartRowIndex());
  }

  public void testGetEndRowIndex() {
    TextTableCellReference reference = new TextTableCellReference(
        "<Table1.A4:B6>");
    Assert.assertEquals(5, reference.getEndRowIndex());
  }
View Full Code Here

        "<Table1.A4:B6>");
    Assert.assertEquals(5, reference.getEndRowIndex());
  }

  public void testSetTableName() {
    TextTableCellReference reference = new TextTableCellReference("<A4:B6>");
    reference.setTableName("Table2");
    Assert.assertEquals("<Table2.A4:B6>", reference.toString());
  }
View Full Code Here

    Assert.assertEquals("<Table2.A4:B6>", reference.toString());
  }

  public void testMoveColumnIndex() {
    try {
      TextTableCellReference reference = new TextTableCellReference(
          "<A4:B6>");
      reference.moveColumnIndex(3);
      Assert.assertEquals("<D4:E6>", reference.toString());
    } catch (Exception exception) {
      Assert.fail(exception.getMessage());
    }
  }
View Full Code Here

    }
  }

  public void testMoveRowIndex() {
    try {
      TextTableCellReference reference = new TextTableCellReference(
          "<A4:B6>");
      reference.moveRowIndex(3);
      Assert.assertEquals("<A7:B9>", reference.toString());
    } catch (Exception exception) {
      Assert.fail(exception.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.internal.text.table.TextTableCellReference

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.