Package org.pepstock.charba.client.gwt
Class ImagesHelper
- java.lang.Object
-
- org.pepstock.charba.client.gwt.ImagesHelper
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Img
toImg(ImageResource image)
Creates a image element by image resource which provides access to image data at runtime.static Img
toImg(ImageResource image, int width, int height)
Creates a image element by image resource which provides access to image data at runtime, forcing the size.static Img
toImg(Image image)
Creates a image element by image widget that displays the image at a given URL.static Img
toImg(Image image, int width, int height)
Creates a image element by image widget that displays the image at a given URL, forcing the size.static Img
toImg(String url)
Creates a image element by a data URL which is a URI scheme that provides a way to in-line data in a document, and it's commonly used to embed images in HTML and CSS.static Img
toImg(String url, int width, int height)
Creates a image element by a data URL which is a URI scheme that provides a way to in-line data in a document, and it's commonly used to embed images in HTML and CSS, forcing the size.
-
-
-
Method Detail
-
toImg
public static Img toImg(String url)
Creates a image element by a data URL which is a URI scheme that provides a way to in-line data in a document, and it's commonly used to embed images in HTML and CSS.- Parameters:
url
- a URI scheme that provides a way to in-line data- Returns:
- a image element or
null
if argument is not consistent
-
toImg
public static Img toImg(String url, int width, int height)
Creates a image element by a data URL which is a URI scheme that provides a way to in-line data in a document, and it's commonly used to embed images in HTML and CSS, forcing the size.- Parameters:
url
- a URI scheme that provides a way to in-line datawidth
- width of imageheight
- height of image- Returns:
- a image element or
null
if argument is not consistent
-
toImg
public static Img toImg(ImageResource image)
Creates a image element by image resource which provides access to image data at runtime.- Parameters:
image
- image resource instance- Returns:
- a image element instance or
null
if argument is not consistent
-
toImg
public static Img toImg(ImageResource image, int width, int height)
Creates a image element by image resource which provides access to image data at runtime, forcing the size.- Parameters:
image
- image resource instancewidth
- width of imageheight
- height of image- Returns:
- a image element or
null
if argument is not consistent
-
toImg
public static Img toImg(Image image)
Creates a image element by image widget that displays the image at a given URL.- Parameters:
image
- image widget instance- Returns:
- a image element or
null
if argument is not consistent
-
toImg
public static Img toImg(Image image, int width, int height)
Creates a image element by image widget that displays the image at a given URL, forcing the size.- Parameters:
image
- image widget instancewidth
- width of imageheight
- height of image- Returns:
- a image element or
null
if argument is not consistent
-
-