public class ClippedImagePrototype extends AbstractImagePrototype
AbstractImagePrototype
for a clipped image. This
class is used internally by the image bundle generator and is not intended
for general use. It is subject to change without warning.AbstractImagePrototype.ImagePrototypeElement
Constructor and Description |
---|
ClippedImagePrototype(SafeUri url,
int left,
int top,
int width,
int height) |
ClippedImagePrototype(String url,
int left,
int top,
int width,
int height)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
applyTo(AbstractImagePrototype.ImagePrototypeElement imageElement)
Transforms an existing
AbstractImagePrototype.ImagePrototypeElement into the image
represented by this prototype. |
void |
applyTo(Image image)
Transforms an existing
Image into the image represented by this
prototype. |
AbstractImagePrototype.ImagePrototypeElement |
createElement()
Creates a new
Element based on the image represented by this
prototype. |
Image |
createImage()
Creates a new
Image instance based on the image represented by this
prototype. |
SafeHtml |
getSafeHtml()
Gets an HTML fragment that displays the image represented by this
prototype.
|
void |
setDraggable(boolean isDraggable) |
create, getHTML
public ClippedImagePrototype(SafeUri url, int left, int top, int width, int height)
@Deprecated public ClippedImagePrototype(String url, int left, int top, int width, int height)
public void applyTo(Image image)
AbstractImagePrototype
Image
into the image represented by this
prototype.applyTo
in class AbstractImagePrototype
image
- the instance to be transformed to match this prototypepublic void applyTo(AbstractImagePrototype.ImagePrototypeElement imageElement)
AbstractImagePrototype
AbstractImagePrototype.ImagePrototypeElement
into the image
represented by this prototype.applyTo
in class AbstractImagePrototype
imageElement
- an ImagePrototypeElement
created by
AbstractImagePrototype.createElement()
public AbstractImagePrototype.ImagePrototypeElement createElement()
AbstractImagePrototype
Element
based on the image represented by this
prototype. The DOM structure may not necessarily a simple
<img>
element. It may be a more complex structure that
should be treated opaquely.createElement
in class AbstractImagePrototype
ImagePrototypeElement
corresponding to the image
represented by this prototypepublic Image createImage()
AbstractImagePrototype
Image
instance based on the image represented by this
prototype.createImage
in class AbstractImagePrototype
Image
based on this prototypepublic SafeHtml getSafeHtml()
AbstractImagePrototype
<img>
element. It may be a more complex structure that
should be treated opaquely.
The default implementation throws an UnsupportedOperationException
.
getSafeHtml
in class AbstractImagePrototype
public void setDraggable(boolean isDraggable)
Copyright © 2016. All rights reserved.