Vision - Alarm Journal Table Scripting Functions
This page details the various component and extension functions available for Vision's Alarm Journal Table component.
Component Functions​
.print(fitWidth, headerFormat, footerFormat, showDialog, landscape)​
Description
- This specialized print function will paginate the table onto multiple pages. This function accepts keyword-style invocation.
Keyword Args
boolean fitWidth - If true, the table's width will be stretched to fit across one page's width. Rows will still paginate normally. If false, the table will paginate columns onto extra pages. (default = true) [optional]
String headerFormat - A string to use as the table's page header. The substring "{0}" will be replaced with the current page number. (default = None) [optional]
String footerFormat - A string to use as the table's page footer. The substring "{0}" will be replaced with the current page number. (default = "Page {0}") [optional]
boolean showDialog - Whether or not the print dialog should be shown to the user. Default is true. [optional]
boolean landscape - Used to specify portrait (0) or landscape (1) mode. Default is portrait (0). [optional]
Return
- boolean - True if the print job was successful.
.getAlarms()​
Description
- Returns a dataset of the alarms currently displayed in the Alarm Journal Table component. The columns will be: EventId, Source, DisplayPath, EventTime, State, Priority and IsSystemEvent
Keyword Args
- None
Return
- Dataset - A dataset of alarms.
Extension Functions​
createPopupMenu​
Description
- Returns a popup menu that will be displayed when the user triggers a popup menu (right click) in the table. Use system.gui.createPopupMenu() to create the popup menu.
Parameters
Component self - A reference to the component that is invoking this function.
List selectedAlarmEvents - The alarm events selected on the Alarm Status Table. For an individual alarmEvent, call alarmEvent.get('propertyName') to inspect. Common properties: 'name', 'source', 'priority'.
Return
- JPopupMenu - A popup menu that was created with system.gui.createPopupMenu()
filterAlarm​
Description
- Called for each event loaded into the alarm status table. Return false to hide this event from the table. This code is executed in a background thread.
Parameters
Component self - A reference to the component that is invoking this function.
Alarm Event alarmEvent - The alarm event itself. Call alarmEvent.get('propertyName') to inspect. Common properties: 'name', 'source', 'priority'.
Return
- Boolean
onDoubleClicked​
Description
- Called when an alarm is double-clicked on to provide custom functionality. Does not return a value.
Parameters
- Component self - A reference to the component that is invoking this function.
Alarm Event alarmEvent - The alarm event itself. Call alarmEvent.get('propertyName') to inspect. Common properties: 'name', 'source', 'priority'.
Return
- None