Package ag.ion.bion.officelayer.clone

Examples of ag.ion.bion.officelayer.clone.DestinationPosition


    ITextTable[] textTables = textTable.getTextTableManagement().getTextTables();
    ITextTable table = (ITextTable)textTables[0].getCloneService().cloneToPosition(position,adoptContent,propertyKeysContainer).getClonedObject();
    ETextTable eTextTable = new ETextTable(textDocument,table);
   
    for(int i = 1; i < textTables.length; i++) {
      IDestinationPosition destinationPosition = new DestinationPosition(table);
      table = (ITextTable)textTables[i].getCloneService().cloneToPosition(destinationPosition,propertyKeysContainer);
      try {
        eTextTable.addTable(table);
      }
      catch(TextException textException) {
View Full Code Here


      ITextTableCellRange[] range = new ITextTableCellRange[textTableCellRanges.length];
      range[0] = (ITextTableCellRange)textTableCellRanges[0].getCloneService().cloneToPosition(position,adoptContent,propertyKeysContainer).getClonedObject();
      ITextTable table = range[0].getCell(0,0).getTextTable();
      ETextTable eTextTable = new ETextTable(textDocument,table);
      for(int i = 1; i < textTableCellRanges.length; i++) {
        IDestinationPosition destinationPosition = new DestinationPosition(table);
        range[i] = (ITextTableCellRange)textTableCellRanges[i].getCloneService().cloneToPosition(destinationPosition,propertyKeysContainer).getClonedObject();
        table = range[i].getCell(0,0).getTextTable();
        eTextTable.addTable(table);
      }
      if(generateReturnValue) {
View Full Code Here

          ITextTable textTable = textDocument.getTextTableService().constructTextTable(1,columnCount);
          ITextTableProperties properties = textTable.getProperties();
          properties.setRepeatHeadline(tablePropertyStore.repeatHeadline());
          textDocument.getTextService().getTextContentService().insertTextContentAfter(textTable,textTableLast);
          properties.setTableColumnSeparators(tablePropertyStore.getTableColumnSeparators());
          IDestinationPosition destinationPosition = new DestinationPosition(textTable.getCell("A1"));
          if(tablePropertyStore.repeatHeadline()) {
            textTableCellRangeHeaderClone.getCloneService().cloneToPositionNoReturn(destinationPosition,null);
            destinationPosition = new DestinationPosition(textTable.getCell("A2"));
            textTableCellRangeClone.getCloneService().cloneToPositionNoReturn(destinationPosition,false,null);
          }
          else {
            textTableCellRangeClone.getCloneService().cloneToPositionNoReturn(destinationPosition,false,null);
          }
View Full Code Here

      textTableManagement.getFirstTextTable().addRow(index,count);
      return;
    }
    IETextTableCellRange textTableCellRange = getCellRange(0,index,columnCount-1,getRowCount()-1);
    ITextTable textTable = textTableManagement.getLastTextTable();
    IDestinationPosition destinationPosition = new DestinationPosition(textTable);
   
    try {
      ETextTableCellRange tableCellRange = (ETextTableCellRange)textTableCellRange.getCloneService().cloneToPosition(destinationPosition,null).getClonedObject();
      ITextTableCellRange[] textTableCellRanges = tableCellRange.getRanges();
      int tableNumber = getTableNumber(index);
      ITextTable table = textTableManagement.getTextTable(tableNumber);
     
      int rowCount = table.getRowCount()-1;
      int rowIndex = getRowIndexInTable(tableNumber,index);
     
      removeTables(tableNumber+1,textTableManagement.getTextTables().length-tableNumber-1);
     
      ITextTableCellRange textTableCellRangeClone = table.getCellRange(0,rowIndex,columnCount-1,rowIndex);
     
      int help = rowIndex + count - (rowCount+1);
      if(help < 0) {
        for(int i = rowIndex; i <= count; i++) {
          ITextTableCellRange cellRange = table.getCellRange(0,i,columnCount-1,i);
          destinationPosition = new DestinationPosition(cellRange);
          textTableCellRangeClone.getCloneService().cloneToPosition(destinationPosition,null);
        }
        IETextTableCellRange cellRange = getCellRange(0,index,columnCount-1,index+count-1);
        clearTableRange(cellRange);
        table.removeRows(rowIndex+count,rowCount-(rowIndex+count)+1);
      }
      else {
        for(int i = rowIndex; i <= rowCount; i++) {
          ITextTableCellRange cellRange = table.getCellRange(0,i,columnCount-1,i);
          destinationPosition = new DestinationPosition(cellRange);
          textTableCellRangeClone.getCloneService().cloneToPosition(destinationPosition,null);
        }
        IETextTableCellRange cellRange = getCellRange(0,index,columnCount-1,index + (rowCount-rowIndex));
        clearTableRange(cellRange);
        addRowsProperty(help,textTableCellRangeClone);
View Full Code Here

   *
   * @author Miriam Sutter
   */
  private void cloneRange(ITextTable textTable, ITextTableCellRange textTableCellRange, int count, boolean adoptContent) throws CloneException, TextException {
    ITextTableCell textTableCell = textTable.getCell(0,count);
    IDestinationPosition position = new DestinationPosition(textTableCell);
    textTableCellRange.getCloneService().cloneToPosition(position,adoptContent,null);
  }
View Full Code Here

              .repeatHeadline());
          textDocument.getTextService().getTextContentService()
              .insertTextContentAfter(textTable, textTableLast);
          properties.setTableColumnSeparators(tablePropertyStore
              .getTableColumnSeparators());
          IDestinationPosition destinationPosition = new DestinationPosition(
              textTable.getCell("A1"));
          if (tablePropertyStore.repeatHeadline()) {
            textTableCellRangeHeaderClone.getCloneService()
                .cloneToPositionNoReturn(destinationPosition,
                    null);
            destinationPosition = new DestinationPosition(textTable
                .getCell("A2"));
            textTableCellRangeClone.getCloneService()
                .cloneToPositionNoReturn(destinationPosition,
                    false, null);
          } else {
View Full Code Here

      return;
    }
    IETextTableCellRange textTableCellRange = getCellRange(0, index,
        columnCount - 1, getRowCount() - 1);
    ITextTable textTable = textTableManagement.getLastTextTable();
    IDestinationPosition destinationPosition = new DestinationPosition(
        textTable);

    try {
      ETextTableCellRange tableCellRange = (ETextTableCellRange) textTableCellRange
          .getCloneService().cloneToPosition(destinationPosition,
              null).getClonedObject();
      ITextTableCellRange[] textTableCellRanges = tableCellRange
          .getRanges();
      int tableNumber = getTableNumber(index);
      ITextTable table = textTableManagement.getTextTable(tableNumber);

      int rowCount = table.getRowCount() - 1;
      int rowIndex = getRowIndexInTable(tableNumber, index);

      removeTables(tableNumber + 1,
          textTableManagement.getTextTables().length - tableNumber
              - 1);

      ITextTableCellRange textTableCellRangeClone = table.getCellRange(0,
          rowIndex, columnCount - 1, rowIndex);

      int help = rowIndex + count - (rowCount + 1);
      if (help < 0) {
        for (int i = rowIndex; i <= count; i++) {
          ITextTableCellRange cellRange = table.getCellRange(0, i,
              columnCount - 1, i);
          destinationPosition = new DestinationPosition(cellRange);
          textTableCellRangeClone.getCloneService().cloneToPosition(
              destinationPosition, null);
        }
        IETextTableCellRange cellRange = getCellRange(0, index,
            columnCount - 1, index + count - 1);
        clearTableRange(cellRange);
        table.removeRows(rowIndex + count, rowCount
            - (rowIndex + count) + 1);
      } else {
        for (int i = rowIndex; i <= rowCount; i++) {
          ITextTableCellRange cellRange = table.getCellRange(0, i,
              columnCount - 1, i);
          destinationPosition = new DestinationPosition(cellRange);
          textTableCellRangeClone.getCloneService().cloneToPosition(
              destinationPosition, null);
        }
        IETextTableCellRange cellRange = getCellRange(0, index,
            columnCount - 1, index + (rowCount - rowIndex));
View Full Code Here

   */
  private void cloneRange(ITextTable textTable,
      ITextTableCellRange textTableCellRange, int count,
      boolean adoptContent) throws CloneException, TextException {
    ITextTableCell textTableCell = textTable.getCell(0, count);
    IDestinationPosition position = new DestinationPosition(textTableCell);
    textTableCellRange.getCloneService().cloneToPosition(position,
        adoptContent, null);
  }
View Full Code Here

        .cloneToPosition(position, adoptContent, propertyKeysContainer)
        .getClonedObject();
    ETextTable eTextTable = new ETextTable(textDocument, table);

    for (int i = 1; i < textTables.length; i++) {
      IDestinationPosition destinationPosition = new DestinationPosition(
          table);
      table = (ITextTable) textTables[i]
          .getCloneService()
          .cloneToPosition(destinationPosition, propertyKeysContainer);
      try {
View Full Code Here

          .getCloneService().cloneToPosition(position, adoptContent,
              propertyKeysContainer).getClonedObject();
      ITextTable table = range[0].getCell(0, 0).getTextTable();
      ETextTable eTextTable = new ETextTable(textDocument, table);
      for (int i = 1; i < textTableCellRanges.length; i++) {
        IDestinationPosition destinationPosition = new DestinationPosition(
            table);
        range[i] = (ITextTableCellRange) textTableCellRanges[i]
            .getCloneService().cloneToPosition(destinationPosition,
                propertyKeysContainer).getClonedObject();
        table = range[i].getCell(0, 0).getTextTable();
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.clone.DestinationPosition

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.