com.sapportals.htmlb.hovermenu

Class HoverMenu

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.hovermenu.HoverMenu

public class HoverMenu
extends Component

class hover menu


Field Summary
static String UI_ID
          UI ID for rendering
 
Constructor Summary
HoverMenu(String id)
           
 
Method Summary
 void addMenuItem(HoverMenuItem item)
          adds an item to the hover menu
 HoverMenuItem addMenuItem(String key, String title)
          adds a menu item with given key and title and returns the refrence to this menu item
 String getEncodedItems()
           
 String getId()
          returns the id of the hover menu
 String getItemsStatus()
           
 int getMenuDepth()
           
 HoverMenuItem getMenuItemAt(int i)
          returns the menu item at the specified position
 HoverMenuItem getMenuItemById(String Id)
           
 int getMenuItemCount()
          returns the number of the sub items of the hovermenu
 Iterator getMenuItemsIterator()
          retruns the iterator of the sub items of hover menu
 HoverMenuTrigger getMenuTrigger()
           
 String getOnHoverMenuClick()
          returns the event handler for the hover menu click event
 HoverMenuItem getParentItem()
          returns the parent item for this hovermenu if there is any
 IHoverMenuRenderer getRenderer()
          returns the renderer for the hovermenu
 IHoverMenuRootComponent getRootComponent()
          returns the root component for the hover menu
 String getUI()
          returns the ui id for finding the approprite renderer class
 boolean hasCheckableItems()
           
 boolean hasRootComponent()
          checks if the hover menu has a root component
protected  void initFromPageContext(IPageContext pc, String baseId)
          internal use only.
 boolean isFirstLevelInvisible()
          Deprecated. Use .
 boolean isFirstLevelVisible()
           
 boolean requiresForm()
          determines if the hover menu requires a form or not
 void setFirstLevelnvisible(boolean firstLevelInvisible)
          Deprecated. Use
 void setFirstLevelVisible(boolean firstLevelVisible)
           
 void setId(String id)
          sets the id of the hover menu
 void setMenuTrigger(HoverMenuTrigger trigger)
           
 void setOnHoverMenuClick(String onHoverMenuClick)
          event handler for the hover menu click event
protected  void setParentItem(HoverMenuItem parentItem)
          sets the parent item for the hover menu
 void setRenderer(IHoverMenuRenderer renderer)
          sets the renderer for the hover menu
 void setRequiresForm(boolean requiresForm)
          determines if the hover menu requires a form or not
 void setRootComponent(IHoverMenuRootComponent rootComponent)
          sets the root component for the hover menu, only used within the package
 void updateItemStatus(HoverMenu menu)
           
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getParent, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
UI ID for rendering

See Also:
Constant Field Values
Constructor Detail

HoverMenu

public HoverMenu(String id)
Parameters:
id - @todo: Description of the incoming method parameter
Method Detail

setId

public void setId(String id)
sets the id of the hover menu

Overrides:
setId in class Component
Parameters:
id - The new Id value

setRenderer

public void setRenderer(IHoverMenuRenderer renderer)
sets the renderer for the hover menu

Parameters:
renderer - The new Renderer value

setOnHoverMenuClick

public void setOnHoverMenuClick(String onHoverMenuClick)
event handler for the hover menu click event

Parameters:
onHoverMenuClick - The new OnHoverMenuClick value

getUI

public String getUI()
returns the ui id for finding the approprite renderer class

Specified by:
getUI in class Component
Returns:
The UI value
See Also:
com.saportals.rendering.RendererManager

getId

public String getId()
returns the id of the hover menu

Overrides:
getId in class Component
Returns:
The Id value

getMenuItemAt

public HoverMenuItem getMenuItemAt(int i)
returns the menu item at the specified position

Parameters:
i - @todo: Description of the incoming method parameter
Returns:
The MenuItemAt value

getMenuItemCount

public int getMenuItemCount()
returns the number of the sub items of the hovermenu

Returns:
The MenuItemCount value

getMenuItemsIterator

public Iterator getMenuItemsIterator()
retruns the iterator of the sub items of hover menu

Returns:
The MenuItemsIterator value

getRenderer

public IHoverMenuRenderer getRenderer()
returns the renderer for the hovermenu

Returns:
The Renderer value

getOnHoverMenuClick

public String getOnHoverMenuClick()
returns the event handler for the hover menu click event

Returns:
The OnHoverMenuClick value

getRootComponent

public IHoverMenuRootComponent getRootComponent()
returns the root component for the hover menu

Returns:
The RootComponent value

getParentItem

public HoverMenuItem getParentItem()
returns the parent item for this hovermenu if there is any

Returns:
The ParentItem value

addMenuItem

public void addMenuItem(HoverMenuItem item)
adds an item to the hover menu

Parameters:
item - MenuItem to be added

addMenuItem

public HoverMenuItem addMenuItem(String key,
                                 String title)
adds a menu item with given key and title and returns the refrence to this menu item

Parameters:
key - MenuItem to be added
title - MenuItem to be added
Returns:
@todo: Description of the outgoing return value

hasRootComponent

public boolean hasRootComponent()
checks if the hover menu has a root component

Returns:
@todo: Description of the outgoing return value

setRootComponent

public void setRootComponent(IHoverMenuRootComponent rootComponent)
sets the root component for the hover menu, only used within the package

Parameters:
rootComponent - The new RootComponent value

setParentItem

protected void setParentItem(HoverMenuItem parentItem)
sets the parent item for the hover menu

Parameters:
parentItem - The new ParentItem value

getMenuTrigger

public HoverMenuTrigger getMenuTrigger()

setMenuTrigger

public void setMenuTrigger(HoverMenuTrigger trigger)

isFirstLevelInvisible

public boolean isFirstLevelInvisible()
Deprecated. Use .


setFirstLevelnvisible

public void setFirstLevelnvisible(boolean firstLevelInvisible)
Deprecated. Use


isFirstLevelVisible

public boolean isFirstLevelVisible()

setFirstLevelVisible

public void setFirstLevelVisible(boolean firstLevelVisible)

getMenuDepth

public int getMenuDepth()

initFromPageContext

protected void initFromPageContext(IPageContext pc,
                                   String baseId)
Description copied from class: Component
internal use only. Components should override this method to analyse the parameters from the request object (via IPageContext) and set their internal data structures accordingly.

Overrides:
initFromPageContext in class Component
Parameters:
pc - the context, including the parameters
baseId - the prefix used for the component. (The result of a former RenderUtil.getIdForForm(rc, c);)

getEncodedItems

public String getEncodedItems()

getItemsStatus

public String getItemsStatus()

updateItemStatus

public void updateItemStatus(HoverMenu menu)

getMenuItemById

public HoverMenuItem getMenuItemById(String Id)

requiresForm

public boolean requiresForm()
determines if the hover menu requires a form or not

Overrides:
requiresForm in class Component
Returns:
true if the component must be placed in a form.

setRequiresForm

public void setRequiresForm(boolean requiresForm)
determines if the hover menu requires a form or not


hasCheckableItems

public boolean hasCheckableItems()


Copyright 2006 SAP AG Complete Copyright Notice