com.sapportals.htmlb.hovermenu

Class HoverMenuItem

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

public class HoverMenuItem
extends Component


Field Summary
static String UI_ID
           
 
Constructor Summary
HoverMenuItem(String id, String text)
           
HoverMenuItem(String text, String id, String imgSrc)
           
 
Method Summary
 HoverMenu addSubHoverMenu(String id)
          creates a new hover menu with the given id and sets this hover menu as the sub menu to this menu item
 String getAltTextForImage()
          return the alt text for the image used within the hover menu
 String getClientSideScript()
          returns the client-side script to be run
 String getDisabledImgSrc()
          sets the disables Image for the item
 String getId()
          returns the key for the item
 String getImgSrc()
          returns the image src
 String getLinkReference()
          returns the link reference for an item
 String getLinkTarget()
          returns the link click target for an item
 String getOnItemClick()
          event handler for the item click event
 HoverMenu getParentMenu()
          returns the parent hover menu for this item
 HoverMenu getSubMenu()
          returns the sub hover menu to the
 String getText()
          returns the title of the hovermenu item
 ForcedTextDirection getTextDirection()
          Gets the text direction for the component
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 boolean hasHoverItemDivider()
          check if the item has a devider
 boolean isCheckable()
          determines if the item is checkable
 boolean isChecked()
          determines if the item is checked or not
 boolean isDisabled()
          determines if the hovermenu item is disabled or not
 boolean isEnabled()
          determines if the hovermenu item is enabled or not
 void setAltTextForImage(String altTextForImage)
          sets the alt text for the image used within the menu item
 void setCheckable(boolean checkable)
          sets the item to be checkable
 void setChecked(boolean checked)
          sets the checked/unchecked status of the item
 void setClientSideScript(String clientSideScript)
          sets the client-side script to be run
 void setDisabled(boolean disabled)
          Deprecated. Use setEnabled(boolean).
 void setDisabledImgSrc(String disabledImgSrc)
          returns the disabled image for the item
 void setEnabled(boolean enabled)
          enable the hover menu item
 void setHoverItemDivider(boolean hoverItemDivider)
          determines if the item has a devider, the divider will be displayed before the item.
 void setId(String id)
          sets the key for the menu item
 void setImgSrc(String imgSrc)
          sets the image src for the menu item
 void setLinkReference(String linkRef)
          sets the link refernce for an item
 void setLinkTarget(String target)
          sets the link click target for an item
 void setOnItemClick(String onItemClicked)
          sets the event handler for the item click event
protected  void setParentMenu(HoverMenu parent)
          sets the parent menu
 void setSubHoverMenu(HoverMenu menu)
          sets a given hover menu as the sub hover menu of the item
 void setText(String text)
          sets the title for the menu item
 void setTextDirection(ForcedTextDirection textDirection)
          Sets the text direction for the component
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, requiresForm, 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
See Also:
Constant Field Values
Constructor Detail

HoverMenuItem

public HoverMenuItem(String id,
                     String text)

HoverMenuItem

public HoverMenuItem(String text,
                     String id,
                     String imgSrc)
Method Detail

getUI

public String getUI()
Description copied from class: Component
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
a unique identification string for this Component

getText

public String getText()
returns the title of the hovermenu item


setText

public void setText(String text)
sets the title for the menu item


getId

public String getId()
returns the key for the item

Overrides:
getId in class Component
Returns:
the name of this component

setId

public void setId(String id)
sets the key for the menu item

Overrides:
setId in class Component
Parameters:
id - the name of this component

setSubHoverMenu

public void setSubHoverMenu(HoverMenu menu)
sets a given hover menu as the sub hover menu of the item


addSubHoverMenu

public HoverMenu addSubHoverMenu(String id)
creates a new hover menu with the given id and sets this hover menu as the sub menu to this menu item


getSubMenu

public HoverMenu getSubMenu()
returns the sub hover menu to the


hasHoverItemDivider

public boolean hasHoverItemDivider()
check if the item has a devider


setHoverItemDivider

public void setHoverItemDivider(boolean hoverItemDivider)
determines if the item has a devider, the divider will be displayed before the item.


getOnItemClick

public String getOnItemClick()
event handler for the item click event


setOnItemClick

public void setOnItemClick(String onItemClicked)
sets the event handler for the item click event


getLinkReference

public String getLinkReference()
returns the link reference for an item


setLinkReference

public void setLinkReference(String linkRef)
sets the link refernce for an item


getClientSideScript

public String getClientSideScript()
returns the client-side script to be run


setClientSideScript

public void setClientSideScript(String clientSideScript)
sets the client-side script to be run


getLinkTarget

public String getLinkTarget()
returns the link click target for an item


setLinkTarget

public void setLinkTarget(String target)
sets the link click target for an item


getParentMenu

public HoverMenu getParentMenu()
returns the parent hover menu for this item


setParentMenu

protected void setParentMenu(HoverMenu parent)
sets the parent menu


isDisabled

public boolean isDisabled()
determines if the hovermenu item is disabled or not


setDisabled

public void setDisabled(boolean disabled)
Deprecated. Use setEnabled(boolean).

disable the hovermenu item


isEnabled

public boolean isEnabled()
determines if the hovermenu item is enabled or not


setEnabled

public void setEnabled(boolean enabled)
enable the hover menu item


getImgSrc

public String getImgSrc()
returns the image src


setImgSrc

public void setImgSrc(String imgSrc)
sets the image src for the menu item


getAltTextForImage

public String getAltTextForImage()
return the alt text for the image used within the hover menu


setAltTextForImage

public void setAltTextForImage(String altTextForImage)
sets the alt text for the image used within the menu item


getDisabledImgSrc

public String getDisabledImgSrc()
sets the disables Image for the item


setDisabledImgSrc

public void setDisabledImgSrc(String disabledImgSrc)
returns the disabled image for the item


isCheckable

public boolean isCheckable()
determines if the item is checkable


setCheckable

public void setCheckable(boolean checkable)
sets the item to be checkable


isChecked

public boolean isChecked()
determines if the item is checked or not


setChecked

public void setChecked(boolean checked)
sets the checked/unchecked status of the item


getTextDirection

public ForcedTextDirection getTextDirection()
Gets the text direction for the component

Returns:
com.sapportals.htmlb.enum.ForcedTextDirection

setTextDirection

public void setTextDirection(ForcedTextDirection textDirection)
Sets the text direction for the component

Parameters:
textDirection - com.sapportals.htmlb.enum.ForcedTextDirection


Copyright 2006 SAP AG Complete Copyright Notice