public abstract class

AbstractReportGridCellTitle

extends AbstractReportGridDisplayCell
implements ReportGridCellTitle
java.lang.Object
   ↳ com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
     ↳ com.microstrategy.web.app.transforms.AbstractReportGridCellTitle
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This class serves as base implementation for other classes such as ReportGridCellColTitleImpl and ReportGridCellRowTitleImpl which render Cell Title information of a Grid to be presented to the user.

Summary

Nested Classes
class AbstractReportGridCellTitle.TitlePivotButtonInfo Helper class for storing pivot button information - such as JavaScript id, descriptor (tooltip) and image name - based on the action that can be performed given the current selected target. 
[Expand]
Inherited Constants
From class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
From interface com.microstrategy.web.app.transforms.ReportGridDisplayCell
[Expand]
Inherited Fields
From class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
Public Constructors
AbstractReportGridCellTitle()
Public Methods
boolean canAddShortcutMetric(int shortcutMetricType)
Returns whether specified shortcut metric could be created based on current cell.
boolean canDrillAdvanced()
Utility methood for determining if the cell object is enabled for displaying the user the option for advanced drilling on it
boolean canEditControl()
Utility methood for determining if the cell object is enabled for displaying the user the option to edit control
boolean canFilterOn()
Utility methood for determining if the cell object is enabled for displaying the user the option to filter on it
boolean canHaveDerivedElements()
boolean canHyperLink()
Utility method for determining if the cell object is enabled for displaying the user the option to navigate to custom hyperlinks
boolean canModifyAttributeForm()
Utility methood for determining if the cell object is enabled for displaying the user the option to modify the attribute forms on it
boolean canPivot(int type)
Utility methood for determining if the cell object is enabled for displaying the user the option to pivot it according to the type specified
boolean canRename()
Utility methood for determining if the cell object is enabled for displaying the user the option to rename it
boolean canSort()
Utility methood for determining if the cell object is enabled for displaying the user the option to sort it
WebEvent getAddShortcutMetricEvent(int shortcutMetricType)
Returns the WebEvent to add shortcut metric based on current cell.
WebEvent getDerivedElementsEvent()
WebDrillPath getDrillPathWithHighImportance()
Obtain the Drill path with high importance information for the current cell being analyzed
WebEvent getFilterOnEvent()
Get the event for filter on the cell header instance
int getKey()
WebEvent getOpenFormatEditorEvent()
Get the event for opening the format editor for the requested target.
WebEvent getRenameEvent()
Get the event for renaming the current cell
WebEvent getSetFormatEditorTargetEvent()
Get the event for setting the current target of the format editor to be this cell instance
int getUnitType()
WebTemplateUnit getWebTemplateUnit()
Obtain the WebTemplateUnit instance associated with this class
WebTitle getWebTitle()
Obtain the WebTitle instance associated with this class
void init(TransformContext context, WebTemplateUnit unit)
This method is called to initialize the cell in design mode.
void init(WebComponent wc, FormalParameters formalParas)
This method is deprecated. This method is not used by the Transform anymore. To initialize empty cells it now uses init(TransformContext, WebTemplateUnit).
void init(WebComponent wc, WebTemplateUnit unit, HashMap cachedObjects)
This method is deprecated. please use the interface that takes Context object instances as parameter
void init(FormalParameters formalParas)
This method is deprecated. This method is not used by the Transform anymore. To initialize empty cells it now uses init(TransformContext, WebTemplateUnit).
void reset()
Reset all of the instance variables.
Protected Methods
void addContextMenuAttributes(Map atts)
Adds into the Map instance the tag attributes required for processing context menus.
boolean cellNeedsLink()
Utility method for determining if the current cell being displayed needs to be a link or not, for example, in case of drilling available.
void generateContent(MarkupOutput mo)
Extends generateContent by adding a URL link to the cell's text.
AnchorTag generateControlAnchor()
AnchorTag generateDrillAnchor()
Utility method for generating the AnchorTag instance with all the drill information if available for the current cell being displayed by this instance.
AnchorTag generateElementAnchor()
Utility method for generating the AnchorTag instance for the element being rendered .
Tag generatePivotButton(int type)
Generate the pivot button tag, according to the type of manipulation that should perform
String generateTooltipContent()
Generates the string with the tooltip information to be assigned to the TITLE attribute of the cell tag for this instance
void getCellAttributes(Map attributes)
WebTemplate getGridTemplate()
Utility method for obtaining the WebTemplate object for the grid being rendered
int getMaxPosition()
WebEvent getPivotEvent(int type)
Generate the pivot event, according to the type of manipulation that should perform
int getPosition()
WebEvent getRemoveEvent()
Generate the remove event for the currently selected object in the template.
WebEvent getSelectorEvent()
get selector Event by assigning the selected element as 'All elements'
StringBuffer getURLBuffer()
This method is deprecated. if the link information for drilling should be modified, please update the generateDrillAnchor() method.
boolean hasRuntimeUnitLimit()
abstract boolean isDrillPathAvailable(WebTitle title)
Utility method to determine if the current title has drill information available
boolean isFirst()
boolean isLast()
void setWebTemplateUnit(WebTemplateUnit unit)
Define the WebTemplateUnit instance to be rendered.
void setWebTitle(WebTitle title)
Define the WebTitle instance to be rendered.
boolean shouldHiliteOnServer()
Indicate if it's necessary to hilight the selected element on server side.
boolean showRemoveFromReport()
Determine whether to show the 'Remove from Report' option according to the objects already defined on the template.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.ReportGridCellTitle
From interface com.microstrategy.web.app.transforms.ReportGridDisplayCell

Public Constructors

public AbstractReportGridCellTitle ()

Public Methods

public boolean canAddShortcutMetric (int shortcutMetricType)

Returns whether specified shortcut metric could be created based on current cell.

Parameters
shortcutMetricType The metric type in (@link EnumShortcutMetricTypes}.

public boolean canDrillAdvanced ()

Utility methood for determining if the cell object is enabled for displaying the user the option for advanced drilling on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canEditControl ()

Utility methood for determining if the cell object is enabled for displaying the user the option to edit control

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canFilterOn ()

Utility methood for determining if the cell object is enabled for displaying the user the option to filter on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canHaveDerivedElements ()

public boolean canHyperLink ()

Utility method for determining if the cell object is enabled for displaying the user the option to navigate to custom hyperlinks

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canModifyAttributeForm ()

Utility methood for determining if the cell object is enabled for displaying the user the option to modify the attribute forms on it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canPivot (int type)

Utility methood for determining if the cell object is enabled for displaying the user the option to pivot it according to the type specified

Parameters
type value indicating which type of pivot manipulation is being tested. Values come from the PIVOT_INCREASE_POSITION, PIVOT_DECREASE_POSITION, PIVOT_SWITCH_AXIS, PIVOT_TO_PAGE_BY and PIVOT_REMOVE constants.
Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canRename ()

Utility methood for determining if the cell object is enabled for displaying the user the option to rename it

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canSort ()

Utility methood for determining if the cell object is enabled for displaying the user the option to sort it

Returns
  • boolean value indicating if the manipulation should be enabled

public WebEvent getAddShortcutMetricEvent (int shortcutMetricType)

Returns the WebEvent to add shortcut metric based on current cell.

Parameters
shortcutMetricType The metric type in (@link EnumShortcutMetricTypes}.

public WebEvent getDerivedElementsEvent ()

public WebDrillPath getDrillPathWithHighImportance ()

Obtain the Drill path with high importance information for the current cell being analyzed

Returns
  • WebDrillPath instance initialized, with the drill path with high importance information if available, otherwise returns null

public WebEvent getFilterOnEvent ()

Get the event for filter on the cell header instance

Returns
  • WebEvent instance initialized for filtering on the information of this cell

public int getKey ()

public WebEvent getOpenFormatEditorEvent ()

Get the event for opening the format editor for the requested target.

Returns
  • WebEvent initialized instance. If it could not be generated, it will return null

public WebEvent getRenameEvent ()

Get the event for renaming the current cell

Returns
  • WebEvent instance initialized with the information for renaming the current cell.

public WebEvent getSetFormatEditorTargetEvent ()

Get the event for setting the current target of the format editor to be this cell instance

Returns
  • WebEvent instance initialized for setting the target of the format editor to be the current cell instance.

public int getUnitType ()

public WebTemplateUnit getWebTemplateUnit ()

Obtain the WebTemplateUnit instance associated with this class

Returns
  • WebTemplateUnit instance from where the information to be rendered by this class will be retrieved.

public WebTitle getWebTitle ()

Obtain the WebTitle instance associated with this class

Returns
  • WebTitle instance from where the information to be rendered by this class will be retrieved.

public void init (TransformContext context, WebTemplateUnit unit)

This method is called to initialize the cell in design mode. It receives a WebTemplateUnit instance as the underlying SDK object

Parameters
context TransformContext instance initialized with the grid's transform information.
unit WebTemplateUnit instance corresponding to the cell to display.

public void init (WebComponent wc, FormalParameters formalParas)

This method is deprecated.
This method is not used by the Transform anymore. To initialize empty cells it now uses init(TransformContext, WebTemplateUnit).

Initialize the instance with the base WebComponent and formal parameter information as provided

Parameters
wc WebComponent instance
formalParas FormalParameters collection to be used for initializing the instance

public void init (WebComponent wc, WebTemplateUnit unit, HashMap cachedObjects)

This method is deprecated.
please use the interface that takes Context object instances as parameter

Initialize with the base WebComponent, the WebTemplateUnit to be rendered and a HashMap with other relevant information for this instance.

Parameters
wc WebComponent instance
unit WebTemplateUnit instance to be rendered by this class
cachedObjects HashMap with other relevant information for the initialization.

public void init (FormalParameters formalParas)

This method is deprecated.
This method is not used by the Transform anymore. To initialize empty cells it now uses init(TransformContext, WebTemplateUnit).

Initialize the instance with the formal parameter information provided.

Parameters
formalParas FormalParameters collection to be used for initializing the instance.

public void reset ()

Reset all of the instance variables. This method is very important when improve the memory performance: we create only one instance for a particular cell type and reuse it instead of creating a new instance for each concrete grid cell. Therefore, it saves a lot of memory. For implementation of this method, please follow the workflow of how all the instance variables are initialized in the class hierarchy when a new instance is created: superclass instance variables are initialized first, subclass instance variables are initialized second. Note: for the purpose of cell reuse.

Protected Methods

protected void addContextMenuAttributes (Map atts)

Adds into the Map instance the tag attributes required for processing context menus.

Parameters
atts Map where attributes will be appended.

protected boolean cellNeedsLink ()

Utility method for determining if the current cell being displayed needs to be a link or not, for example, in case of drilling available.

Returns
  • boolean value indicating if the current cell should be displayed as a link.

protected void generateContent (MarkupOutput mo)

Extends generateContent by adding a URL link to the cell's text.

Developers can either use the setContent(String) method to set any text they want to display as the cell's contents or override this method to inherit its functionality and build on top of it.

As an example, the following code could be used to extend this method to add a <BR> tag after cell's content:

 public void generateContent(MarkupOutput mo) {
     super.generateContent(mo);

     mo.append("<br>");
 }
 

Parameters
mo the output object

protected AnchorTag generateControlAnchor ()

protected AnchorTag generateDrillAnchor ()

Utility method for generating the AnchorTag instance with all the drill information if available for the current cell being displayed by this instance.

Returns
  • AnchorTag instance initialized with the drill details. If drilling is not supported given the information provided, it will return null

protected AnchorTag generateElementAnchor ()

Utility method for generating the AnchorTag instance for the element being rendered .

Returns
  • AnchorTag instance initialized with the drill details. If neither dashboarding controls nor drilling is supported given the information provided, it will return null

protected Tag generatePivotButton (int type)

Generate the pivot button tag, according to the type of manipulation that should perform

Parameters
type integer value that indicates which type of pivot action it should execute. Values come from the PIVOT_INCREASE_POSITION, PIVOT_DECREASE_POSITION, PIVOT_SWITCH_AXIS, PIVOT_TO_PAGE_BY and PIVOT_REMOVE constants.
Returns
  • Tag initialized instance with the information for the pivot manipulation. It will return null if not supported. It might return a simple IMG tag in case the manipulation shall be processed in JavaScript, or an INPUT of type IMAGE if it will be processed as part of a FORM, or an A anchor tag with an IMG inside if it's to be a button link.

protected String generateTooltipContent ()

Generates the string with the tooltip information to be assigned to the TITLE attribute of the cell tag for this instance

Returns
  • String with the information about the tooltip to render for the current cell.

protected void getCellAttributes (Map attributes)

protected WebTemplate getGridTemplate ()

Utility method for obtaining the WebTemplate object for the grid being rendered

Returns
  • WebTemplate instance corresponding to the grid being rendered.
Throws
WebBeanException if an error happens while obtaining the template
WebObjectsException if an error happens while obtaining the template

protected int getMaxPosition ()

protected WebEvent getPivotEvent (int type)

Generate the pivot event, according to the type of manipulation that should perform

Parameters
type integer value that indicates which type of pivot action it should execute. Values come from the PIVOT_INCREASE_POSITION, PIVOT_DECREASE_POSITION, PIVOT_SWITCH_AXIS and PIVOT_TO_PAGE_BY constants.
Returns
  • WebEvent initialized instance with the information for the pivot manipulation. It will return null if not supported.

protected int getPosition ()

protected WebEvent getRemoveEvent ()

Generate the remove event for the currently selected object in the template.

Returns
  • WebEvent initialized instance with the information for the remove manipulation. It will return null if not supported.

protected WebEvent getSelectorEvent ()

get selector Event by assigning the selected element as 'All elements'

protected StringBuffer getURLBuffer ()

This method is deprecated.
if the link information for drilling should be modified, please update the generateDrillAnchor() method.

Specify URL information to be used as drilling information for the title being rendered

Returns
  • StringBuffer instance

protected boolean hasRuntimeUnitLimit ()

protected abstract boolean isDrillPathAvailable (WebTitle title)

Utility method to determine if the current title has drill information available

Parameters
title WebTitle instance to analyze
Returns
  • boolean value indicating if there is drill path information available or not, for the specified title.

protected boolean isFirst ()

protected boolean isLast ()

protected void setWebTemplateUnit (WebTemplateUnit unit)

Define the WebTemplateUnit instance to be rendered.

Parameters
unit WebTemplateUnit instance from where the information to render by this class will be retrieved.

protected void setWebTitle (WebTitle title)

Define the WebTitle instance to be rendered.

Parameters
title WebTitle instance from where the information to render by this class will be retrieved.

protected boolean shouldHiliteOnServer ()

Indicate if it's necessary to hilight the selected element on server side.

protected boolean showRemoveFromReport ()

Determine whether to show the 'Remove from Report' option according to the objects already defined on the template.

Returns
  • true if should display the 'Remove from Report' option.