net.sf.jxls.controller
Class SheetTransformationControllerImpl

java.lang.Object
  extended by net.sf.jxls.controller.SheetTransformationControllerImpl
All Implemented Interfaces:
SheetTransformationController

public class SheetTransformationControllerImpl
extends java.lang.Object
implements SheetTransformationController

This class controls and saves all transforming operations on spreadsheet cells. It implements SheetTransformationController interface to track all cells transformations

Author:
Leonid Vysochyn

Constructor Summary
SheetTransformationControllerImpl(Sheet sheet)
           
 
Method Summary
 int duplicateDown(Block block, int n)
          This method duplicates given block down
 int duplicateRight(Block block, int n)
          This method duplicates given block to the right
 void duplicateRow(RowCollection rowCollection)
          Duplicates given row cells according to passed RowCollection object
 Sheet getSheet()
           
 java.util.List getTransformations()
           
 void removeBodyRows(Block block)
          Deletes the body of the block
 void removeBorders(Block block)
          This method removes borders around given block shifting all other rows
 void removeLeftRightBorders(Block block)
          This method removes left and right borders for the block
 void removeRowCells(org.apache.poi.ss.usermodel.Row row, int startCellNum, int endCellNum)
          Clears row cells in a given range
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SheetTransformationControllerImpl

public SheetTransformationControllerImpl(Sheet sheet)
Method Detail

duplicateDown

public int duplicateDown(Block block,
                         int n)
Description copied from interface: SheetTransformationController
This method duplicates given block down

Specified by:
duplicateDown in interface SheetTransformationController
Parameters:
block - - Block to process
n - - number of times to duplicate given block
Returns:
shift number based on number of affected rows

duplicateRight

public int duplicateRight(Block block,
                          int n)
Description copied from interface: SheetTransformationController
This method duplicates given block to the right

Specified by:
duplicateRight in interface SheetTransformationController
Parameters:
block - - Block to process
n - - number of times to duplicate given block
Returns:
shift number based on number of affected rows

removeBorders

public void removeBorders(Block block)
Description copied from interface: SheetTransformationController
This method removes borders around given block shifting all other rows

Specified by:
removeBorders in interface SheetTransformationController
Parameters:
block - - Block to process

removeLeftRightBorders

public void removeLeftRightBorders(Block block)
Description copied from interface: SheetTransformationController
This method removes left and right borders for the block

Specified by:
removeLeftRightBorders in interface SheetTransformationController
Parameters:
block - - Block to process

removeRowCells

public void removeRowCells(org.apache.poi.ss.usermodel.Row row,
                           int startCellNum,
                           int endCellNum)
Description copied from interface: SheetTransformationController
Clears row cells in a given range

Specified by:
removeRowCells in interface SheetTransformationController
Parameters:
row - Row to process
startCellNum - - start cell number to clear
endCellNum - - end cell number to clear

removeBodyRows

public void removeBodyRows(Block block)
Description copied from interface: SheetTransformationController
Deletes the body of the block

Specified by:
removeBodyRows in interface SheetTransformationController
Parameters:
block - Block to process

duplicateRow

public void duplicateRow(RowCollection rowCollection)
Description copied from interface: SheetTransformationController
Duplicates given row cells according to passed RowCollection object

Specified by:
duplicateRow in interface SheetTransformationController
Parameters:
rowCollection - - RowCollection object defining duplicate numbers and cell ranges

getTransformations

public java.util.List getTransformations()
Specified by:
getTransformations in interface SheetTransformationController
Returns:
list of all transformation applied by this controller

getSheet

public Sheet getSheet()
Specified by:
getSheet in interface SheetTransformationController
Returns:
Sheet corresponding worksheet object


Copyright © 2005-2013 jXLS Team. All Rights Reserved.