public interface

ContextMenuItemBuilder

com.microstrategy.web.app.gui.ContextMenuItemBuilder
Known Indirect Subclasses

Class Overview

Title: ContextMenuItemBuilder.

Description: This interface is used by the ContextMenu to create instances of ContextMenuItem. Each different class implementing this interface is responsible to create and populate a ContextMenuItem that will perform a particular action.

Copyright: Copyright (c) 2002

Company: Microstrategy, Inc.

Summary

Public Methods
abstract ContextMenuItem createItem(TransformContext context)
Creates and populates new instance of a ContextMenuItem.
abstract String getItemKey(TransformContext context)
Retrieve the key will be set on the context menu item corresponding to the context input.
abstract boolean isItemAvailable(TransformContext context)
Return true if the corresponding ContextMenuItem is available and should be created.

Public Methods

public abstract ContextMenuItem createItem (TransformContext context)

Creates and populates new instance of a ContextMenuItem.

Parameters
context Context Information.
Returns

public abstract String getItemKey (TransformContext context)

Retrieve the key will be set on the context menu item corresponding to the context input. The context menu item generated based on the same context input will have the same key. This method can be called by context menu before calling createItem(TransformContext) to check whether the item already exists in the menu to avoid unnecessary creation.

Parameters
context The context for context menu item creation
Returns
  • The key for the context menu item if created using the context. By default null will be return, which means build has no knowledge about the item key. Then context menu item may generate the key by itself. For builder who wants avoid unnecessary item creation should take advantage of this method by overriding with a meaningful implementation.

public abstract boolean isItemAvailable (TransformContext context)

Return true if the corresponding ContextMenuItem is available and should be created.

Parameters
context Context Information.
Returns
  • true if the corresponding ContextMenuItem can be created based on the context information