public class ImageWidget extends BBjWidget implements SaveableWidget
ImageWidget A Dashboard Utility Widget that displays an image retrieved from a file path or a URL
BASIS_DASHBOARD_UTILITY_FILL_ERROR_ACTION_KEY_NAME$, CachedImage!, DashboardWidget!, FillErrorAction, ON_FILL_ERROR_IGNORE, ON_FILL_ERROR_STOP, ON_FILL_ERROR_WARN, UserData!
BASIS_UTILITY_DEVICE_PIXEL_RATIO_KEY_NAME$, DevicePixelRatio!
Constructor and Description |
---|
ImageWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$) Creates an ImageWidget without an image, which defaults to a transparent image |
ImageWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_imageName$) Creates an ImageWidget specifying an image file for the image source |
ImageWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, URL p_imageURL!) Creates an ImageWidget specifying a Java URL for the image source. Note that depending on the speed of the internet connection the host, retrieving an image from a URL may be slow. |
Modifier and Type | Method and Description |
---|---|
Image | clone() An internal method used by the Dashboard class to clone a category widget so that it may be displayed in a popped out window |
void | create(BBjChildWindow p_widgetControlWindow!) Creates the ImageWidget |
void | destroy() Destroys the ImageWidget |
BBjString | getImageName() Returns the image name for the widget. |
URL | getImageURL() Returns the image URL for the widget. |
BBjNumber | isDestroyed() Returns if the ImageWidget is destroyed |
void | refresh() Refreshes the image, which results in the widget showing an up-to-date version of the images if it has changed on disk or from the URL |
void | resize(BBjNumber p_width, BBjNumber p_height) Resizes the widget using the provided with and height |
void | save() Saves the image |
void | setImage(BBjString p_imageName$) Sets the image for the widget. This method is typically used when you want to set the widget's image in response to a refresh or filter event. |
void | setImage(URL p_imageURL!) Sets the image for the widget. This method is typically used when you want to set the widget's image in response to a refresh or filter event. |
active, destroy, getClientSlash, getFillError, getFillErrorDesc, getImage, getImage, imageFileSaveDialog, isDestroyed, logError, name, previewImage, previewText, setActive, setFillErrorDisplayImage, setFillErrorDisplayText, setLastSaveDir, spacesValid, title
create, destroy, display, getDevicePixelRatio, isDestroyed, logQueryPerformance, resize, setDevicePixelRatio
public ImageWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$)
Creates an ImageWidget without an image, which defaults to a transparent image
p_name$
The widget's namep_title$
The widget's titlep_previewText$
The widget's preview text as shown in the Customize view and the widget toolbar's tooltipp_previewImage$
The widget's preview image. If this is an empty string, then one will be created automatically in the Customize view.public ImageWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_imageName$)
Creates an ImageWidget specifying an image file for the image source
p_name$
The widget's namep_title$
The widget's titlep_previewText$
The widget's preview text as shown in the Customize view and the widget toolbar's tooltipp_previewImage$
The widget's preview image. If this is an empty string, then one will be created automatically in the Customize view.p_imageName$
The widget's image, as a string that contains a path to the image file used as the sourcepublic ImageWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, URL p_imageURL!)
Creates an ImageWidget specifying a Java URL for the image source. Note that depending on the speed of the internet connection the host, retrieving an image from a URL may be slow.
p_name$
The widget's namep_title$
The widget's titlep_previewText$
The widget's preview text as shown in the Customize view and the widget toolbar's tooltipp_previewImage$
The widget's preview image. If this is an empty string, then one will be created automatically in the Customize view.p_imageURL!
A Java URL containing the path to the image used as the source Oracle's URL documentation for more information.
public Image clone()
An internal method used by the Dashboard class to clone a category widget so that it may be displayed in a popped out window
public void create(BBjChildWindow p_widgetControlWindow!)
Creates the ImageWidget
p_widgetControlWindow!
The BBjChildWindow that will contain the widgetpublic void destroy()
Destroys the ImageWidget
public BBjString getImageName()
Returns the image name for the widget.
public URL getImageURL()
Returns the image URL for the widget.
public BBjNumber isDestroyed()
Returns if the ImageWidget is destroyed
public void refresh()
Refreshes the image, which results in the widget showing an up-to-date version of the images if it has changed on disk or from the URL
public void resize(BBjNumber p_width, BBjNumber p_height)
Resizes the widget using the provided with and height
p_width
The width of the widget in pixels.p_height
The height of the widget in pixels.public void save()
Saves the image
public void setImage(BBjString p_imageName$)
Sets the image for the widget. This method is typically used when you want to set the widget's image in response to a refresh or filter event.
p_imageName$
A string containing the path to the image filepublic void setImage(URL p_imageURL!)
Sets the image for the widget. This method is typically used when you want to set the widget's image in response to a refresh or filter event.
p_imageName$
A Java URL containing the path to the image used as the source Oracle's URL documentation for more information.