com.sap.ui.commons.client
Class ButtonWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.commons.client.ButtonWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
MenuButtonWidget

public class ButtonWidget
extends com.sap.ui.core.client.ControlWidget

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 AG)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  ButtonWidget()
          constructs the class ButtonWidget
protected ButtonWidget(Button control)
          constructs the class ButtonWidget
  ButtonWidget(String id)
          constructs the class ButtonWidget
 
Method Summary
 void attachPressEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the user presses the control.
 void 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.
 Button getControl()
          returns the reference to the Phoenix 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.
 void setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 void setHeight(String value)
          Setter for property height
 void setHelpId(String value)
          Setter for property helpId
Default value is: ''
 void setIcon(String value)
          Setter for property icon
Default value is: ''
 void setIconFirst(boolean value)
          Setter for property iconFirst
Default value is: true
 void setText(String value)
          Setter for property text
Default value is: ''
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void setWidth(String value)
          Setter for property width
 
Methods inherited from class com.sap.ui.core.client.ControlWidget
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ButtonWidget

public ButtonWidget()
constructs the class ButtonWidget


ButtonWidget

public ButtonWidget(String id)
constructs the class ButtonWidget

Parameters:
id - id of the ButtonWidget

ButtonWidget

protected ButtonWidget(Button control)
constructs the class ButtonWidget

Parameters:
control - reference to an existing Button
Method Detail

getControl

public Button getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class com.sap.ui.core.client.ControlWidget
Returns:
reference to the Phoenix Control

getText

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

Returns:
the value of property text

setText

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

Parameters:
value - String

isEnabled

public 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 void setEnabled(boolean value)
Setter for property enabled
Default value is: true

Parameters:
value - boolean

isVisible

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

Overrides:
isVisible in class com.google.gwt.user.client.ui.UIObject
Returns:
the value of property visible

setVisible

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

Overrides:
setVisible in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - boolean

getWidth

public 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 void setWidth(String value)
Setter for property width

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getHelpId

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

Returns:
the value of property helpId

setHelpId

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

Parameters:
value - String

getIcon

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

Returns:
the value of property icon

setIcon

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

Parameters:
value - String

isIconFirst

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

Returns:
the value of property iconFirst

setIconFirst

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

Parameters:
value - boolean

getHeight

public 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 void setHeight(String value)
Setter for property height

Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

attachPressEvent

public void 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

detachPressEvent

public void 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

focus

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



Copyright © 2011 SAP. All Rights Reserved.