Package org.jxls.command
Class AbstractCommand
java.lang.Object
org.jxls.command.AbstractCommand
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
AreaCommand,EachCommand,GridCommand,IfCommand,UpdateCellCommand
Implements basic command methods and is a convenient base class for other commands
- Author:
- Leonid Vysochyn
-
Field Summary
FieldsFields inherited from interface org.jxls.command.Command
ADJACENT_SHIFT_MODE, INNER_SHIFT_MODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an area to this commandWhether the command area is locked Other commands will no longer execute in this area after lockingprotected JxlsLoggerReturns 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)protected Transformervoidreset()Resets command data for repeatable command usagevoidsetLockRange(Boolean lockRange) voidsetLockRange(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 theAdjacentCellShiftStrategytransformToIterableObject(String collectionName, Context context) Evaluates the passed collection name into anIterableobject
-
Field Details
-
areaList
-
-
Constructor Details
-
AbstractCommand
public AbstractCommand()
-
-
Method Details
-
addArea
Description copied from interface:CommandAdds an area to this command -
reset
public void reset()Description copied from interface:CommandResets command data for repeatable command usage -
setShiftMode
Description copied from interface:CommandDefines 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- Specified by:
setShiftModein interfaceCommand- Parameters:
mode- cell shifting mode with possible values "inner" or "adjacent"
-
getShiftMode
Description copied from interface:CommandReturns 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)- Specified by:
getShiftModein interfaceCommand- Returns:
- cell shifting mode ("inner" or "adjacent")
-
getAreaList
- Specified by:
getAreaListin interfaceCommand- Returns:
- a list of areas for this command
-
getLockRange
Description copied from interface:CommandWhether the command area is locked Other commands will no longer execute in this area after locking- Specified by:
getLockRangein interfaceCommand- Returns:
- true or false (default true)
-
setLockRange
Description copied from interface:CommandOther commands will no longer execute in this area after locking- Specified by:
setLockRangein interfaceCommand- Parameters:
isLock- Whether the command area is locked, value should be "true","false",null
-
setLockRange
-
getTransformer
-
getLogger
-
transformToIterableObject
Evaluates the passed collection name into anIterableobject- Parameters:
collectionName- -context- -- Returns:
- an iterable object from the
Contextunder given name
-