public final class Utilities extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
EMPTY_ARRAY_STRING
Constant for EMPTY ARRAY string.
|
static String |
EMPTY_STRING
Constant for EMPTY string
|
Modifier and Type | Method and Description |
---|---|
static Style.Cursor |
getCursorOfChart(IsChart isChart)
Returns the cursor currently set into chart.
|
static String |
toFont(FontStyle style,
int size,
String family)
Builds the font string (shorthand property of CSS font) to use in the canvas object.
The format is [font-style] [font-variant] [font-weight] [font-size] [font-family]. See here CSS specification. |
static ImageElement |
toImageElement(Image image)
Creates a image element by image widget that displays the image at a given URL.
|
static ImageElement |
toImageElement(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 ImageElement |
toImageElement(ImageResource image)
Creates a image element by image resource which provides access to image data at runtime.
|
static ImageElement |
toImageElement(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 ImageElement |
toImageElement(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 ImageElement |
toImageElement(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.
|
public static final String EMPTY_STRING
public static final String[] EMPTY_ARRAY_STRING
public static String toFont(FontStyle style, int size, String family)
style
- font style to usesize
- font sizefamily
- font familypublic static ImageElement toImageElement(String url)
url
- a URI scheme that provides a way to in-line datanull
if argument is not consistentpublic static ImageElement toImageElement(String url, int width, int height)
url
- a URI scheme that provides a way to in-line datawidth
- width of imageheight
- height of imagenull
if argument is not consistentpublic static ImageElement toImageElement(ImageResource image)
image
- image resource instancenull
if argument is not consistentpublic static ImageElement toImageElement(ImageResource image, int width, int height)
image
- image resource instancewidth
- width of imageheight
- height of imagenull
if argument is not consistentpublic static ImageElement toImageElement(Image image)
image
- image widget instancenull
if argument is not consistentpublic static ImageElement toImageElement(Image image, int width, int height)
image
- image widget instancewidth
- width of imageheight
- height of imagenull
if argument is not consistentpublic static Style.Cursor getCursorOfChart(IsChart isChart)
isChart
- chart instanceStyle.Cursor.DEFAULT
.