Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.widgets.form
Class Checkbox

    java.lang.Object
      com.google.gwt.user.client.ui.UIObject
          com.google.gwt.user.client.ui.Widget
              com.gwtext.client.widgets.Component
                  com.gwtext.client.widgets.BoxComponent
                      com.gwtext.client.widgets.form.Field
                          com.gwtext.client.widgets.form.Checkbox

All Implemented Interfaces:
  com.google.gwt.user.client.EventListener, Observable

Direct Known Subclasses:
  Radio

    public class Checkbox

extends Field

Single checkbox field.

Field Summary

Fields inherited from class com.gwtext.client.widgets.Component
`config, id`

Constructor Summary
`Checkbox()` Creates a new Checkbox field.
`Checkbox(com.google.gwt.core.client.JavaScriptObject jsObj)`
`Checkbox(java.lang.String boxLabel)` Creates a new Checkbox field.
`Checkbox(java.lang.String boxLabel, CheckboxListener listener)` Creates a new Checkbox field.
`Checkbox(java.lang.String boxLabel, java.lang.String name)` Creates a new Checkbox field.

Method Summary
`void` | `addListener(CheckboxListener listener)` Add a checkbox listener.
`protected com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject config)`
`java.lang.String` | `getBoxLabel()` The box label.
`protected com.google.gwt.core.client.JavaScriptObject` | `getConfigPrototype()`
`boolean` | `getValue()` Returns the checked state of the checkbox.
`java.lang.String` | `getXType()` Gets the xtype for this component as registered with ComponentMgr.
`void` | `setBoxLabel(java.lang.String boxLabel)` The text that appears beside the checkbox.
`void` | `setChecked(boolean checked)` True if the the checkbox should render already checked (defaults to false).
`void` | `setInputValue(java.lang.String inputValue)` The value that should go into the generated input element's value attribute.
`void` | `setValue(boolean checked)` Sets the checked state of the checkbox.

Methods inherited from class com.gwtext.client.widgets.form.Field
`addListener, applyTo, applyTo, clearInvalid, getClearCls, getCls, getFieldLabel, getFocusClass, getInputType, getInvalidClass, getInvalidText, getLabelSeparator, getLabelStyle, getName, getRawValue, getTabindex, getValidationDelay, getValueAsString, hide, isAutoCreate, isDirty, isHideLabel, isReadOnly, isValid, isValid, isValidateOnBlur, markInvalid, reset, setAutoCreate, setAutoCreate, setClearCls, setCls, setDisabled, setFieldClass, setFieldLabel, setFieldMsgTarget, setFocusClass, setHideLabel, setInputType, setInvalidClass, setInvalidText, setLabel, setLabelSeparator, setLabelStyle, setMsgFx, setMsgTarget, setName, setRawValue, setReadOnly, setTabIndex, setValidateOnBlur, setValidationDelay, setValidationEvent, setValidationEvent, setValue, show, validate`

Methods inherited from class com.gwtext.client.widgets.BoxComponent
`addListener, doOnRender, doOnRender, getAutoHeight, getAutoWidth, getBox, getBox, getHeight, getPosition, getPosition, getSize, getWidth, setAutoHeight, setAutoWidth, setHeight, setHeight, setPagePosition, setPosition, setSize, setSize, setWidth, setWidth, syncSize, updateBox`

Methods inherited from class com.gwtext.client.widgets.Component
`addClass, addClassCreated, addEvent, addEvents, addListener, addListener, addListener, addPlugin, addStyleDependentName, addStyleName, afterRender, beforeDestroy, check, cloneComponent, cloneComponent, cloneConfig, destroy, disable, enable, equals, error, findParentBy, findParentByType, fireEvent, focus, focus, focus, getApplyTo, getAttribute, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAutoShow, getComponentJS, getConfig, getCtCls, getDisabledClass, getEl, getElement, getElement, getElement, getHideMode, getHideParent, getId, getItemId, getJsObj, getOffsetHeight, getOffsetWidth, getOrCreateJsObj, getOwnerContainer, getRenderTo, getStateEvents, getStateId, getStyleElement, getTitle, getXTypes, hashCode, initComponent, isCreated, isDisabled, isHidden, isRendered, isVisible, isXType, isXType, onDestroy, purgeListeners, removeClass, removeStyleDependentName, removeStyleName, render, render, render, render, render, render, resumeEvents, setApplyTo, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAutoEl, setAutoEl, setAutoShow, setCtCls, setDisabledClass, setEl, setEl, setHideMode, setHideParent, setId, setRenderTo, setRenderToID, setStateEvents, setStateId, setStyle, setStyle, setStyleName, setStylePrimaryName, setTitle, setVisible, suspendEvents`

Methods inherited from class com.google.gwt.user.client.ui.Widget
`doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setElement`

Methods inherited from class com.google.gwt.user.client.ui.UIObject
`getAbsoluteLeft, getAbsoluteTop, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, toString, unsinkEvents`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Checkbox

    public Checkbox(com.google.gwt.core.client.JavaScriptObject jsObj)

### Checkbox

    public Checkbox()

  Creates a new Checkbox field.

### Checkbox

    public Checkbox(java.lang.String boxLabel)

  Creates a new Checkbox field.

  Parameters:
    `boxLabel` - the box label

### Checkbox

    public Checkbox(java.lang.String boxLabel,
                    java.lang.String name)

  Creates a new Checkbox field.

  Parameters:
    `boxLabel` - the box label
    `name` - the field name

### Checkbox

    public Checkbox(java.lang.String boxLabel,
                    CheckboxListener listener)

  Creates a new Checkbox field.

  Parameters:
    `boxLabel` - the box label
    `listener` - the checkbox listener

Method Detail

### getConfigPrototype

    protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()

  Overrides:
    `getConfigPrototype` in class `BoxComponent`

### getXType

    public java.lang.String getXType()

  Description copied from class: `Component`
  Gets the xtype for this component as registered with ComponentMgr. For a list of all available xtypes, see the Component javadocs.

       TextField field = new TextField();
       field.getXType() returns "textfield"

  Overrides:
    `getXType` in class `Field`
  Returns:
    the xtype

### create

    protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)

  Specified by:
    `create` in class `Field`

### getValue

    public boolean getValue()

  Returns the checked state of the checkbox.

  Returns:
    true if checked, else false

### setValue

    public void setValue(boolean checked)

  Sets the checked state of the checkbox.

  Parameters:
    `checked` - true to chec the checkbox, false to uncheck it

### addListener

    public void addListener(CheckboxListener listener)

  Add a checkbox listener.

  Parameters:
    `listener` - the listener

### setBoxLabel

    public void setBoxLabel(java.lang.String boxLabel)

  The text that appears beside the checkbox.

  Parameters:
    `boxLabel` - the box label

### getBoxLabel

    public java.lang.String getBoxLabel()

  The box label.

  Returns:
    the box label

### setChecked

    public void setChecked(boolean checked)

  True if the the checkbox should render already checked (defaults to false).

  Parameters:
    `checked` - true to render checked

### setInputValue

    public void setInputValue(java.lang.String inputValue)
                       throws java.lang.IllegalStateException

  The value that should go into the generated input element's value attribute.

  Parameters:
    `inputValue` - fields input value
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD