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

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
 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(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 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