public class Image extends com.google.gwt.user.client.ui.Image implements IsResponsive, HasStyle, HasType<ImageType>
| Constructor and Description |
|---|
Image()
Creates an empty image.
|
Image(com.google.gwt.resources.client.ImageResource resource)
Creates an image whose size and content are defined by an ImageResource.
|
Image(com.google.gwt.safehtml.shared.SafeUri url)
Creates an image with a specified URL.
|
Image(com.google.gwt.safehtml.shared.SafeUri url,
int left,
int top,
int width,
int height)
Creates a clipped image with a specified URL and visibility rectangle.
|
Image(String url)
Creates an image with a specified URL.
|
Image(String url,
int left,
int top,
int width,
int height)
Creates a clipped image with a specified URL and visibility rectangle.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStyle(Style style)
Adds the provided style to the widget.
|
void |
removeStyle(Style style)
Removes the provided style from the widget.
|
void |
setHideOn(Device device)
Sets the kind of device, this widget is hidden on.
|
void |
setShowOn(Device device)
Sets the kind of device, this widget is shown on.
|
void |
setStyle(Style style)
Replaces the widet's style with the provided one.
|
void |
setType(ImageType style)
Sets the type of the widget.
|
addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addErrorHandler, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addLoadHandler, addLoadListener, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getAltText, getHeight, getOriginLeft, getOriginTop, getUrl, getWidth, onBrowserEvent, onLoad, prefetch, prefetch, removeClickListener, removeLoadListener, removeMouseListener, removeMouseWheelListener, setAltText, setResource, setUrl, setUrl, setUrlAndVisibleRect, setUrlAndVisibleRect, setVisibleRect, wrapaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onUnload, removeFromParent, setLayoutData, setParent, sinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEventspublic Image()
public Image(com.google.gwt.resources.client.ImageResource resource)
resource - the ImageResource to be displayedpublic Image(com.google.gwt.safehtml.shared.SafeUri url,
int left,
int top,
int width,
int height)
url - the URL of the image to be displayedleft - the horizontal co-ordinate of the upper-left vertex of the
visibility rectangletop - the vertical co-ordinate of the upper-left vertex of the
visibility rectanglewidth - the width of the visibility rectangleheight - the height of the visibility rectanglepublic Image(com.google.gwt.safehtml.shared.SafeUri url)
url - the URL of the image to be displayedpublic Image(String url, int left, int top, int width, int height)
url - the URL of the image to be displayedleft - the horizontal co-ordinate of the upper-left vertex of the
visibility rectangletop - the vertical co-ordinate of the upper-left vertex of the
visibility rectanglewidth - the width of the visibility rectangleheight - the height of the visibility rectanglepublic Image(String url)
url - the URL of the image to be displayedpublic void setShowOn(Device device)
The widget is not shown on any other device.
Only works if responsive design is turned on!
setShowOn in interface IsResponsiveConfigurator.hasResponsiveDesign(),
IsResponsive.setHideOn(Device)public void setHideOn(Device device)
The widget is not hidden on any other device.
Only works if responsive design is turned on!
setHideOn in interface IsResponsiveConfigurator.hasResponsiveDesign(),
IsResponsive.setShowOn(Device)public void setType(ImageType style)
public void setStyle(Style style)
public void addStyle(Style style)
public void removeStyle(Style style)
removeStyle in interface HasStylestyle - the style to be removed from the Widget.Copyright © 2016. All rights reserved.