Class Index | File Index

Classes


Class zwt.ui.TextField


Extends zwt.ui.Widget.

A text field object.

CSS rules

.zwt_textField {}

Defined in: TextField.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Construct a text field.
Method Summary
Method Attributes Method Name and Description
 
Return the change event manager attached to the text field.
 
Return the cursor position.
 
Return the selected text.
 
Return the text in the field.
 
Return the text length.
 
Determine whether this field is disabled.
 
Return true if the field is focusable and not disabled.
 
processChangeEvent(zwt_event_ChangeEvent_event)
Process the specified change event.
 
processEvent(zwt_event_Event_event)
Process the specified event.
 
processFocusEvent(zwt_event_FocusEvent_event)
Process the specified focus event.
 
Select the whole text.
 
Set the cursor position.
 
setDisabled(boolean_disabled)
Disable or enable the field.
 
setSelection(int_from, int_to)
Select text from int_from to int_to.
 
setText(string_text)
Set the text in the field.
Methods borrowed from class zwt.ui.Widget:
addStyle, draw, getContextFill, getDimension, getElement, getElementDimension, getFill, getFocusEventManager, getId, getKeyboardEventManager, getParent, getRelativeLeft, getRelativeTop, getStyle, getWheelEventManager, hasFocus, hasStyle, isVisible, onEvent, processContentEvent, processKeyboardEvent, processWheelEvent, redraw, removeStyle, replaceStyle, setFill, setFocusable, setId, setStyle, setVisible
Class Detail
zwt.ui.TextField()
Construct a text field.
Author: Jeremy KUHN.
Method Detail
{zwt.event.ChangeEventManager} getChangeEventManager()
Return the change event manager attached to the text field.
Returns:
The change event manager

{Integer} getCursorPosition()
Return the cursor position.
Returns:
The cursor position

{String} getSelectedText()
Return the selected text.
Returns:
The selected text

{String} getText()
Return the text in the field.
Returns:
The text in the field

{Integer} getTextLength()
Return the text length.
Returns:
The text length

{Boolean} isDisabled()
Determine whether this field is disabled. A disabled field can't respond to user input and generate events. The field is enabled initially by default.
Returns:
true if the field is disabled, false otherwise

{Boolean} isFocusable()
Return true if the field is focusable and not disabled.
Returns:
true if the field is focusable

processChangeEvent(zwt_event_ChangeEvent_event)
Process the specified change event.
Parameters:
{zwt.event.ChangeEvent} zwt_event_ChangeEvent_event
The change event to process

processEvent(zwt_event_Event_event)
Process the specified event.
Parameters:
{zwt.event.Event} zwt_event_Event_event
The event to process

processFocusEvent(zwt_event_FocusEvent_event)
Process the specified focus event.
Parameters:
{zwt.event.FocusEvent} zwt_event_FocusEvent_event
The focus event to process

selectAll()
Select the whole text.

setCursorPosition(int_pos)
Set the cursor position.
Parameters:
{Integer} int_pos
The cursor position

setDisabled(boolean_disabled)
Disable or enable the field.
Parameters:
{Boolean} boolean_disabled
true to disable the field, otherwise false

setSelection(int_from, int_to)
Select text from int_from to int_to.
Parameters:
{Integer} int_from
The start position
{Integer} int_to
The end position

setText(string_text)
Set the text in the field.
Parameters:
{String} string_text
The text to set

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Nov 09 2011 19:29:09 GMT+0100 (CET)