Class AbstractCommand

java.lang.Object
org.jxls.command.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AreaCommand, EachCommand, GridCommand, IfCommand, UpdateCellCommand

public abstract class AbstractCommand extends Object implements Command
Implements basic command methods and is a convenient base class for other commands
Author:
Leonid Vysochyn
  • Field Details

    • areaList

      protected List<Area> areaList
  • Constructor Details

    • AbstractCommand

      public AbstractCommand()
  • Method Details

    • addArea

      public Command addArea(Area area)
      Description copied from interface: Command
      Adds an area to this command
      Specified by:
      addArea in interface Command
      Parameters:
      area - to be added area
      Returns:
      this command instance
    • reset

      public void reset()
      Description copied from interface: Command
      Resets command data for repeatable command usage
      Specified by:
      reset in interface Command
    • setShiftMode

      public void setShiftMode(String mode)
      Description copied from interface: Command
      Defines the CellShiftStrategy to use when shifting the cells for the command while transforming an area The mode value "inner" sets the InnerCellShiftStrategy (default) The mode value "adjacent" sets the AdjacentCellShiftStrategy
      Specified by:
      setShiftMode in interface Command
      Parameters:
      mode - cell shifting mode with possible values "inner" or "adjacent"
    • getShiftMode

      public String getShiftMode()
      Description copied from interface: Command
      Returns the cell shifting mode defining the CellShiftStrategy to use for the command Possible values are "inner" defining the InnerCellShiftStrategy to use "adjacent" defining the AdjacentCellShiftStrategy to use null value means the default strategy will be used (InnerCellShiftStrategy)
      Specified by:
      getShiftMode in interface Command
      Returns:
      cell shifting mode ("inner" or "adjacent")
    • getAreaList

      public List<Area> getAreaList()
      Specified by:
      getAreaList in interface Command
      Returns:
      a list of areas for this command
    • getLockRange

      public Boolean getLockRange()
      Description copied from interface: Command
      Whether the command area is locked Other commands will no longer execute in this area after locking
      Specified by:
      getLockRange in interface Command
      Returns:
      true or false (default true)
    • setLockRange

      public void setLockRange(String isLock)
      Description copied from interface: Command
      Other commands will no longer execute in this area after locking
      Specified by:
      setLockRange in interface Command
      Parameters:
      isLock - Whether the command area is locked, value should be "true","false",null
    • setLockRange

      public void setLockRange(Boolean lockRange)
    • getTransformer

      protected Transformer getTransformer()
    • getLogger

      protected JxlsLogger getLogger()
    • transformToIterableObject

      protected Iterable<Object> transformToIterableObject(String collectionName, Context context)
      Evaluates the passed collection name into an Iterable object
      Parameters:
      collectionName - -
      context - -
      Returns:
      an iterable object from the Context under given name