com.sap.ui.commons.client
Class Button

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.Button
All Implemented Interfaces:
ToolbarItem
Direct Known Subclasses:
MenuButton

public class Button
extends com.sap.ui.core.client.Control
implements ToolbarItem

The class Button is the GWT wrapper for the Phoenix control: sap.ui.commons.Button.

Using the button control you enable end users to trigger actions such as Save or Print. For the button UI, you can define some text or an icon, or both.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.Button)

Constructor Summary
protected Button()
          constructs the class Button
hidden due to JavaScriptObject restriction
 
Method Summary
 Button attachPressEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the user presses the control.
static Button create()
          creates a new instance of the class Button
static Button create(String idOrConfig)
          creates a new instance of the class Button
static Button create(String id, String config)
          creates a new instance of the class Button
 Button detachPressEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the user presses the control.
 void focus()
          Puts the focus into the control.
 String getHeight()
          Getter for property height The height of the Button.
 String getHelpId()
          Getter for property helpId Unique identifier used for help service.
 String getIcon()
          Getter for property icon Icon displayed within the control at runtime.
 String getText()
          Getter for property text Control text displayed at runtime.
 String getWidth()
          Getter for property width Control width as common CSS-size (px or % as unit, for example).
 boolean isEnabled()
          Getter for property enabled Disabled buttons have other colors than enabled ones, depending on customer settings.
 boolean isIconFirst()
          Getter for property iconFirst The display sequence is 1.icon 2.control text.
 boolean isVisible()
          Getter for property visible Invisible buttons are not rendered.
 Button setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 Button setHeight(String value)
          Setter for property height
 Button setHelpId(String value)
          Setter for property helpId
Default value is: ''
 Button setIcon(String value)
          Setter for property icon
Default value is: ''
 Button setIconFirst(boolean value)
          Setter for property iconFirst
Default value is: true
 Button setText(String value)
          Setter for property text
Default value is: ''
 Button setVisible(boolean value)
          Setter for property visible
Default value is: true
 Button setWidth(String value)
          Setter for property width
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Button

protected Button()
constructs the class Button
hidden due to JavaScriptObject restriction

Method Detail

create

public static Button create()
creates a new instance of the class Button


create

public static Button create(String idOrConfig)
creates a new instance of the class Button

Parameters:
id - id of the Button or configuration JSON string

create

public static Button create(String id,
                            String config)
creates a new instance of the class Button

Parameters:
id - id of the Button
config - configuration JSON string

getText

public final String getText()
Getter for property text Control text displayed at runtime.

Returns:
the value of property text

setText

public final Button setText(String value)
Setter for property text
Default value is: ''

Parameters:
value - String
Returns:
this to allow method chaining

isEnabled

public final boolean isEnabled()
Getter for property enabled Disabled buttons have other colors than enabled ones, depending on customer settings.

Returns:
the value of property enabled

setEnabled

public final Button setEnabled(boolean value)
Setter for property enabled
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

isVisible

public final boolean isVisible()
Getter for property visible Invisible buttons are not rendered.

Returns:
the value of property visible

setVisible

public final Button setVisible(boolean value)
Setter for property visible
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

getWidth

public final String getWidth()
Getter for property width Control width as common CSS-size (px or % as unit, for example).

Returns:
the value of property width

setWidth

public final Button setWidth(String value)
Setter for property width

Parameters:
value - String
Returns:
this to allow method chaining

getHelpId

public final String getHelpId()
Getter for property helpId Unique identifier used for help service.

Returns:
the value of property helpId

setHelpId

public final Button setHelpId(String value)
Setter for property helpId
Default value is: ''

Parameters:
value - String
Returns:
this to allow method chaining

getIcon

public final String getIcon()
Getter for property icon Icon displayed within the control at runtime.

Returns:
the value of property icon

setIcon

public final Button setIcon(String value)
Setter for property icon
Default value is: ''

Parameters:
value - String
Returns:
this to allow method chaining

isIconFirst

public final boolean isIconFirst()
Getter for property iconFirst The display sequence is 1.icon 2.control text.

Returns:
the value of property iconFirst

setIconFirst

public final Button setIconFirst(boolean value)
Setter for property iconFirst
Default value is: true

Parameters:
value - boolean
Returns:
this to allow method chaining

getHeight

public final String getHeight()
Getter for property height The height of the Button. NOTE: if this property is set, the height defined by the theme is not used anymore! The themes, however, define the official SAP design, so this property should only be used in justified special cases.

Returns:
the value of property height

setHeight

public final Button setHeight(String value)
Setter for property height

Parameters:
value - String
Returns:
this to allow method chaining

attachPressEvent

public final Button attachPressEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is fired when the user presses the control.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachPressEvent

public final Button detachPressEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is fired when the user presses the control.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

focus

public final void focus()
Puts the focus into the control.



Copyright © 2011 SAP. All Rights Reserved.