com.sapportals.wcm.rendering.uicommand

Class AbstractUIMenu

java.lang.Object
  extended bycom.sapportals.wcm.rendering.uicommand.AbstractUIMenu
All Implemented Interfaces:
IUIMenu
Direct Known Subclasses:
UIButtonMenu, UIHoverMenu, UIIconMenu, UILinkMenu, UIMenuBar, UISmallButtonMenu, UITabMenu, UIToolbarButtonMenu, UIVerticalLinkMenu

public abstract class AbstractUIMenu
extends Object
implements IUIMenu

This class can be used by IUIMenus to reduce coding overhead.


Field Summary
 
Fields inherited from interface com.sapportals.wcm.rendering.uicommand.IUIMenu
BUTTON_MENU_TYPE, HOVER_MENU_TYPE, ICON_MENU_TYPE, LINK_MENU_TYPE, MENU_BAR_TYPE, SMALL_BUTTON_MENU_TYPE, TAB_MENU_TYPE, TOOLBAR_BUTTON_MENU_TYPE, VERTICAL_LINK_MENU_TYPE
 
Constructor Summary
AbstractUIMenu()
           
 
Method Summary
 String createTarget(IExecCommand command, AbstractProxyControl proxy)
          Creates a unique Id as String where are encoded the IExecCommand data
 String createTarget(IMassExecCommand command, AbstractProxyControl proxy)
          Creates a unique Id as String where are encoded the IUIMassExecCommand data
 String createTarget(IUIGroupCommand group, AbstractProxyControl proxy)
          Creates a unique Id as String where are encoded the IUIGroupCommand data
protected  Component getCommandLink(IExecCommand command, AbstractProxyControl proxy, boolean renderDots)
           
protected  Component getCommandLink(IResource resource, IExecCommand command, AbstractProxyControl proxy, boolean renderDots)
           
protected  String getLinkLabel(String commandLabel)
          Take out the '...' ending from the IExecCommand labels
protected  boolean renderGroup(IUIGroupCommand group, HoverMenu hoverMenu, IResource resource, AbstractProxyControl proxy, boolean showSeparator, boolean groupExpanded, boolean groupIncluded)
          Creates a hover menu component according with the input parameters
 HoverMenu renderHoverMenu(IUIGroupCommand group, IResource resource, AbstractProxyControl proxy)
          Render a hover menu for a IUIGroupCommand given
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sapportals.wcm.rendering.uicommand.IUIMenu
getMenuType, getNewInstance, renderMenu
 

Constructor Detail

AbstractUIMenu

public AbstractUIMenu()
Method Detail

renderHoverMenu

public HoverMenu renderHoverMenu(IUIGroupCommand group,
                                 IResource resource,
                                 AbstractProxyControl proxy)
                          throws WcmException
Render a hover menu for a IUIGroupCommand given

Parameters:
resource - the IResource for which the component is requiered
proxy - the Control that called this method. It is set as parameter for the retrieved instance
group - Description of the param
Returns:
the resulted component
Throws:
WcmException - Description of the Exception

renderGroup

protected boolean renderGroup(IUIGroupCommand group,
                              HoverMenu hoverMenu,
                              IResource resource,
                              AbstractProxyControl proxy,
                              boolean showSeparator,
                              boolean groupExpanded,
                              boolean groupIncluded)
                       throws WcmException
Creates a hover menu component according with the input parameters

Parameters:
resource - the IResource for which the component is requiered
proxy - the Control that called this method. It is set as parameter for the retrieved instance
group - the given IUICommandGroup
hoverMenu - the parrent HoverMenu
showSeparator - true if a hover separator is needed
groupExpanded - true if a parent IUICommandGroup is expanded
Returns:
true if is needed a hover sepatator
Throws:
WcmException - Description of the Exception

createTarget

public String createTarget(IUIGroupCommand group,
                           AbstractProxyControl proxy)
                    throws WcmException
Creates a unique Id as String where are encoded the IUIGroupCommand data

Parameters:
proxy - the Control that called this method.
group - Description of the param
Returns:
an unique id
Throws:
WcmException - Description of the Exception

createTarget

public String createTarget(IExecCommand command,
                           AbstractProxyControl proxy)
                    throws WcmException
Creates a unique Id as String where are encoded the IExecCommand data

Parameters:
command - the IExecCommand
proxy - the Control that called this method.
Returns:
an unique id
Throws:
WcmException - Description of the Exception

createTarget

public String createTarget(IMassExecCommand command,
                           AbstractProxyControl proxy)
                    throws WcmException
Creates a unique Id as String where are encoded the IUIMassExecCommand data

Parameters:
command - the IUIMassExecCommand
proxy - the Control that called this method.
Returns:
an unique id
Throws:
WcmException - Description of the Exception

getCommandLink

protected Component getCommandLink(IExecCommand command,
                                   AbstractProxyControl proxy,
                                   boolean renderDots)

getCommandLink

protected Component getCommandLink(IResource resource,
                                   IExecCommand command,
                                   AbstractProxyControl proxy,
                                   boolean renderDots)

getLinkLabel

protected String getLinkLabel(String commandLabel)
Take out the '...' ending from the IExecCommand labels

Parameters:
commandLabel - the IExecCommand's label as String
Returns:
the label without '...' ending


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.