com.sapportals.htmlb.toolbar

Class ToolbarButton

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.EventValidationComponent
          extended bycom.sapportals.htmlb.toolbar.ToolbarButton
All Implemented Interfaces:
IEventValidationComponent, com.sapportals.htmlb.IJavascriptComponent

public class ToolbarButton
extends EventValidationComponent


Field Summary
static String UI_ID
           
 
Constructor Summary
ToolbarButton(String id)
          creates a toolbar button with a specific id
ToolbarButton(String id, String text)
          creates a toolbar button with a specific id and text
 
Method Summary
 boolean getEnabled()
          Deprecated. returns the enabling state for the button
 String getImageAlt()
           
 String getOnClick()
          get the event name that is fired when the user clicks on this button
 String getOnClientClick()
          get the JavaScript fragment that is executed on the client side if the user clicks on the button
 String getText()
          returns the text for the buton
 com.sapportals.htmlb.enum.ForcedTextDirection getTextDirection()
          Gets the text direction for the component
 String getTooltip()
          returns the tooltip for the buton
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 String getWidth()
          returns the width for the buton
 void setImageAlt(String imageAlt)
           
 void setOnClick(String onClick)
          set the event name that is fired when the user clicks on this button
 void setOnClientClick(String onClientClick)
          set a Javascript fragment that is executed when the user clicks on this button
 void setText(String text)
          sets the text for the button
 void setTextDirection(com.sapportals.htmlb.enum.ForcedTextDirection textDirection)
          Sets the text direction for the component
 void setTooltip(String tooltip)
          sets the tooltip for the button
 void setWidth(String width)
          sets the width for the button
 
Methods inherited from class com.sapportals.htmlb.EventValidationComponent
getAllValidators, getClientEvent, getClientEventMap, getErrorText, getServerEvent, getServerEventMap, getValidator, isDisabled, isEnabled, isRequiresValidation, renderJavascriptInterface, setClientEvent, setDisabled, setEnabled, setErrorText, setRequiresValidation, setServerEvent, setValidator
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, requiresForm, setId, 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

ToolbarButton

public ToolbarButton(String id)
creates a toolbar button with a specific id

Parameters:
id - the id for this toolbar button

ToolbarButton

public ToolbarButton(String id,
                     String text)
creates a toolbar button with a specific id and text

Parameters:
id - the ID for this toolbar button
text - the text for this toolbar button
Method Detail

getText

public String getText()
returns the text for the buton

Returns:
the button text

setText

public void setText(String text)
sets the text for the button

Parameters:
text - the button text

getTooltip

public String getTooltip()
returns the tooltip for the buton

Returns:
the button tooltip

setTooltip

public void setTooltip(String tooltip)
sets the tooltip for the button


getWidth

public String getWidth()
returns the width for the buton

Returns:
the button text

setWidth

public void setWidth(String width)
sets the width for the button

Parameters:
width - the button width

getEnabled

public boolean getEnabled()
Deprecated. returns the enabling state for the button

Returns:
the button state

getOnClick

public String getOnClick()
get the event name that is fired when the user clicks on this button

Returns:
the event name

setOnClick

public void setOnClick(String onClick)
set the event name that is fired when the user clicks on this button

Parameters:
onClick - the name of the event

getOnClientClick

public String getOnClientClick()
get the JavaScript fragment that is executed on the client side if the user clicks on the button

Returns:
the JavaScript fragment.

setOnClientClick

public void setOnClientClick(String onClientClick)
set a Javascript fragment that is executed when the user clicks on this button

Parameters:
onClientClick - the Javascript

getUI

public String getUI()
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

getImageAlt

public String getImageAlt()

setImageAlt

public void setImageAlt(String imageAlt)

getTextDirection

public com.sapportals.htmlb.enum.ForcedTextDirection getTextDirection()
Gets the text direction for the component

Returns:
com.sapportals.htmlb.enum.ForcedTextDirection

setTextDirection

public void setTextDirection(com.sapportals.htmlb.enum.ForcedTextDirection textDirection)
Sets the text direction for the component

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


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.