com.sap.ui.commons.client
Class TextFieldWidget

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.TextFieldWidget
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:
ComboBoxWidget, DatePickerWidget, PasswordFieldWidget, TextAreaWidget

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

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

Control is used to enter text.

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
  TextFieldWidget()
          constructs the class TextFieldWidget
  TextFieldWidget(String id)
          constructs the class TextFieldWidget
protected TextFieldWidget(TextField control)
          constructs the class TextFieldWidget
 
Method Summary
 void attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.
 void bindValue(String path)
          Binder for property value.
 void bindValue(String path, com.sap.ui.core.client.Formatter formatter)
          Binder for property value.
 void detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.
 void focus()
          Puts the focus to this control.
 String getAccessibleDescription()
          Getter for property accessibleDescription Accessibility description for the text field.
 String getAccessibleName()
          Getter for property accessibleName Accessibility name for the text field.
 com.sap.ui.core.client.AccessibleRole getAccessibleRole()
          Getter for property accessibleRole Accessibility role for the text field.
 TextField getControl()
          returns the reference to the Phoenix Control
 com.sap.ui.core.client.Design getDesign()
          Getter for property design Font type.
 String getHelpId()
          Getter for property helpId Unique identifier used for help service.
 com.sap.ui.core.client.ImeMode getImeMode()
          Getter for property imeMode State of the Input Method Editor (IME).
 int getMaxLength()
          Getter for property maxLength Maximum number of characters.
 com.sap.ui.core.client.TextAlign getTextAlign()
          Getter for property textAlign Sets the horizontal alignment of the text.
 com.sap.ui.core.client.TextDirection getTextDirection()
          Getter for property textDirection Direction of the text.
 String getValue()
          Getter for property value Text inside the textfield
 com.sap.ui.core.client.ValueState getValueState()
          Getter for property valueState Visualizes warnings or errors related to the text field.
 String getWidth()
          Getter for property width Width of text field.
 boolean isEditable()
          Getter for property editable Switches edit state of the control.
 boolean isEnabled()
          Getter for property enabled Switches enabled state of the control.
 boolean isRequired()
          Getter for property required Depending on theme the TextField is shown as required.
 boolean isVisible()
          Getter for property visible Invisible controls are not rendered.
 void setAccessibleDescription(String value)
          Setter for property accessibleDescription
Default value is: ''
 void setAccessibleName(String value)
          Setter for property accessibleName
Default value is: ''
 void setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
          Setter for property accessibleRole
Default value is: Textbox
 void setDesign(com.sap.ui.core.client.Design value)
          Setter for property design
Default value is: Standard
 void setEditable(boolean value)
          Setter for property editable
Default value is: true
 void setEnabled(boolean value)
          Setter for property enabled
Default value is: true
 void setHelpId(String value)
          Setter for property helpId
Default value is: ''
 void setImeMode(com.sap.ui.core.client.ImeMode value)
          Setter for property imeMode
Default value is: Auto
 void setMaxLength(int value)
          Setter for property maxLength
Default value is: 0
 void setRequired(boolean value)
          Setter for property required
Default value is: false
 void setTextAlign(com.sap.ui.core.client.TextAlign value)
          Setter for property textAlign
Default value is: Begin
 void setTextDirection(com.sap.ui.core.client.TextDirection value)
          Setter for property textDirection
Default value is: Inherit
 void setValue(String value)
          Setter for property value
Default value is: ''
 void setValueState(com.sap.ui.core.client.ValueState value)
          Setter for property valueState
Default value is: None
 void setVisible(boolean value)
          Setter for property visible
Default value is: true
 void setWidth(String value)
          Setter for property width
 void unbindValue()
          Unbinder for property value.
 
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, setHeight, 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

TextFieldWidget

public TextFieldWidget()
constructs the class TextFieldWidget


TextFieldWidget

public TextFieldWidget(String id)
constructs the class TextFieldWidget

Parameters:
id - id of the TextFieldWidget

TextFieldWidget

protected TextFieldWidget(TextField control)
constructs the class TextFieldWidget

Parameters:
control - reference to an existing TextField
Method Detail

getControl

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

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

getValue

public String getValue()
Getter for property value Text inside the textfield

Returns:
the value of property value

setValue

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

Parameters:
value - String

bindValue

public final void bindValue(String path)
Binder for property value.

Parameters:
path - path to a property in the model

bindValue

public final void bindValue(String path,
                            com.sap.ui.core.client.Formatter formatter)
Binder for property value.

Parameters:
path - path to a property in the model
formatter - an optional Formatter function for the value

unbindValue

public final void unbindValue()
Unbinder for property value.


getTextDirection

public com.sap.ui.core.client.TextDirection getTextDirection()
Getter for property textDirection Direction of the text. Possible values: rtl, ltr.

Returns:
the value of property textDirection

setTextDirection

public void setTextDirection(com.sap.ui.core.client.TextDirection value)
Setter for property textDirection
Default value is: Inherit

Parameters:
value - com.sap.ui.core.client.TextDirection

isEnabled

public boolean isEnabled()
Getter for property enabled Switches enabled state of the control. Disabled fields have different colors, and can not be focused.

Returns:
the value of property enabled

setEnabled

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

Parameters:
value - boolean

isEditable

public boolean isEditable()
Getter for property editable Switches edit state of the control. Read-only fields have different colors, depending on customer setting.

Returns:
the value of property editable

setEditable

public void setEditable(boolean value)
Setter for property editable
Default value is: true

Parameters:
value - boolean

isVisible

public boolean isVisible()
Getter for property visible Invisible controls 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

isRequired

public boolean isRequired()
Getter for property required Depending on theme the TextField is shown as required.

Returns:
the value of property required

setRequired

public void setRequired(boolean value)
Setter for property required
Default value is: false

Parameters:
value - boolean

getWidth

public String getWidth()
Getter for property width Width of text field. When it is set (CSS-size such as % or px), this is the exact size. When left blank, the text field length defines the width.

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

getMaxLength

public int getMaxLength()
Getter for property maxLength Maximum number of characters. Value '0' means the feature is switched off.

Returns:
the value of property maxLength

setMaxLength

public void setMaxLength(int value)
Setter for property maxLength
Default value is: 0

Parameters:
value - int

getValueState

public com.sap.ui.core.client.ValueState getValueState()
Getter for property valueState Visualizes warnings or errors related to the text field. Possible values: Warning, Error, Success.

Returns:
the value of property valueState

setValueState

public void setValueState(com.sap.ui.core.client.ValueState value)
Setter for property valueState
Default value is: None

Parameters:
value - com.sap.ui.core.client.ValueState

getTextAlign

public com.sap.ui.core.client.TextAlign getTextAlign()
Getter for property textAlign Sets the horizontal alignment of the text.

Returns:
the value of property textAlign

setTextAlign

public void setTextAlign(com.sap.ui.core.client.TextAlign value)
Setter for property textAlign
Default value is: Begin

Parameters:
value - com.sap.ui.core.client.TextAlign

getImeMode

public com.sap.ui.core.client.ImeMode getImeMode()
Getter for property imeMode State of the Input Method Editor (IME).

Returns:
the value of property imeMode

setImeMode

public void setImeMode(com.sap.ui.core.client.ImeMode value)
Setter for property imeMode
Default value is: Auto

Parameters:
value - com.sap.ui.core.client.ImeMode

getDesign

public com.sap.ui.core.client.Design getDesign()
Getter for property design Font type. Standard, Monospace

Returns:
the value of property design

setDesign

public void setDesign(com.sap.ui.core.client.Design value)
Setter for property design
Default value is: Standard

Parameters:
value - com.sap.ui.core.client.Design

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

getAccessibleRole

public com.sap.ui.core.client.AccessibleRole getAccessibleRole()
Getter for property accessibleRole Accessibility role for the text field.

Returns:
the value of property accessibleRole

setAccessibleRole

public void setAccessibleRole(com.sap.ui.core.client.AccessibleRole value)
Setter for property accessibleRole
Default value is: Textbox

Parameters:
value - com.sap.ui.core.client.AccessibleRole

getAccessibleDescription

public String getAccessibleDescription()
Getter for property accessibleDescription Accessibility description for the text field.

Returns:
the value of property accessibleDescription

setAccessibleDescription

public void setAccessibleDescription(String value)
Setter for property accessibleDescription
Default value is: ''

Parameters:
value - String

getAccessibleName

public String getAccessibleName()
Getter for property accessibleName Accessibility name for the text field.

Returns:
the value of property accessibleName

setAccessibleName

public void setAccessibleName(String value)
Setter for property accessibleName
Default value is: ''

Parameters:
value - String

attachChangeEvent

public void attachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.
Event Parameters:
{string} newValue The new / changed value of the textfield.

Parameters:
listener - reference to the EventListener

detachChangeEvent

public void detachChangeEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is fired when the text in the field has changed AND the focus leaves the TextField or the Enter key is pressed.

Parameters:
listener - reference to the EventListener

focus

public void focus()
Puts the focus to this control.



Copyright © 2011 SAP. All Rights Reserved.