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() |
String |
getName() |
String |
getSrc() |
void |
setImageType(ImageType imageType) |
void |
setImageType(String strType) |
void |
setSrc(String src) |
getAreaList, getShiftMode, getTransformationConfig, getTransformer, reset, setShiftModepublic static final String COMMAND_NAME
public ImageCommand()
public ImageCommand(String image, ImageType imageType)
image - name of the context attribute with the image bytesimageType - public 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 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 © 2019. All rights reserved.