Class AbstractReportCellInsertMetric
- java.lang.Object
-
- com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
-
- com.microstrategy.web.app.transforms.contextmenus.AbstractReportCellContextMenuItemBuilder
-
- com.microstrategy.web.app.transforms.contextmenus.AbstractReportCellInsertMetric
-
- All Implemented Interfaces:
ContextMenuItemBuilder
- Direct Known Subclasses:
ReportCellPercentGrandTotalMetric
,ReportCellPercentOverColumnsMetric
,ReportCellPercentOverPagesMetric
,ReportCellPercentOverRowsMetric
public abstract class AbstractReportCellInsertMetric extends AbstractReportCellContextMenuItemBuilder
AbstractReportCellInsertMetric
is the base class for the different Insert Metric options such asReportCellPercentGrandTotalMetric
,ReportCellPercentOverColumnsMetric
, etc. Children implementations of this class are expected to define the event that will generate the information for making the manipulation available to the user.- Since:
- MicroStrategy Web 8.0.1
-
-
Constructor Summary
Constructors Constructor Description AbstractReportCellInsertMetric(Shortcut definition)
Class constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ReportGridCellHeader
getDisplayCell(TransformContext context)
Utility method for obtaining theReportGridCellHeader
information out of theTransformContext
detailsprotected abstract WebEvent
getEvent(TransformContext context)
Generate the event information for the Insert Metric manipulation the instance will enable.protected java.lang.String
getJSCode(TransformContext context)
Generate the JavaScript code the option will have based on the event information provided.protected boolean
isActionEnabled(TransformContext context)
Called byAbstractReportCellContextMenuItemBuilder.isItemAvailable(com.microstrategy.web.app.transforms.TransformContext)
, indicates the abstract class if the corresponding action of this item is available.-
Methods inherited from class com.microstrategy.web.app.transforms.contextmenus.AbstractReportCellContextMenuItemBuilder
canDefineDerivedElements, createItem, getCell, getFormalParameter, getIntValue, getPassThroughMode, getStringValue, getTransform, isFeatureAvailable, isIframeEnabled, isItemAvailable, isRW, isTrue
-
Methods inherited from class com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
createItem, getDefinition, getItemKey, getScript
-
-
-
-
Method Detail
-
getEvent
protected abstract WebEvent getEvent(TransformContext context)
Generate the event information for the Insert Metric manipulation the instance will enable.- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
WebEvent
initialized instance with the event information for the manipulation support. If it is not allowed,null
might be returned.
-
isActionEnabled
protected boolean isActionEnabled(TransformContext context)
Called byAbstractReportCellContextMenuItemBuilder.isItemAvailable(com.microstrategy.web.app.transforms.TransformContext)
, indicates the abstract class if the corresponding action of this item is available.- Specified by:
isActionEnabled
in classAbstractReportCellContextMenuItemBuilder
- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
- boolean value indicating if the option should be enabled to the user or not, given the properties available on the context object.
-
getJSCode
protected java.lang.String getJSCode(TransformContext context)
Generate the JavaScript code the option will have based on the event information provided. It will use the event information generated by thegetEvent(com.microstrategy.web.app.transforms.TransformContext)
method.- Specified by:
getJSCode
in classAbstractReportCellContextMenuItemBuilder
- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
- String value with the JavaScript code to use for the context menu option.
-
getDisplayCell
protected ReportGridCellHeader getDisplayCell(TransformContext context)
Utility method for obtaining theReportGridCellHeader
information out of theTransformContext
details- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
ReportGridCellHeader
represented in theTransformContext
instance. If it happens to be another type of cell that does not inherit from this class, it will return null. The insert metric manipulations are only supported for cell header grid elements.
-
-