public class

ReportGridCellImpl

extends AbstractReportGridDisplayCell
implements ReportGridCell
java.lang.Object
   ↳ com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
     ↳ com.microstrategy.web.app.transforms.ReportGridCellImpl

Class Overview

The ReportGridCellColHeaderImpl is a simple implementation of the ReportGridDisplayCell. It's mainly used to generate the HTML for empty cells.

It extends the AbstractReportGridDisplayCell which controls the exeuction flow.

Users who intend to programatically modify the HTML generated for emty generic cells should extend this class. Using this technique developers could define their own rules of the text to display based on the WebHeader content.

The following is an example of a class that extends the generateText(MarkupOutput) method of this class to add a hyphen if the cell content is empty:
 public class CustomCellImpl extends ReportGridCellImpl

     public void generateText(MarkupOutput mo) {
         String text = getText();

         if ("".equals(text) || " ".equals(text)) {
             mo.append("-");
         } else {
             super.generateText(mo);
         }

 }
 

Summary

[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
ReportGridCellImpl()
Constructor for displaying column title in execute mode
Public Methods
boolean canHaveDerivedElements()
boolean canRemoveFromGrid()
Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the grid.
boolean canRemoveFromReport()
Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the report
WebEvent getDerivedElementsEvent()
WebEvent getFilterOnEvent()
Get the event for filter on the cell header instance
int getKey()
WebEvent getRenameEvent()
Get the event for renaming the current cell
void reset()
Reset all of the instance variables.
Protected Methods
Tag generatePivotButton(int type)
String getSortID()
This method return the ID to use for sorting this cell.
boolean hasWebObject()
This method allows the abstract class to identify whether the cell has been initialized with a valid WebObject.
[Expand]
Inherited Methods
From class com.microstrategy.web.app.transforms.AbstractReportGridDisplayCell
From class java.lang.Object
From interface com.microstrategy.web.app.transforms.ReportGridDisplayCell

Public Constructors

public ReportGridCellImpl ()

Constructor for displaying column title in execute mode

Public Methods

public boolean canHaveDerivedElements ()

public boolean canRemoveFromGrid ()

Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the grid.

Returns
  • boolean value indicating if the manipulation should be enabled

public boolean canRemoveFromReport ()

Utility methood for determining if the cell object is enabled for displaying the user the option to remove it from the report

Returns
  • boolean value indicating if the manipulation should be enabled

public WebEvent getDerivedElementsEvent ()

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 getRenameEvent ()

Get the event for renaming the current cell

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

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 Tag generatePivotButton (int type)

protected String getSortID ()

This method return the ID to use for sorting this cell.

Returns
  • The ID to use for sorting this cell.

protected boolean hasWebObject ()

This method allows the abstract class to identify whether the cell has been initialized with a valid WebObject. Some cells are created empty (with no underlying web object), they usually represent empty cells (like the ones used in design mode for metric values or row headers); in these cases some functionality needs to be disabled (liek context-menus or dnd), this method allow us to identify these cells.

Returns
  • true if the cell has underlying WebObject.