public class BBjWidget extends BaseWidget implements RefreshableWidget
Modifier and Type | Field and Description |
---|---|
static BBjString |
BASIS_UTILITY_DEVICE_PIXEL_RATIO_KEY_NAME$
Name of STBL key whose value can be set to the desired device pixel ratio, overriding the dynamically determined default value.
|
static BBjNumber |
DevicePixelRatio!
A BBjNumber identifying the screen's pixel ratio.
|
BASIS_DASHBOARD_UTILITY_FILL_ERROR_ACTION_KEY_NAME$, CachedImage!, DashboardWidget!, FillErrorAction, ON_FILL_ERROR_IGNORE, ON_FILL_ERROR_STOP, ON_FILL_ERROR_WARN, UserData!
Modifier and Type | Method and Description |
---|---|
void |
create(BBjControl p_widgetControlWindow!)
Creates a BBjWidget in the specified BBjChildWindow
|
void |
destroy()
Destroys the BBjWidget and its interior BBjControl
|
void |
display(BBjNumber p_display)
If the BBjWidget's interior BBjControl has already been created, then this method sets its visibiity
|
BBjNumber |
getDevicePixelRatio()
An internal method used to set/get the device pixel ratio for the widget
|
BBjNumber |
isDestroyed()
Returns whether the BBjWidget is destroyed
|
static void |
logQueryPerformance(BBjString p_widgetName$,
BBjString p_sql$,
BBjNumber p_startTime)
This method is used internally by the Dashboard Utility to optionally log the performance of SQL Queries for Widgets
Before analyzing the SQL timings, you must first instruct the Dashboard Utility to log all SQL timing
results to the BBj Debug log file located in the <BBj_HOME>/log directory.
|
void |
resize(BBjNumber p_width,
BBjNumber p_height)
Resizes the widget using the provided with and height if the BBjWidget's interior BBjControl has already been created
|
void |
setDevicePixelRatio(BBjNumber p_pixelRatio)
A BBjNumber identifying the screen's pixel ratio.
|
active, getClientSlash, getFillError, getFillErrorDesc, getImage, getImage, imageFileSaveDialog, logError, name, previewImage, previewText, setActive, setFillErrorDisplayImage, setFillErrorDisplayText, setLastSaveDir, spacesValid, title
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
refresh
public static BBjNumber DevicePixelRatio!
This numeric field variable may be set as desired to any real number, although a minimum of 0.5 and maximum of 4 will be enforced
by the utility to avoid rendering enormous images that consume a huge amount of memory. If it is not modified, it will be set
according to the pixel ratio of the current screen. Here is an example showing how to set the DevicePixelRatio via a widget:
widget!.setDevicePixelRatio(2)
Note that you may also set the "BASIS_UTILITY_DEVICE_PIXEL_RATIO" global string entry
either via code or in a configuration file in order to control the pixel ratio used when generating images, such as
charts or reports. Here are two examples:
1) Setting the global string entry in code, before creating any widgets or reports:
temp$ = STBL("BASIS_UTILITY_DEVICE_PIXEL_RATIO", "2")
2) Setting the global string entry in the config file, without changing any code:
SET BASIS_UTILITY_DEVICE_PIXEL_RATIO = 2
public static BBjString BASIS_UTILITY_DEVICE_PIXEL_RATIO_KEY_NAME$
The numeric value may be set as desired to any real number, although a minimum of 1 and maximum of 4 will be enforced by the utility to avoid
rendering enormous images that consume a huge amount of memory. Note that you may also set the "BASIS_UTILITY_DEVICE_PIXEL_RATIO" global
string entry either via code or in a configuration file in order to control the pixel ratio used when generating images, such as charts or reports.
Here are two examples:
1) Setting the global string entry in code, before creating any widgets or reports:
temp$ = STBL("BASIS_UTILITY_DEVICE_PIXEL_RATIO", "2")
2) Setting the global string entry in the config file, without changing any code:
SET BASIS_UTILITY_DEVICE_PIXEL_RATIO = 2
public void create(BBjControl p_widgetControlWindow!)
public BBjNumber getDevicePixelRatio()
This is first called upon widget creation to set the device pixel ratio (DPR) for the widget, which is a static to prevent the code from being executed several times per dashboard. If the BASIS_UTILITY_DEVICE_PIXEL_RATIO STBL is set it will be used preferentially over all other other values. If the STBL is not set, the method will determine the DPR for the widget. If the widget already has a UI, then it uses the DPR for the screen on which the widget is displayed. If the widget does not have a UI it will use the DPR for the default screen.
to override the value derived from this method
public void setDevicePixelRatio(BBjNumber p_pixelRatio)
This numeric field variable may be set as desired to any real number, although a minimum of 0.5 and maximum of 4 will be enforced
by the utility to avoid rendering enormous images that consume a huge amount of memory. If it is not modified, it will be set
according to the pixel ratio of the current screen. Here is an example showing how to set the DevicePixelRatio via a widget:
widget!.setDevicePixelRatio(2)
Note that you may also set the "BASIS_UTILITY_DEVICE_PIXEL_RATIO" global string entry
either via code or in a configuration file in order to control the pixel ratio used when generating images, such as
charts or reports. Here are two examples:
1) Setting the global string entry in code, before creating any widgets or reports:
temp$ = STBL("BASIS_UTILITY_DEVICE_PIXEL_RATIO", "2")
2) Setting the global string entry in the config file, without changing any code:
SET BASIS_UTILITY_DEVICE_PIXEL_RATIO = 2
p_pixelRatio
- A BBjNumber specifying the screen's pixel ratio to use when creating the widget's graphicspublic void display(BBjNumber p_display)
public void resize(BBjNumber p_width, BBjNumber p_height)
public static void logQueryPerformance(BBjString p_widgetName$, BBjString p_sql$, BBjNumber p_startTime)
temp$ = STBL("BASIS_UTILITY_LOG_QUERY_PERFORMANCE", "1")
2) Setting the global string entry in the config file, without changing any code:
SET BASIS_UTILITY_LOG_QUERY_PERFORMANCE = 1
p_widgetName$
- The name of the widget associated with the timingp_sql$
- The widget's SQL query that is responsible for providing data to the widgetp_startTime
- The starting time of the query from System.nanoTime()public void destroy()
destroy
in interface Widget
destroy
in class BaseWidget
public BBjNumber isDestroyed()
isDestroyed
in interface Widget
isDestroyed
in class BaseWidget