public class BBjWidget extends BaseWidget implements RefreshableWidget
BBjWidget Creates a widget that is implemented as a BBjControl
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.
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:
|
static BBjNumber | DevicePixelRatio! A BBjNumber identifying the screen's pixel ratio. Any real number between 0.5 and 4.0 is allowed.
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:
|
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 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. |
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. This is done by
setting the "BASIS_UTILITY_LOG_QUERY_PERFORMANCE" global string entry to the number one, either via
code or in a configuration file. Here are two examples:
1) Setting the global string entry in code, before creating any widgets or running a dashboard:
|
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. Any real number between 0.5 and 4.0 is allowed.
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:
|
active, destroy, getClientSlash, getFillError, getFillErrorDesc, getImage, getImage, imageFileSaveDialog, isDestroyed, logError, name, previewImage, previewText, setActive, setFillErrorDisplayImage, setFillErrorDisplayText, setLastSaveDir, spacesValid, title
public 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.
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 static BBjNumber DevicePixelRatio!
A BBjNumber identifying the screen's pixel ratio. Any real number between 0.5 and 4.0 is allowed.
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 void create(BBjControl p_widgetControlWindow!)
Creates a BBjWidget in the specified BBjChildWindow
p_widgetControlWindow!
The BBjChildWindow that will contain the widgetpublic void destroy()
Destroys the BBjWidget and its interior BBjControl
public void display(BBjNumber p_display)
If the BBjWidget's interior BBjControl has already been created, then this method sets its visibiity
p_display
Indicates the control's visibility. 0=invisible, 1=visiblepublic BBjNumber getDevicePixelRatio()
An internal method used to set/get the device pixel ratio for the widget
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.
BBjWidget::setPixelRatio() to override the value derived from this method
public BBjNumber isDestroyed()
Returns whether the BBjWidget is destroyed
public 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. This is done by
setting the "BASIS_UTILITY_LOG_QUERY_PERFORMANCE" global string entry to the number one, either via
code or in a configuration file. Here are two examples:
1) Setting the global string entry in code, before creating any widgets or running a dashboard:
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() BBj 16.00
public 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
p_width
The control's desired width in pixelsp_height
The control's desired height in pixelspublic void setDevicePixelRatio(BBjNumber p_pixelRatio)
A BBjNumber identifying the screen's pixel ratio. Any real number between 0.5 and 4.0 is allowed.
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 graphics