Java Doc for Field.java in  » Ajax » gwtext-2.01 » com » gwtext » client » widgets » form » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » gwtext 2.01 » com.gwtext.client.widgets.form 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.gwtext.client.widgets.BoxComponent
   com.gwtext.client.widgets.form.Field

All known Subclasses:   com.gwtext.client.widgets.form.HtmlEditor,  com.gwtext.client.widgets.form.Checkbox,  com.gwtext.client.widgets.form.Hidden,  com.gwtext.client.widgets.form.TimeField,  com.gwtext.client.widgets.form.TextField,
Field
abstract public class Field extends BoxComponent (Code)
Base class for form fields that provides default event handling, sizing, value handling and other functionality.



Constructor Summary
public  Field()
    
public  Field(String fieldLabel)
    
public  Field(String fieldLabel, String name)
    
public  Field(String fieldLabel, String name, int width)
    
public  Field(JavaScriptObject jsObj)
    

Method Summary
native public  voidaddListener(FieldListener listener)
     Add a Field Listener.
public  voidapplyTo(String id)
     Apply the behaviors of this component to an existing element.
native public  voidapplyTo(Element element)
     Apply the behaviors of this component to an existing element.
native public  voidclearInvalid()
     Clear any invalid styles/messages for this field.
abstract protected  JavaScriptObjectcreate(JavaScriptObject config)
    
public  StringgetClearCls()
    
public  StringgetCls()
    
public  StringgetFocusClass()
     The CSS class to use when the field receives focus (defaults to "x-form-focus").
public  StringgetInputType()
     The type attribute for input fields -- e.g.
public  StringgetInvalidClass()
     The CSS class to use when marking a field invalid (defaults to "x-form-invalid").
public  StringgetInvalidText()
     The error text to use when marking a field invalid and no message is provided (defaults to "The value in this field is invalid").
public  StringgetLabelSeparator()
     The seprator between the fields label and the field.
public  StringgetLabelStyle()
     The CSS style of the fields label.
public  StringgetName()
     Returns the name attribute of the field if available.
native public  StringgetRawValue()
     Returns the raw data value which may or may not be a valid, defined value.
public  intgetTabindex()
     The tabIndex for this field.
public  intgetValidationDelay()
     The length of time in milliseconds after user input begins until validation is initiated (defaults to 250).
native public  StringgetValueAsString()
     Return the value of the field as a String.
public  StringgetXType()
    
public  booleanisAutoCreate()
    
native public  booleanisDirty()
     Returns true if this field has been changed since it was originally loaded and is not disabled.
public  booleanisHideLabel()
    
public  booleanisReadOnly()
    
native public  booleanisValid()
     Returns whether or not the field value is currently valid.
native public  booleanisValid(boolean preventMark)
     Returns whether or not the field value is currently valid.
public  booleanisValidateOnBlur()
     Whether the field should validate when it loses focus (defaults to true).
native public  voidmarkInvalid(String message)
     Mark this field as invalid.
native public  voidreset()
     Resets the current field value to the originally loaded value and clears any validation messages.
public  voidsetAutoCreate(boolean autoCreate)
    
public  voidsetAutoCreate(DomConfig domConfig)
     A DomHelper config spec to use for field creation.
public  voidsetClearCls(String clearCls)
    
public  voidsetCls(String cls)
     A CSS class to apply to the field's underlying element.
public  voidsetDisabled(boolean disabled)
     True to disable the field (defaults to false).
public  voidsetFieldClass(String fieldClass)
     The default CSS class for the field (defaults to "x-form-field").
public  voidsetFieldLabel(String fieldLabel)
     Set the fields label.
public  voidsetFieldMsgTarget(String msgTarget)
     The location where error text should display.
public  voidsetFocusClass(String focusClass)
     The CSS class to use when the field receives focus (defaults to "x-form-focus").
public  voidsetHideLabel(boolean hideLabel)
     True to completely hide the label element (defaults to false).
public  voidsetInputType(String inputType)
     The type attribute for input fields -- e.g.
public  voidsetInvalidClass(String invalidClass)
     The CSS class to use when marking a field invalid (defaults to "x-form-invalid").
public  voidsetInvalidText(String invalidText)
     The error text to use when marking a field invalid and no message is provided (defaults to "The value in this field is invalid").
public  voidsetLabel(String fieldLabel)
     Set the fields label.
public  voidsetLabelSeparator(String labelSeparator)
     The seprator between the fields label and the field.
public  voidsetLabelStyle(String labelStyle)
     Set the CSS style of the fields label.
public  voidsetMsgFx(String msgFx)
     The effect used when displaying a validation message under the field (defaults to 'normal').
native public static  voidsetMsgTarget(String msgTarget)
     Set the location of the error message target globally.
public  voidsetName(String name)
     Set the field's HTML name attribute.
native public  voidsetRawValue(String value)
     Sets the underlying DOM field's value directly, bypassing validation.
public  voidsetReadOnly(boolean readOnly)
     True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.
public  voidsetTabIndex(int tabIndex)
     The tabIndex for this field.
public  voidsetValidateOnBlur(boolean validateOnBlur)
     Whether the field should validate when it loses focus (defaults to true).
public  voidsetValidationDelay(int validationDelay)
     The length of time in milliseconds after user input begins until validation is initiated (defaults to 250).
public  voidsetValidationEvent(boolean validationEvent)
     Set to false to disable automatic validation.
public  voidsetValidationEvent(String validationEvent)
     The event that should initiate field validation.
public  voidsetValue(String value)
     A value to initialize this field with.
public  voidsetWidth(int width)
     Set the width of the field.
public  voidsetWidth(String width)
     Set the width of the field.
native public  booleanvalidate()
    


Constructor Detail
Field
public Field()(Code)



Field
public Field(String fieldLabel)(Code)



Field
public Field(String fieldLabel, String name)(Code)



Field
public Field(String fieldLabel, String name, int width)(Code)



Field
public Field(JavaScriptObject jsObj)(Code)




Method Detail
addListener
native public void addListener(FieldListener listener)(Code)
Add a Field Listener.
Parameters:
  listener - the listener



applyTo
public void applyTo(String id)(Code)
Apply the behaviors of this component to an existing element. This is used instead of render().
Parameters:
  id - the ID of the node



applyTo
native public void applyTo(Element element)(Code)
Apply the behaviors of this component to an existing element. This is used instead of render().
Parameters:
  element - the element



clearInvalid
native public void clearInvalid()(Code)
Clear any invalid styles/messages for this field.



create
abstract protected JavaScriptObject create(JavaScriptObject config)(Code)



getClearCls
public String getClearCls()(Code)
The CSS class used to provide field clearing (defaults to 'x-form-clear-left') the clear Class



getCls
public String getCls()(Code)
CSS class to apply to the field's underlying element the CSS class



getFocusClass
public String getFocusClass()(Code)
The CSS class to use when the field receives focus (defaults to "x-form-focus"). the focus class



getInputType
public String getInputType()(Code)
The type attribute for input fields -- e.g. radio, text, password (defaults to "text"). the input type



getInvalidClass
public String getInvalidClass()(Code)
The CSS class to use when marking a field invalid (defaults to "x-form-invalid"). the invalid CSS class



getInvalidText
public String getInvalidText()(Code)
The error text to use when marking a field invalid and no message is provided (defaults to "The value in this field is invalid"). This error message is displayed when the used specified validator returns false. the invalid text



getLabelSeparator
public String getLabelSeparator()(Code)
The seprator between the fields label and the field. the label separator



getLabelStyle
public String getLabelStyle()(Code)
The CSS style of the fields label. the label style



getName
public String getName()(Code)
Returns the name attribute of the field if available. the name attribute of the Field



getRawValue
native public String getRawValue()(Code)
Returns the raw data value which may or may not be a valid, defined value. the raw field value



getTabindex
public int getTabindex()(Code)
The tabIndex for this field. the tab index



getValidationDelay
public int getValidationDelay()(Code)
The length of time in milliseconds after user input begins until validation is initiated (defaults to 250). the validation delay



getValueAsString
native public String getValueAsString()(Code)
Return the value of the field as a String. value as String



getXType
public String getXType()(Code)



isAutoCreate
public boolean isAutoCreate()(Code)



isDirty
native public boolean isDirty()(Code)
Returns true if this field has been changed since it was originally loaded and is not disabled. true if field changed



isHideLabel
public boolean isHideLabel()(Code)



isReadOnly
public boolean isReadOnly()(Code)



isValid
native public boolean isValid()(Code)
Returns whether or not the field value is currently valid. true if valid



isValid
native public boolean isValid(boolean preventMark)(Code)
Returns whether or not the field value is currently valid.
Parameters:
  preventMark - true to disable marking the field invalid true if valid



isValidateOnBlur
public boolean isValidateOnBlur()(Code)
Whether the field should validate when it loses focus (defaults to true). true if validate on blur



markInvalid
native public void markInvalid(String message)(Code)
Mark this field as invalid.
Parameters:
  message - the validation message



reset
native public void reset()(Code)
Resets the current field value to the originally loaded value and clears any validation messages.



setAutoCreate
public void setAutoCreate(boolean autoCreate) throws IllegalStateException(Code)
Set to true for a default element spec (defaults to {tag: "input", type: "text", size: "20", autocomplete: "off"})
Parameters:
  autoCreate - true for a default element spec
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setAutoCreate
public void setAutoCreate(DomConfig domConfig) throws IllegalStateException(Code)
A DomHelper config spec to use for field creation.
Parameters:
  domConfig - a DomHelper config spec to use for field creation
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setClearCls
public void setClearCls(String clearCls) throws IllegalStateException(Code)
The CSS class used to provide field clearing (defaults to 'x-form-clear-left')
Parameters:
  clearCls - the CSS class used to provide the clearing
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setCls
public void setCls(String cls) throws IllegalStateException(Code)
A CSS class to apply to the field's underlying element.
Parameters:
  cls - the CSS class
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setDisabled
public void setDisabled(boolean disabled)(Code)
True to disable the field (defaults to false).
Parameters:
  disabled - true to disable



setFieldClass
public void setFieldClass(String fieldClass) throws IllegalStateException(Code)
The default CSS class for the field (defaults to "x-form-field").
Parameters:
  fieldClass - the fields class
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setFieldLabel
public void setFieldLabel(String fieldLabel)(Code)
Set the fields label.
Parameters:
  fieldLabel - the field label



setFieldMsgTarget
public void setFieldMsgTarget(String msgTarget) throws IllegalStateException(Code)
The location where error text should display. Should be one of the following values (defaults to 'qtip') :
 Value         Description
 -----------   ----------------------------------------------------------------------
 qtip          Display a quick tip when the user hovers over the field
 title         Display a default browser title attribute popup
 under         Add a block div beneath the field containing the error text
 side          Add an error icon to the right of the field with a popup on hover
 [element id]  Add the error text directly to the innerHTML of the specified element

Parameters:
  msgTarget - the error message target
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setFocusClass
public void setFocusClass(String focusClass)(Code)
The CSS class to use when the field receives focus (defaults to "x-form-focus").
Parameters:
  focusClass - CSS class on focus



setHideLabel
public void setHideLabel(boolean hideLabel) throws IllegalStateException(Code)
True to completely hide the label element (defaults to false).
Parameters:
  hideLabel - true to completely hide the label element (defaults to false)
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setInputType
public void setInputType(String inputType) throws IllegalStateException(Code)
The type attribute for input fields -- e.g. radio, text, password (defaults to "text").
Parameters:
  inputType - the input type
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setInvalidClass
public void setInvalidClass(String invalidClass)(Code)
The CSS class to use when marking a field invalid (defaults to "x-form-invalid").
Parameters:
  invalidClass - CSS class when field is invalid



setInvalidText
public void setInvalidText(String invalidText)(Code)
The error text to use when marking a field invalid and no message is provided (defaults to "The value in this field is invalid"). This error message is displayed when the used specified validator returns false.
Parameters:
  invalidText - invalid text on error
See Also:   TextField.setValidator(Validator)



setLabel
public void setLabel(String fieldLabel)(Code)
Set the fields label. Alias for Field.setFieldLabel(String)
Parameters:
  fieldLabel - the field label



setLabelSeparator
public void setLabelSeparator(String labelSeparator) throws IllegalStateException(Code)
The seprator between the fields label and the field. Can use ' ' or ' '
Parameters:
  labelSeparator - the label separator
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setLabelStyle
public void setLabelStyle(String labelStyle) throws IllegalStateException(Code)
Set the CSS style of the fields label. For example 'display:none'.
Parameters:
  labelStyle - the CSS style for the fields label
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setMsgFx
public void setMsgFx(String msgFx)(Code)
The effect used when displaying a validation message under the field (defaults to 'normal'). Other possible values are "slide" and "slideRight"
Parameters:
  msgFx - validation message style



setMsgTarget
native public static void setMsgTarget(String msgTarget)(Code)
Set the location of the error message target globally.
Parameters:
  msgTarget - supported values are 'qtip' (default) and 'side'



setName
public void setName(String name) throws IllegalStateException(Code)
Set the field's HTML name attribute.
Parameters:
  name - the fields name
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setRawValue
native public void setRawValue(String value)(Code)
Sets the underlying DOM field's value directly, bypassing validation. To set the value with validation use Field.setValue(String) .
Parameters:
  value - field value



setReadOnly
public void setReadOnly(boolean readOnly) throws IllegalStateException(Code)
True to mark the field as readOnly in HTML (defaults to false) -- Note: this only sets the element's readOnly DOM attribute.
Parameters:
  readOnly - true to mark field read only
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setTabIndex
public void setTabIndex(int tabIndex) throws IllegalStateException(Code)
The tabIndex for this field. Note this only applies to fields that are rendered, not those which are built via applyTo.
Parameters:
  tabIndex - the fields tab index
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setValidateOnBlur
public void setValidateOnBlur(boolean validateOnBlur)(Code)
Whether the field should validate when it loses focus (defaults to true).
Parameters:
  validateOnBlur - true to validate on blur



setValidationDelay
public void setValidationDelay(int validationDelay) throws IllegalStateException(Code)
The length of time in milliseconds after user input begins until validation is initiated (defaults to 250).
Parameters:
  validationDelay - the validation delay in milliseconds
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setValidationEvent
public void setValidationEvent(boolean validationEvent) throws IllegalStateException(Code)
Set to false to disable automatic validation.
Parameters:
  validationEvent - false to disable automatic validation
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setValidationEvent
public void setValidationEvent(String validationEvent)(Code)
The event that should initiate field validation. (defaults to "keyup")..
Parameters:
  validationEvent - event to initiate validation



setValue
public void setValue(String value)(Code)
A value to initialize this field with.
Parameters:
  value - the field value



setWidth
public void setWidth(int width) throws IllegalStateException(Code)
Set the width of the field.
Parameters:
  width - the field width
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



setWidth
public void setWidth(String width) throws IllegalStateException(Code)
Set the width of the field.
Parameters:
  width - the field width
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



validate
native public boolean validate()(Code)



Methods inherited from com.gwtext.client.widgets.BoxComponent
native protected void addListener(BoxComponentListener listener)(Code)(Java Doc)
native protected JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc)
public void doOnRender(Function function)(Code)(Java Doc)
public void doOnRender(Function function, int delayMillis)(Code)(Java Doc)
public boolean getAutoHeight()(Code)(Java Doc)
public boolean getAutoWidth()(Code)(Java Doc)
native public Box getBox()(Code)(Java Doc)
native public Box getBox(boolean local)(Code)(Java Doc)
protected JavaScriptObject getConfigPrototype()(Code)(Java Doc)
public int getHeight()(Code)(Java Doc)
native public int[] getPosition()(Code)(Java Doc)
native public int[] getPosition(boolean local)(Code)(Java Doc)
native public Size getSize()(Code)(Java Doc)
public int getWidth()(Code)(Java Doc)
public String getXType()(Code)(Java Doc)
public void setAutoHeight(boolean autoHeight) throws IllegalStateException(Code)(Java Doc)
public void setAutoWidth(boolean autoWidth) throws IllegalStateException(Code)(Java Doc)
public void setHeight(int height)(Code)(Java Doc)
public void setHeight(String height)(Code)(Java Doc)
native public void setPagePosition(int x, int y)(Code)(Java Doc)
native public void setPosition(int left, int top)(Code)(Java Doc)
public void setWidth(int width)(Code)(Java Doc)
public void setWidth(String width)(Code)(Java Doc)
native public void syncSize()(Code)(Java Doc)
native public void updateBox(Box box)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.