Class ReportCellFormat
- java.lang.Object
-
- com.microstrategy.web.app.gui.ContextMenu.DefaultContextMenuItemBuilder
-
- com.microstrategy.web.app.transforms.contextmenus.AbstractReportCellContextMenuItemBuilder
-
- com.microstrategy.web.app.transforms.contextmenus.ReportCellFormat
-
- All Implemented Interfaces:
ContextMenuItemBuilder
public class ReportCellFormat extends AbstractReportCellContextMenuItemBuilder
TheReportCellFormat
represents a context menu item builder that will generate the option for being able to format the current grid cell selected, specified on the context.- Since:
- MicroStrategy Web 8.0.1
-
-
Constructor Summary
Constructors Constructor Description ReportCellFormat(Shortcut shortcut)
Class constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextMenuItem
createItem(TransformContext context)
Creates and populates aContextMenuItem
based on the information in theShortcut
used as its defintion, as well as the logic included on this builder instance.protected ParameterBuilder
getContextParameterBuilder(TransformContext context)
Utility method that mixes in the information from the events generated by thegetOpenFormatEditorEvent(com.microstrategy.web.app.transforms.TransformContext)
andgetSetFormatEditorTargetEvent(com.microstrategy.web.app.transforms.TransformContext)
methods on aParameterBuilder
instance, to be used for generating the menu informationprotected java.lang.String
getJSCode(TransformContext context)
Generate the JavaScript code the context menu item generated by this builder instance will trigger when the user selects it.protected java.lang.String
getJSShowItem(TransformContext context)
Generate the JavaScript code required for showing or hiding the option on client sideWebEvent
getOpenFormatEditorEvent(TransformContext context)
Generate the event for opening the format editorWebEvent
getSetFormatEditorTargetEvent(TransformContext context)
Generate the event for setting the target on the format editor to the current cell being analyzed.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, 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
-
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.
-
createItem
public ContextMenuItem createItem(TransformContext context)
Description copied from class:AbstractReportCellContextMenuItemBuilder
Creates and populates aContextMenuItem
based on the information in theShortcut
used as its defintion, as well as the logic included on this builder instance.- Specified by:
createItem
in interfaceContextMenuItemBuilder
- Overrides:
createItem
in classAbstractReportCellContextMenuItemBuilder
- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
- a new instance of a
ContextMenuItem
initialized with the option information to present to the user.
-
getJSCode
protected java.lang.String getJSCode(TransformContext context)
Description copied from class:AbstractReportCellContextMenuItemBuilder
Generate the JavaScript code the context menu item generated by this builder instance will trigger when the user selects it.- 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 information to trigger when the option is selected.
-
getJSShowItem
protected java.lang.String getJSShowItem(TransformContext context)
Generate the JavaScript code required for showing or hiding the option on client side- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
- String value with the JavaScript code to execute for determining if the option shall be presented to the user or not.
-
getContextParameterBuilder
protected ParameterBuilder getContextParameterBuilder(TransformContext context)
Utility method that mixes in the information from the events generated by thegetOpenFormatEditorEvent(com.microstrategy.web.app.transforms.TransformContext)
andgetSetFormatEditorTargetEvent(com.microstrategy.web.app.transforms.TransformContext)
methods on aParameterBuilder
instance, to be used for generating the menu information- Returns:
ParameterBuilder
initialized instance with the information from the events required by the menu option represented by this instance.
-
getOpenFormatEditorEvent
public WebEvent getOpenFormatEditorEvent(TransformContext context)
Generate the event for opening the format editor- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
WebEvent
instance initialized with the information for opening the format editor
-
getSetFormatEditorTargetEvent
public WebEvent getSetFormatEditorTargetEvent(TransformContext context)
Generate the event for setting the target on the format editor to the current cell being analyzed.- Parameters:
context
-TransformContext
initialized instance with the information on where this option will be used- Returns:
WebEvent
instance initialized with the information for defining the target information on the format editor according to the current cell being rendered.
-
-