public class ImageCommand extends AbstractCommand
Implements image rendering
Image is specified by providing image bytes and type.
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMAND_NAME |
ADJACENT_SHIFT_MODE, INNER_SHIFT_MODE| Constructor and Description |
|---|
ImageCommand() |
ImageCommand(byte[] imageBytes,
ImageType imageType)
Creates the command from the image bytes
|
ImageCommand(String image,
ImageType imageType)
Creates the command from an image in the context
|
| Modifier and Type | Method and Description |
|---|---|
Command |
addArea(Area area)
Adds an area to this command
|
Size |
applyAt(CellRef cellRef,
Context context)
Applies a command at the given cell reference
|
ImageType |
getImageType() |
Boolean |
getLockRange()
Whether the command area is locked
Other commands will no longer execute in this area after locking
|
String |
getName() |
Double |
getScaleX() |
Double |
getScaleY() |
String |
getSrc() |
void |
setImageType(ImageType imageType) |
void |
setImageType(String strType) |
void |
setScaleX(String scaleX) |
void |
setScaleY(String scaleY) |
void |
setSrc(String src) |
getAreaList, getShiftMode, getTransformationConfig, getTransformer, reset, setLockRange, setLockRange, setShiftModepublic static final String COMMAND_NAME
public ImageCommand()
public ImageCommand(String image, ImageType imageType)
image - name of the context attribute with the image bytesimageType - type of the imagepublic ImageCommand(byte[] imageBytes,
ImageType imageType)
imageBytes - the image byte arrayimageType - the type of the image to render (e.g. PNG, JPEG etc)public String getSrc()
public void setSrc(String src)
src - expression resulting in image byte arraypublic ImageType getImageType()
public void setImageType(ImageType imageType)
public void setImageType(String strType)
strType - "PNG", "JPEG" (not "JPG"), ...public Double getScaleX()
public void setScaleX(String scaleX)
public Double getScaleY()
public void setScaleY(String scaleY)
public Boolean getLockRange()
CommandgetLockRange in interface CommandgetLockRange in class AbstractCommandpublic Command addArea(Area area)
CommandaddArea in interface CommandaddArea in class AbstractCommandarea - to be added areapublic String getName()
public Size applyAt(CellRef cellRef, Context context)
CommandcellRef - cell reference where the command must be appliedcontext - bean context to useCopyright © 2021. All rights reserved.