public class JasperViewerWidget extends BaseWidget implements RefreshableWidget
Modifier and Type | Field and Description |
---|---|
static BBjString |
ACTUAL_SIZE_MENU_ITEM_NAME$
Actual size menu item name
|
BBjNumber |
ActualSize
Actual size
|
static BBjString |
CONTROL_CHILD_WINDOW_NAME$
Viewer control child window name
|
static BBjString |
CREATE_IMAGE_TOOL_BUTTON_NAME$
Create imaage tool button name
|
static BBjString |
CUSTOM_PAGE_MENU_ITEM_NAME$
Custom page menu item name
|
static BBjString |
CUSTOM_ZOOM_MENU_ITEM_NAME$
Custom zoom menu item name
|
BBjNumber |
DefaultSaveContributor
Contributor that will be used by default on a save
|
BBjString |
DefaultSaveFile!
File that will be used by default on a save
|
BBjString |
DefaultSaveFolder!
Folder that will be used by default on a save
|
static BBjString |
EMAIL_MENU_ITEM_NAME$
Email menu item name
|
static BBjString |
EMAIL_TOOL_BUTTON_NAME$
Email tool button name
|
static BBjString |
FILE_SAVE_NAME$
File save name
|
static BBjString |
FIND_MENU_ITEM_NAME$
Find menu item name
|
static BBjString |
FIND_NEXT_MENU_ITEM_NAME$
Find next menu item name
|
static BBjString |
FIND_PREVIOUS_MENU_ITEM_NAME$
Find previous menu item name
|
static BBjString |
FIND_TOOL_BUTTON_NAME$
Find tool button name
|
static BBjString |
FIRST_PAGE_MENU_ITEM_NAME$
First page menu item name
|
static BBjString |
FIRST_PAGE_TOOL_BUTTON_NAME$
First page tool button name
|
static BBjString |
FIT_ACTUAL_SIZE_TOOL_BUTTON_NAME$
Fit actual size tool button name
|
static BBjString |
FIT_PAGE_MENU_ITEM_NAME$
Fit page menu item name
|
static BBjString |
FIT_PAGE_TOOL_BUTTON_NAME$
Fit page tool button name
|
static BBjString |
FIT_WIDTH_MENU_ITEM_NAME$
Fit width menu item name
|
static BBjString |
FIT_WIDTH_TOOL_BUTTON_NAME$
Fit width tool button name
|
BBjNumber |
FitPage
Fit page
|
BBjNumber |
FitWidth
Fit width
|
static BBjString |
GOOGLE_DOC_SAVE_NAME$
Google Doc save notify name
|
BBjString |
GoogleDefaultDocument!
Document that will be used by default on a google doc save
|
BBjString |
GoogleDefaultFolder!
Folder that will be used by default on a google doc save
|
BBjString |
GoogleDefaultType!
Type that will be used by default on a google doc save
|
BBjNumber |
Height
Height
|
static BBjString |
LAST_PAGE_MENU_ITEM_NAME$
Last page menu item name
|
static BBjString |
LAST_PAGE_TOOL_BUTTON_NAME$
Last page tool button name
|
static BBjString |
NEXT_PAGE_MENU_ITEM_NAME$
Next page menu item name
|
static BBjString |
NEXT_PAGE_TOOL_BUTTON_NAME$
Next page tool button name
|
static BBjNumber |
ON_FILE_SAVE_NOTIFY
File save notify event
|
static BBjNumber |
ON_GOOGLE_DOC_SAVE_NOTIFY
Google Doc save notify event
|
BBjNumber |
Page
Page to display
|
static BBjString |
PAGE_NUMBER_INPUTN_NAME$
Page number inputn name
|
static BBjString |
PREVIOUS_PAGE_MENU_ITEM_NAME$
Previous page menu item name
|
static BBjString |
PREVIOUS_PAGE_TOOL_BUTTON_NAME$
Previous page tool button name
|
static BBjString |
PRINT_MENU_ITEM_NAME$
Print menu item name
|
static BBjString |
PRINT_TOOL_BUTTON_NAME$
Print tool button name
|
static BBjString |
RELOAD_MENU_ITEM_NAME$
Reload menu item name
|
static BBjString |
RELOAD_TOOL_BUTTON_NAME$
Reload tool button name
|
static BBjString |
SAVE_AS_GOOGLE_DOCUMENT_MENU_ITEM_NAME$
Save as google docment item name
|
static BBjString |
SAVE_AS_MENU_ITEM_NAME$
Save as menu item name
|
static BBjString |
SAVE_IMAGE_MENU_ITEM_NAME$
Find previous menu item name
|
static BBjString |
SAVE_MENU_BUTTON_NAME$
Save menu button name
|
static BBjString |
SAVE_MENU_ITEM_NAME$
Save menu item name
|
static BBjString |
STATUS_BAR_NAME$
Status bar name
|
static BBjString |
TOOL_BAR_CHILD_WINDOW_NAME$
Tool bar child window name
|
BBjNumber |
Width
Width
|
static BBjString |
ZOOM_IN_MENU_ITEM_NAME$
Zoom in menu item name
|
static BBjString |
ZOOM_IN_TOOL_BUTTON_NAME$
Zoom in tool button name
|
static BBjString |
ZOOM_LIST_EDIT_NAME$
Zoom list edit name
|
static BBjString |
ZOOM_OUT_MENU_ITEM_NAME$
Zoom out menu item name
|
static BBjString |
ZOOM_OUT_TOOL_BUTTON_NAME$
Zoom out tool button name
|
BBjNumber |
ZoomLevel
Zoom level
|
BASIS_DASHBOARD_UTILITY_FILL_ERROR_ACTION_KEY_NAME$, CachedImage!, DashboardWidget!, FillErrorAction, ON_FILL_ERROR_IGNORE, ON_FILL_ERROR_STOP, ON_FILL_ERROR_WARN, UserData!
Constructor and Description |
---|
JasperViewerWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$)
Constructs a JasperViewerWidget given a name, preview text, preview image, but without a BBJasperReport object.
|
JasperViewerWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$,
BBJasperReport p_report!)
Constructs a JasperViewerWidget given a name, preview text, preview image, and a BBJasperReport object
|
JasperViewerWidget(BBjString p_name$,
BBjString p_title$,
BBjString p_previewText$,
BBjString p_previewImage$,
BBjString p_reportFile$,
BBjString p_connectString$,
HashMap p_params!)
Constructs a JasperViewerWidget given a name, preview text, preview image, and parameters so that the Dashboard Utility can create and fill the report before it displays the widget
|
Modifier and Type | Method and Description |
---|---|
JasperViewerWidget |
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 JasperViewerWidget
|
void |
destroy()
Destroys the JasperViewerWidget
|
void |
display(BBjNumber p_display)
Sets the widget's visibility
|
BBjNumber |
getFitType()
Returns the FitType for the report (FIT_TYPE_ACTUAL, FIT_TYPE_WIDTH, FIT_TYPE_PAGE)
|
BBjNumber |
getHasToolBar()
Returns whether the widget is using a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar
|
BBJasperReport |
getReport()
Returns the BBJasperReport for the widget
|
BBJasperView |
getView()
Returns the BBJasperView for the widget
|
BBJasperViewerControl |
getViewerControl()
Returns the BBJasperViewerControl for the widget
|
BBjNumber |
isDestroyed()
Returns if the JasperViewerWidget is destroyed
|
void |
OnViewerControlEvent(BBjSysGuiEvent p_event!)
An internal method that is called when the user initiates an event on a JasperViewerWidget's
control for which a callback event has been registered
|
void |
refresh()
Refreshes the widget's underlying BBJasperView control
|
void |
resize(BBjNumber p_width,
BBjNumber p_height)
Resizes the widget using the provided with and height
|
void |
setCallback(BBjString p_name$,
BBjNumber p_event,
BBjString p_callbackRoutine$)
Sets a callback for the widget, given a control name, control event, and a callback routine
|
void |
setCallback(BBjString p_name$,
BBjNumber p_event,
CustomObject p_callbackObject!,
BBjString p_callbackRoutine$)
Sets a callback for the widget, given a control name, control event, callback object, and a callback routine
|
void |
setFitType(BBjNumber p_fitType)
Sets the report image to fit the widget based on the provided fit type
|
void |
setHasToolBar(BBjNumber p_showToolBar)
Sets whether the widget should use a BBJasperViewerControl with a toolbar or a BBJasperView without a toolbar
|
void |
setReport(BBJasperReport p_report!)
Sets the BBJasperReport for the widget
|
active, getClientSlash, getFillError, getFillErrorDesc, getImage, getImage, imageFileSaveDialog, logError, name, previewImage, previewText, setActive, setFillErrorDisplayImage, setFillErrorDisplayText, setLastSaveDir, spacesValid, title
public BBjNumber Width
public BBjNumber Height
public BBjNumber ZoomLevel
public BBjNumber ActualSize
public BBjNumber FitPage
public BBjNumber FitWidth
public BBjNumber Page
public BBjString DefaultSaveFolder!
public BBjString DefaultSaveFile!
public BBjNumber DefaultSaveContributor
public BBjString GoogleDefaultFolder!
public BBjString GoogleDefaultDocument!
public BBjString GoogleDefaultType!
public static BBjString CONTROL_CHILD_WINDOW_NAME$
public static BBjString TOOL_BAR_CHILD_WINDOW_NAME$
public static BBjString STATUS_BAR_NAME$
public static BBjString SAVE_MENU_BUTTON_NAME$
public static BBjString SAVE_MENU_ITEM_NAME$
public static BBjString SAVE_AS_MENU_ITEM_NAME$
public static BBjString SAVE_AS_GOOGLE_DOCUMENT_MENU_ITEM_NAME$
public static BBjString PAGE_NUMBER_INPUTN_NAME$
public static BBjString ZOOM_LIST_EDIT_NAME$
public static BBjString CREATE_IMAGE_TOOL_BUTTON_NAME$
public static BBjString PRINT_TOOL_BUTTON_NAME$
public static BBjString EMAIL_TOOL_BUTTON_NAME$
public static BBjString RELOAD_TOOL_BUTTON_NAME$
public static BBjString FIRST_PAGE_TOOL_BUTTON_NAME$
public static BBjString PREVIOUS_PAGE_TOOL_BUTTON_NAME$
public static BBjString NEXT_PAGE_TOOL_BUTTON_NAME$
public static BBjString LAST_PAGE_TOOL_BUTTON_NAME$
public static BBjString FIT_ACTUAL_SIZE_TOOL_BUTTON_NAME$
public static BBjString FIT_PAGE_TOOL_BUTTON_NAME$
public static BBjString FIT_WIDTH_TOOL_BUTTON_NAME$
public static BBjString ZOOM_IN_TOOL_BUTTON_NAME$
public static BBjString ZOOM_OUT_TOOL_BUTTON_NAME$
public static BBjString FIND_TOOL_BUTTON_NAME$
public static BBjString PRINT_MENU_ITEM_NAME$
public static BBjString EMAIL_MENU_ITEM_NAME$
public static BBjString RELOAD_MENU_ITEM_NAME$
public static BBjString FIRST_PAGE_MENU_ITEM_NAME$
public static BBjString PREVIOUS_PAGE_MENU_ITEM_NAME$
public static BBjString NEXT_PAGE_MENU_ITEM_NAME$
public static BBjString LAST_PAGE_MENU_ITEM_NAME$
public static BBjString CUSTOM_PAGE_MENU_ITEM_NAME$
public static BBjString ACTUAL_SIZE_MENU_ITEM_NAME$
public static BBjString FIT_PAGE_MENU_ITEM_NAME$
public static BBjString FIT_WIDTH_MENU_ITEM_NAME$
public static BBjString ZOOM_IN_MENU_ITEM_NAME$
public static BBjString ZOOM_OUT_MENU_ITEM_NAME$
public static BBjString CUSTOM_ZOOM_MENU_ITEM_NAME$
public static BBjString FIND_MENU_ITEM_NAME$
public static BBjString FIND_NEXT_MENU_ITEM_NAME$
public static BBjString FIND_PREVIOUS_MENU_ITEM_NAME$
public static BBjString SAVE_IMAGE_MENU_ITEM_NAME$
public static BBjString FILE_SAVE_NAME$
public static BBjString GOOGLE_DOC_SAVE_NAME$
public static BBjNumber ON_FILE_SAVE_NOTIFY
public static BBjNumber ON_GOOGLE_DOC_SAVE_NOTIFY
public JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$)
p_name$
- Unique name of the widgetp_title$
- Title which will display in the title barp_previewText$
- Preview textp_previewImage$
- Preview imagepublic JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBJasperReport p_report!)
This constructor is less efficient than the versions that take a report file, connection string, and parameter list as your code must create and fill the report before displaying the dashboard. Constructing the widget with this method also requires that you register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed.
p_name$
- Unique name of the widgetp_title$
- Title which will display in the title barp_previewText$
- Description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
- Location of a image used for preview, if empty then a dynamic image will be createdp_report!
- BBJasperReport objectpublic JasperViewerWidget(BBjString p_name$, BBjString p_title$, BBjString p_previewText$, BBjString p_previewImage$, BBjString p_reportFile$, BBjString p_connectString$, HashMap p_params!)
This constructor is more efficient than the versions that take a BBJasperReport object as the Dashboard Utility will create and fill the report just before displaying the widget. The other methods require that you create and fill the report before the dashboard is displayed, even if the widget is not on the first tab and will never be displayed. Additionally, creating the widget with this constructor will refill the report automatically whenever the widget is refreshed. Constructing the widget with the BBJasperReport object requires that you register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed.
p_name$
- Unique name of the widgetp_title$
- Title which will display in the title barp_previewText$
- Description of the widget used for the preview text in the Customize screen and as the tooltip text on the widget's titlep_previewImage$
- Location of a image used for preview, if empty then a dynamic image will be createdp_reportFile$
- The path to a jrxml or jasper report filep_connectString$
- JDBC connect string used to connect to the databasep_params!
- A HashMap containing parameters for the report which may be set to null() if the report doesn't require parameterspublic void create(BBjChildWindow p_widgetControlWindow!)
public void OnViewerControlEvent(BBjSysGuiEvent p_event!)
public JasperViewerWidget clone()
public void resize(BBjNumber p_width, BBjNumber p_height)
public void destroy()
destroy
in interface Widget
destroy
in class BaseWidget
public BBjNumber isDestroyed()
isDestroyed
in interface Widget
isDestroyed
in class BaseWidget
public void display(BBjNumber p_display)
public void setCallback(BBjString p_name$, BBjNumber p_event, BBjString p_callbackRoutine$)
p_name$
- Control namep_event
- Control event that will trigger the callbackp_callbackRoutine$
- Routine name to callback when the event occurs on the controlpublic void setCallback(BBjString p_name$, BBjNumber p_event, CustomObject p_callbackObject!, BBjString p_callbackRoutine$)
p_name$
- Control namep_event
- Control event that will trigger the callbackp_callbackObject
- Object to callback when the event occurs on the controlp_callbackRoutine$
- Routine name to callback when the event occurs on the controlpublic void setReport(BBJasperReport p_report!)
p_report!
- The BBJasperReport that contains report information for the widgetpublic BBJasperReport getReport()
This method is typically used in custom callback code as a result of a refresh or a filter selection event on the DashboardWidget. Your callback code can get the DashboardWidget from the custom event and get the JasperViewerWidget from that. Calling this method gives you the underlying BBJasperReport, from which you can get/set the report's parameters to modify what the report displays or export the report to a variety of different formats.
public BBjNumber getFitType()
public void setFitType(BBjNumber p_fitType)
The fit type can be set using static field variables like BBJasperViewerControl.getFIT_TYPE_ACTUAL(), BBJasperViewerControl.getFIT_TYPE_PAGE(), or BBJasperViewerControl.getFIT_TYPE_WIDTH().
p_fitType
- Specifies one the following fit types: FIT_TYPE_ACTUAL, FIT_TYPE_WIDTH, FIT_TYPE_PAGEpublic BBJasperViewerControl getViewerControl()
As of BBj 18.20, the JasperViewerWidget may not contain a toolbar when the widget is very small, which indicates that it's implemented using a BBJasperView instead of a BBJasperViewerControl. Therefore, it may be more desireable to use the getView() method which returns the BBJasperView that's always available, regardless of the internal implementation.
public BBjNumber getHasToolBar()
public void setHasToolBar(BBjNumber p_showToolBar)
p_showToolBar
- A number acting as a boolean that determines whether the toolbar is present (0 = Widget does NOT have Jasper ToolBar, 1 = widget DOES have Jasper ToolBar)public BBJasperView getView()
public void refresh()
If the JasperViewerWidget was constructed with a BBJasperReport object, then the report will not be refilled. If you created the widget with a BBJasperReport you must register for the refresh callback event and refill the report yourself if you want the report to be updated when the widget is refreshed.
If the widget was constructed with a report file, connection string, and parameter list then the widet will refill the report automatically whenever the widget is refreshed.
refresh
in interface RefreshableWidget