Package org.jxls.command
Interface Command
- All Known Implementing Classes:
AbstractCommand,AreaCommand,EachCommand,GridCommand,IfCommand,UpdateCellCommand
public interface Command
A command interface defines a transformation of a list of areas at a specified cell
- Author:
- Leonid Vysochyn
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionAdds an area to this commandApplies a command at the given cell referenceWhether the command area is locked Other commands will no longer execute in this area after lockinggetName()Returns the cell shifting mode defining theCellShiftStrategyto use for the command Possible values are "inner" defining theInnerCellShiftStrategyto use "adjacent" defining theAdjacentCellShiftStrategyto use null value means the default strategy will be used (InnerCellShiftStrategy)voidreset()Resets command data for repeatable command usagevoidsetLockRange(String isLock) Other commands will no longer execute in this area after lockingvoidsetShiftMode(String mode) Defines theCellShiftStrategyto use when shifting the cells for the command while transforming an area The mode value "inner" sets theInnerCellShiftStrategy(default) The mode value "adjacent" sets theAdjacentCellShiftStrategy
-
Field Details
-
INNER_SHIFT_MODE
- See Also:
-
ADJACENT_SHIFT_MODE
- See Also:
-
-
Method Details
-
getName
String getName()- Returns:
- command name
-
getAreaList
- Returns:
- a list of areas for this command
-
addArea
Adds an area to this command- Parameters:
area- to be added area- Returns:
- this command instance
-
applyAt
Applies a command at the given cell reference- Parameters:
cellRef- cell reference where the command must be appliedcontext- bean context to use- Returns:
- size of enclosing command area after transformation
-
reset
void reset()Resets command data for repeatable command usage -
setShiftMode
Defines theCellShiftStrategyto use when shifting the cells for the command while transforming an area The mode value "inner" sets theInnerCellShiftStrategy(default) The mode value "adjacent" sets theAdjacentCellShiftStrategy- Parameters:
mode- cell shifting mode with possible values "inner" or "adjacent"
-
getShiftMode
String getShiftMode()Returns the cell shifting mode defining theCellShiftStrategyto use for the command Possible values are "inner" defining theInnerCellShiftStrategyto use "adjacent" defining theAdjacentCellShiftStrategyto use null value means the default strategy will be used (InnerCellShiftStrategy)- Returns:
- cell shifting mode ("inner" or "adjacent")
-
setLockRange
Other commands will no longer execute in this area after locking- Parameters:
isLock- Whether the command area is locked, value should be "true","false",null
-
getLockRange
Boolean getLockRange()Whether the command area is locked Other commands will no longer execute in this area after locking- Returns:
- true or false (default true)
-