[]
ICellDecorationIconUse this class to create an icon that can be added to a cell's decoration via CellDecoration. The icon is defined by a source string (typically a data URI for an SVG or image), dimensions in pixels, and a position relative to the cell specified by IconPosition.
CellDecorationIcon icon = new CellDecorationIcon(
"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiLz4=",
12, 12, IconPosition.OutsideRight);
worksheet.getRange("A1").setValue("Hello");
worksheet.getRange("A1").setDecoration(
new CellDecoration(null, Collections.singletonList(icon)));
CellDecorationIcon(String src,
int width,
int height,
IconPosition position) src - The icon src string.width - The icon width in pixels.height - The icon height in pixels.position - The icon position.
CellDecorationIcon icon = new CellDecorationIcon(
"data:image/svg+xml;base64,PHN2Zz4=", 12, 16, IconPosition.OutsideRight);
String src = icon.getSrc();
getSrc in interface ICellDecorationIcon
CellDecorationIcon icon = new CellDecorationIcon(
"data:image/svg+xml;base64,PHN2Zz4=", 12, 16, IconPosition.OutsideRight);
int width = icon.getWidth();
getWidth in interface ICellDecorationIcon
CellDecorationIcon icon = new CellDecorationIcon(
"data:image/svg+xml;base64,PHN2Zz4=", 12, 16, IconPosition.OutsideRight);
int height = icon.getHeight();
getHeight in interface ICellDecorationIcon
CellDecorationIcon icon = new CellDecorationIcon(
"data:image/svg+xml;base64,PHN2Zz4=", 12, 16, IconPosition.OutsideRight);
IconPosition position = icon.getPosition();
getPosition in interface ICellDecorationIcon