public class ImageCell extends Cell<ImageCell>
| Modifier and Type | Class and Description |
|---|---|
static class |
ImageCell.ScaleMode
Represents a method used to scale an image.
|
| Constructor and Description |
|---|
ImageCell(Template template)
Constructs a new image cell and adds it to the given template.
|
| Modifier and Type | Method and Description |
|---|---|
ImageCell |
setImage(Image image)
Sets the image to be displayed in this cell if the bindingIndex is not set.
|
ImageCell |
setScaleMode(ImageCell.ScaleMode scaleMode)
Selects the method used for image scaling.
|
protected JsonObject |
toJson()
Creates a JSON representation of this cell.
|
setBackground, setBindingIndex, setBottom, setBottom, setFont, setForeground, setHeight, setHorizontalAlignment, setLeft, setLeft, setName, setRight, setRight, setSelectable, setTop, setTop, setVerticalAlignment, setWidthpublic ImageCell(Template template)
template - the parent template, must not be nullpublic ImageCell setImage(Image image)
image - an image, or null if no image should be displayedpublic ImageCell setScaleMode(ImageCell.ScaleMode scaleMode)
scaleMode - the scale mode to use, must not be nullprotected JsonObject toJson()
Cell
protected JsonObject toJson() {
JsonObject json = super.toJson();
json.add( "foo", getFoo() );
...
return json;
}
Copyright (c) EclipseSource and others 2002, 2015.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0