Skip to main content

%DeepSee.Component.Widget.widget

Class %DeepSee.Component.Widget.widget Extends %ZEN.Component.dragGroup [ Abstract, System = 4 ]

Base class for DeepSee Dashboard widgets.
Instances of this class, or its subclasses, represent graphical items within a DeepSee Dashboard (such as a pivot, chart, or meter).

Parameters

JSINCLUDES

Parameter JSINCLUDES = "zenCSLM.js,zenESVG.js,DeepSee.js";

DOMAIN

Parameter DOMAIN = "%DeepSee";

NAMESPACE

Parameter NAMESPACE = "http://www.intersystems.com/deepsee";

PUBLISHED

Parameter PUBLISHED As Boolean = 1;

Set this to false to prevent this widget from being listed.

DEFAULTHEADERLAYOUT

Parameter DEFAULTHEADERLAYOUT = "CIFT";

Default header layout pattern. N.B. Overridden in code.

DEFAULTCLOSEIMAGE

Parameter DEFAULTCLOSEIMAGE = "images/MacCloseX.png";

Default image for close group button.

DEFAULTMAXIMAGE

Parameter DEFAULTMAXIMAGE = "images/MacFullScreenPlus.png";

Default image for maximize group button.

DEFAULTMINIMAGE

Parameter DEFAULTMINIMAGE = "images/MacIconifyDash.png";

Default image for minimize group button.

DEFAULTCONTRACTIMAGE

Parameter DEFAULTCONTRACTIMAGE = "images/MacIconifyDash.png";

Default image for contract group button.

DEFAULTEXPANDIMAGE

Parameter DEFAULTEXPANDIMAGE = "images/MacIconifyDash.png";

Default image for expand group button.

DEFAULTRESIZEIMAGE

Parameter DEFAULTRESIZEIMAGE = "images/grayDragResize.png";

Default image for maximize group button.

DEFAULTRESIZEICONSIZE

Parameter DEFAULTRESIZEICONSIZE = 16;

Default resize icon size in pixels

Properties

subtype

Property subtype As %ZEN.Datatype.string;

Specify which specific sub-type of widget to display. The interpretation of this is up to subclasses to implement.

sidebarContent

Property sidebarContent As %ZEN.Datatype.html;

HTML content of sidebar.

showToolbar

Property showToolbar As %ZEN.Datatype.boolean [ InitialExpression = 1 ];

Specify whether to display a toolbar.

showToolbarBottomBorder

Property showToolbarBottomBorder As %ZEN.Datatype.boolean [ InitialExpression = 1 ];

Specify whether to display the separator between the toolbar and widget content

showToolbarOnlyWhenMaximized

Property showToolbarOnlyWhenMaximized As %ZEN.Datatype.boolean(XMLPROJECTION = "attribute") [ InitialExpression = 0 ];

Specify whether to display a toolbar.

showSidebar

Property showSidebar As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

Specify whether to display a sidebar.

sidebarWidth

Property sidebarWidth As %ZEN.Datatype.length [ InitialExpression = "25%" ];

Width of sidebar area.

%definition

Property %definition As %DeepSee.Dashboard.Widget(XMLPROJECTION = "none");

Used to hold a reference to the widget definition that defined this widget.

widgetLayout

Property widgetLayout As %ZEN.Datatype.string;

A string containing the layout state for this widget: "key🔝left:width:height:max" This is used by "SaveSettings"

widgetKey

Property widgetKey As %ZEN.Datatype.integer;

Identifying key for the widget.

previewMode

Property previewMode As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

If true, then render in preview mode.

dataSource

Property dataSource As %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Holder for dataSource.

linkWidgetKey

Property linkWidgetKey As %ZEN.Datatype.integer(XMLPROJECTION = "NONE");

If this widget is linked, then this is the key of the widget we are linked to. Set when the page is created.

clickTargets

Property clickTargets As list Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Names of target widgets to send click events to.

clickActions

Property clickActions As list Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Names of actions to raise for click events.

clickTargetProperties

Property clickTargetProperties As list Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Names of target properties for click events.

controlIndices

Property controlIndices As list Of %ZEN.Datatype.integer(XMLPROJECTION = "NONE");

Array of component indices for controls created by this widget.

clickFilterSpec

Property clickFilterSpec As %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Special filter value applied to this widget in response to a click event. Also used to handle filters passed in as part of the URL that are not mapped to a filter control.
If this starts with "%FILTER ", then this is one or more %FILTER clauses.

filterState

Property filterState As array Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Array of logical names of filters on this widget and their current values.
Each name is of the form: [DIM].[HIER].[LEVEL]
Each value is an MDX key value.

filterText

Property filterText As array Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Array of logical names of filters on this widget and their current display value.
This augments the filterState property.

filterDefault

Property filterDefault As array Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Array of default values of filters on this widget.
This is used to prevent saving of default values for widgets. This augments the filterState property.

settings

Property settings As array Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Settings applied to this widget. These are pulled from the URL of the dashboard viewer.

currValue

Property currValue As %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Value of most recently selected item on this widget, if applicable.

currValueName

Property currValueName As %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Value name for most recently selected item on this widget, if applicable.

currFilterSpec

Property currFilterSpec As %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Filter spec for most recently selected item on this widget, if applicable. If this starts with "%FILTER ", then it contains one or more "%FILTER" clauses.

currItemNo

Property currItemNo As %ZEN.Datatype.integer(XMLPROJECTION = "NONE");

Item number for most recently selected item on this widget, if applicable.

currSeriesNo

Property currSeriesNo As %ZEN.Datatype.integer(XMLPROJECTION = "NONE");

Series number for most recently selected item on this widget, if applicable.

hasInitialFilters

Property hasInitialFilters As %ZEN.Datatype.boolean(XMLPROJECTION = "NONE") [ InitialExpression = 0 ];

If true, then there are filter values that have to be applied.

maximized

Property maximized As %ZEN.Datatype.boolean(XMLPROJECTION = "NONE") [ InitialExpression = 0 ];

If true, then this widget should be maximized when it is initially displayed.

colorToolbar

Property colorToolbar As %ZEN.Datatype.color(XMLPROJECTION = "NONE") [ InitialExpression = "#F0F0F0" ];

color of toolbar

opacityToolbar

Property opacityToolbar As %ZEN.Datatype.float(XMLPROJECTION = "NONE") [ InitialExpression = 1.0 ];

backgroundColor

Property backgroundColor As %ZEN.Datatype.color(XMLPROJECTION = "NONE") [ InitialExpression = "#F0F0F0" ];

color of widget background

opacity

Property opacity As %ZEN.Datatype.float(XMLPROJECTION = "NONE") [ InitialExpression = 1.0 ];

opacity of widget background

forceToolbar

Property forceToolbar As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

Prevent the user from changing the settings for show toolbar.

sessionCookie

Property sessionCookie As %ZEN.Datatype.string;

Current CSP session.

clickActive

Property clickActive As list Of %ZEN.Datatype.string(XMLPROJECTION = "NONE");

Names of activeWhen values for click events.

prevHomeRow

Property prevHomeRow As %ZEN.Datatype.integer;

homeRow value before a widget is dragged

prevHomeCol

Property prevHomeCol As %ZEN.Datatype.integer;

homeCol value before a widget is dragged

isClosed

Property isClosed As %ZEN.Datatype.boolean [ InitialExpression = 0 ];

isClosed stores the state of a widget

XDatas

Style

XData Style

Style for widget sections

Methods

%DrawHTML

Method %DrawHTML()

Override dragGroup behavior.

%MakeWidgetId

Method %MakeWidgetId(pString As %String) As %String

Create an id value for an component within this widget.

%GetCatalogInfo

ClassMethod %GetCatalogInfo(Output pInfo As %List, Output pSubtypeList As %List) As %Status

Return information used to list this widget within the "widget catalog".

%GetWidgetPropertyInfo

ClassMethod %GetWidgetPropertyInfo(pSubtype As %String, Output pInfo As %List) As %Status

Return information on additional "properties" supported by this widget for the given subtype.

%OnAddToPageBefore

Method %OnAddToPageBefore() As %Status

If implemented, this callback method is called at page render-time when this component is added to a page but before any of its children have been created.

%AddSidebar

Method %AddSidebar(pMainGroup) As %Status

Add a sidebar to the pMainGroup of this widget.

%AddFooter

Method %AddFooter() As %Status

Add a footer to this widget.

%CreateCommandButtons

Method %CreateCommandButtons(pGroup As %ZEN.Component.group, pCanWrite As %Boolean = 1) As %Status [ Internal ]

Create the "command" buttons for this widget.

%OnCreateControls

Method %OnCreateControls(pGroup As %ZEN.Component.group) As %Status

This callback is called just before controls are added to the top of the widget. pGroup is the header in which new Zen control can be added.

%OnCreateWidget

Method %OnCreateWidget(pGroup As %ZEN.Component.group) As %Status

This callback is responsible for creating the contents of the widget. pGroup is the group to which new Zen components should be added.

onloadHandler

ClientMethod onloadHandler() [ Language = javascript ]

This client event, if present, is fired when the page is loaded.

findComponent

ClientMethod findComponent(id) [ Language = javascript ]

Find a component within this widget with the given sub id.

%FindComponent

Method %FindComponent(id As %String) As %ZEN.Component.component

Find a component within this widget with the given sub id.

isReady

ClientMethod isReady() [ Internal, Language = javascript ]

Test if this widget is ready to be resized.

adjustSizes

ClientMethod adjustSizes(load) [ Language = javascript ]

Called when page is loaded or widget is resized.

setModifiedIfDragged

ClientMethod setModifiedIfDragged() [ Language = javascript ]

Sets the "Modified" flag when a widget is dragged. Called in the onwindowdrop callback.

initializeHomeRowCol

ClientMethod initializeHomeRowCol() [ Language = javascript ]

Stores previous values of homeRow and homeCol (widget coordinates). Called in the onwindowgrab callback.

updateMenuBar

ClientMethod updateMenuBar() [ Language = javascript ]

Dynamically update Open/Hidden lists in the menu bar when a widget is closed/reopened.

closeWidget

ClientMethod closeWidget() [ Language = javascript ]

Hide a widget. Called in onclosepending callback of this widget.

openWidget

ClientMethod openWidget() [ Language = javascript ]

Open a closed widget. Called in an onclick callback in %ZEN.Component.navigator.

adjustContentSize

ClientMethod adjustContentSize(load, width, height) [ Language = javascript ]

Called when page is loaded (load will be true) or the widget is resized. This lets a subclass adjust the size of any components it has placed in the contents area. width and height contain the size of the content area.

controlEventHandler

ClientMethod controlEventHandler(which, action, targetProp, value, text) [ Language = javascript ]

This method is called when a control event is sent to this widget. A control event is raised by filter controls.
text is optional display value for value.

syncFilters

ClientMethod syncFilters(targetProp, value, text) [ Internal, Language = javascript ]

Make sure all filter controls show the same value.
text is optional text value of the filter (used when server actions drive the filter change!).

raiseEventHandler

ClientMethod raiseEventHandler(action) [ Language = javascript ]

This method is called an event on this widget (such as click on a chart series) occurs and it needs to be dispatched.

showListing

ClientMethod showListing(listing) [ Language = javascript ]

Perform a showListing action, if supported.

showGeoListing

ClientMethod showGeoListing(listing) [ Language = javascript ]

Perform a showGeoListing action, if supported.

showDimensions

ClientMethod showDimensions() [ Language = javascript ]

Perform a showDimensions action, if supported.

showBreakdown

ClientMethod showBreakdown(analysisClass) [ Language = javascript ]

Perform a showBreakdown action, if supported.

getDataController

ClientMethod getDataController() [ Language = javascript ]

If this widget contains a data controller, return it. This allows for generic capabilities in this base class.

%GetDataController

Method %GetDataController() As %ZEN.Auxiliary.abstractController

If this widget contains a data controller, return it.

applySetting

ClientMethod applySetting(action, value) [ Internal, Language = javascript ]

Apply the given setting value to this widget. For example, this is used to set the row count for a pivot.

applyFilters

ClientMethod applyFilters(refresh) [ Internal, Language = javascript ]

Apply the current filters to this widget.

onApplyFilters

ClientMethod onApplyFilters(refresh) [ Internal, Language = javascript ]

Notification to subclasses that filter has changed.

%GetFilterStateArray

Method %GetFilterStateArray() As %ListOfObjects [ Internal ]

Get the array of filter state information.

%GetFilterTextArray

Method %GetFilterTextArray() As %ListOfObjects [ Internal ]

Get the array of filter text information.

%GetFilterDefaultArray

Method %GetFilterDefaultArray() As %ListOfObjects [ Internal ]

Get the array of filter default information.

%ApplyFilters

Method %ApplyFilters() As %Status [ Internal ]

Apply the current filters to the widget. This is called when the page is first rendered to set the current filter values. It is called by the %CreateWidgets method of the DashboardViewer.

getFilterState

ClientMethod getFilterState(delim1, delim2) [ Internal, Language = javascript ]

Return the current state of filters for this widget as one serialized string.

setFilterState

ClientMethod setFilterState(state) [ Internal, Language = javascript ]

Set the current state of filters from a serialized string.

constructMDXClause

ClientMethod constructMDXClause(filter, value) [ Internal, Language = javascript ]

Given an MDX member expression and key value expression, return a clause that can be used as a filter spec.

updateControlState

ClientMethod updateControlState() [ Internal, Language = javascript ]

Update the display current controls for this widget. Implemented by subclasses.

executeDrillDown

ClientMethod executeDrillDown(dataSource) [ Internal, Language = javascript ]

Perform a local drill down for a target widget.

getParameterValue

ClientMethod getParameterValue(parm) [ Internal, Language = javascript ]

Find the value of the given parameter value.

%GetWidgetSettings

Method %GetWidgetSettings(ByRef pSettings As %String) As %Status

Get array of "dashboard" settings for this widget.

getMasterWidget

ClientMethod getMasterWidget() [ Internal, Language = javascript ]

If this is a slave to another widget, return the master. Otherwise return null.

getFilterStateArray

ClientMethod getFilterStateArray() [ Internal, Language = javascript ]

Get the array of filter state information for this widget.

getFilterTextArray

ClientMethod getFilterTextArray() [ Internal, Language = javascript ]

Get the array of filter text information for this widget.

syncMaster

ClientMethod syncMaster(slave) [ Internal, Language = javascript ]

Called on a master widget from a slave when the data source or filters are changed.

syncSlave

ClientMethod syncSlave(master, dataChange) [ Internal, Language = javascript ]

Called on a slave widget from a master when data source or filters are changed.

syncSlaveData

ClientMethod syncSlaveData(master) [ Internal, Language = javascript ]

Called on a slave widget from a master when its data source is changed.

normalize

ClientMethod normalize(event) [ Internal, Language = javascript ]

Intercept call to make sure all widgets get resize event!

setHighlight

ClientMethod setHighlight(flag) [ Internal, Language = javascript ]

Set the style of this widget to indicate that it is selected.

onSetHighlight

ClientMethod onSetHighlight(flag) [ Internal, Language = javascript ]

Notification that this widget is selected / unselected.

showDragHeader

ClientMethod showDragHeader(flag) [ Internal, Language = javascript ]

Hide/show the drag header for this widget.

hideToolbar

ClientMethod hideToolbar(flag) [ Internal, Language = javascript ]

Hide/show the toolbar for this widget.

selectWidget

ClientMethod selectWidget(evt) [ Language = javascript ]

Select this widget.

ClientMethod navGetContentForLevel(level, key, value) [ Internal, Language = javascript ]

Return an object describing what to display for this level within the navigator. Invoked from dashboard viewer.

ClientMethod navDataArrange(key, swap, final) [ Language = javascript ]

Re-arrange of a list in navigator.

ClientMethod navDataChange(key, value, final) [ Language = javascript ]

Change of data value in navigator.

ClientMethod navSelectItem(key, value, which) [ Language = javascript ]

Select of item in navigator.

ClientMethod navHeaderButtonClick(key) [ Language = javascript ]

Click on header button in navigator.

ClientMethod navCloseButtonClick(key) [ Language = javascript ]

Click on close button in navigator.

ClientMethod navPopupAction(key, value) [ Language = javascript ]

Popup action in navigator.

setProperty

ClientMethod setProperty(property, value, value2) [ Language = javascript ]

Set the value of a named property.

resize

ClientMethod resize(width, height) [ Language = javascript ]

Resize the active group to the given geometry.

componentToJSON

ClientMethod componentToJSON(obj, level, skip) [ Internal, Language = javascript ]

Utility method. Convert a component instance obj to JavaScript object literal syntax (JSON). This is used to get user modifications to components.

hasOverrides

ClientMethod hasOverrides() [ Language = javascript ]

Test if there are any style overrides for this widget.

resetOverrides

ClientMethod resetOverrides(themeOnly, recreate) [ Language = javascript ]

Reset any style overrides for this widget.

getOverrides

ClientMethod getOverrides() [ Language = javascript ]

Return an array of current style overrides for this widget. Used to save to a theme.

getSubtypeClass

ClientMethod getSubtypeClass() [ Language = javascript ]

Return the actual type used for a widget subtype (such as "barChart").

getOverrideSkipList

ClientMethod getOverrideSkipList(type) [ Language = javascript ]

Return a list of items that should not be saved in override JSON arrays. The return is passed to componentToJSON.

getDefinition

ClientMethod getDefinition(key) [ Language = javascript ]

Return the definition object for a given widget, if available. Use this widget by default.

applyPivotVariable

ClientMethod applyPivotVariable(varName, value) [ Internal, Language = javascript ]

Apply the given pivot variable value to the pivot.

setToolbarProperty

ClientMethod setToolbarProperty(property, value) [ Language = javascript ]

setOpacity

ClientMethod setOpacity(opacity) [ Language = javascript ]

processAppMessage

ClientMethod processAppMessage(value) [ Language = javascript ]

This is called by dragGroupManager when it is given 'processAppMessage' method

getSVGFrame

ClientMethod getSVGFrame() [ Language = javascript ]

getSettingLists

ClientMethod getSettingLists(setting) [ Language = javascript ]

getSettingDisplayValue

ClientMethod getSettingDisplayValue(setting, value) [ Language = javascript ]

printSVGContent

ClientMethod printSVGContent(svgFrameId, parms, svgContent, filename) [ Language = javascript ]

Print SVG content using the svgImageProvider. Parameters specific to the widget type may be passed in via the parms object, and those parameters will be augmented using settings common to all widgets in this clientMethod.
The target content may be looked up in the current svgFrameId, or printable content can be passed in directly as svgContent.

getFilterTableForPrinting

ClientMethod getFilterTableForPrinting(parms) [ Language = javascript ]

Find the filters defined for the current widget and return them in a JSON table fit for consumption by the SVG printer.

isMasterWidget

ClientMethod isMasterWidget(widgetId) [ Language = javascript ]

GetKpiFilterCaption

ClassMethod GetKpiFilterCaption(pKPIName, pSpec) As %String [ ZenMethod ]

Lookup a filter caption for a KPI

prepareSvgPrintParameters

ClientMethod prepareSvgPrintParameters(parms) [ Internal, Language = javascript ]

Transform a set of printing parameters that are compatible with the ZenReport-based %DeepSee.UI.MDXPDF, %DeepSee.UI.ChartPDF, etc, into the parameters expected by the %DeepSee.Component.deepseeSvgImageProvider

ResolveText

Method ResolveText(pEncodedText) As %String [ ZenMethod ]

Client-visible wrapper for the %ResolveText method to translate title text.