Class ReportCellPercentForEachMetric
- java.lang.Object
-
- com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
-
- com.microstrategy.web.app.transforms.contextmenus.AbstractReportCellContextMenuItemBuilder
-
- com.microstrategy.web.app.transforms.contextmenus.AbstractReportCellComposedContextMenuItemBuilder
-
- com.microstrategy.web.app.transforms.contextmenus.ReportCellPercentForEachMetric
-
- All Implemented Interfaces:
ContextMenuItemBuilder
public class ReportCellPercentForEachMetric extends AbstractReportCellComposedContextMenuItemBuilder
TheReportCellPercentForEachMetricrepresents a context menu item builder that will hold a sub-menu structure with a list of the options that a user is enabled to access for inserting new metrics based on the different grid elements, as specified on the context. The different submenu options are generated automatically based on the template structure; if no children options are defined on its submenu (lack of privileges, conditions required not met by the current context, etc) the option will automatically be ignored and the final context menu will not display it.- Since:
- MicroStrategy Web 8.0.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classReportCellPercentForEachMetric.AbstractInsertMetricContextMenuBuilderAbstract base implementation of theReportCellPercentForEachMetric.InsertMetricContextMenuBuilderclass.protected static interfaceReportCellPercentForEachMetric.InsertMetricContextMenuBuilderHelper builder interface that allows generating the different insert metric options for the current cell that shall be displayed to the user.protected static classReportCellPercentForEachMetric.InvalidInsertMetricContextMenuBuilderImplementation of theReportCellPercentForEachMetric.InsertMetricContextMenuBuilderinterface for representing a builder instance corresponding to a non-supported context.
-
Constructor Summary
Constructors Constructor Description ReportCellPercentForEachMetric(Shortcut definition)Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextMenugenerateSubMenu(TransformContext context)Get the submenu that will display the different sub-menu options to the user.protected ComposedContextMenuBuildergetComposedContextMenuBuilder(TransformContext context)Get an instance ofReportCellPercentForEachMetric.InsertMetricContextMenuBuilderthat will help obtaining the different insert metric options that shall be presented to the user.protected booleanisActionEnabled(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.AbstractReportCellComposedContextMenuItemBuilder
createItem, getJSCode, itemHasSubMenus
-
Methods inherited from class com.microstrategy.web.app.transforms.contextmenus.AbstractReportCellContextMenuItemBuilder
canDefineDerivedElements, 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
-
generateSubMenu
public ContextMenu generateSubMenu(TransformContext context)
Description copied from class:AbstractReportCellComposedContextMenuItemBuilderGet the submenu that will display the different sub-menu options to the user.- Overrides:
generateSubMenuin classAbstractReportCellComposedContextMenuItemBuilder- Parameters:
context-TransformContextinitialized instance with the information on where this option will be used- Returns:
ContextMenuinstance initialized with all the options that can be presented to the user.
-
getComposedContextMenuBuilder
protected ComposedContextMenuBuilder getComposedContextMenuBuilder(TransformContext context)
Get an instance ofReportCellPercentForEachMetric.InsertMetricContextMenuBuilderthat will help obtaining the different insert metric options that shall be presented to the user.- Specified by:
getComposedContextMenuBuilderin classAbstractReportCellComposedContextMenuItemBuilder- Parameters:
context-TransformContextinitialized instance with the information on where this option will be used- Returns:
ReportCellPercentForEachMetric.InsertMetricContextMenuBuilderinitialized instance. Calling its generateInsertMetricSubMenu method provides theContextMenuwith the different insert metric options available. Returns an instance of (ReportCellPercentForEachMetric.InvalidInsertMetricContextMenuBuilderif not supported.
-
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:
isActionEnabledin classAbstractReportCellContextMenuItemBuilder- Parameters:
context-TransformContextinitialized 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.
-
-