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 Details

  • Method Details

    • getName

      String getName()
      Returns:
      command name
    • getAreaList

      List<Area> getAreaList()
      Returns:
      a list of areas for this command
    • addArea

      Command addArea(Area area)
      Adds an area to this command
      Parameters:
      area - to be added area
      Returns:
      this command instance
    • applyAt

      Size applyAt(CellRef cellRef, Context context)
      Applies a command at the given cell reference
      Parameters:
      cellRef - cell reference where the command must be applied
      context - bean context to use
      Returns:
      size of enclosing command area after transformation
    • reset

      void reset()
      Resets command data for repeatable command usage
    • setShiftMode

      void setShiftMode(String mode)
      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
      Parameters:
      mode - cell shifting mode with possible values "inner" or "adjacent"
    • getShiftMode

      String getShiftMode()
      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)
      Returns:
      cell shifting mode ("inner" or "adjacent")
    • setLockRange

      void setLockRange(String isLock)
      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)