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 TriggerField

    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.TextField
                              com.gwtext.client.widgets.form.TriggerField

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

    public abstract class TriggerField

extends TextField

Provides a convenient wrapper for TextFields that adds a clickable trigger button (looks like a combobox by default). The trigger has no default action, so you mustimplement the trigger click handler by overriding `onTriggerClick(com.gwtext.client.core.EventObject)`. You can create a TriggerField directly, as it renders exactly like a combobox for which you can provide a custom implementation.

Field Summary

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

Constructor Summary
`TriggerField()` Construct a new TriggerField.
`TriggerField(com.google.gwt.core.client.JavaScriptObject jsObj)`

Method Summary
`protected com.google.gwt.core.client.JavaScriptObject` | `create(com.google.gwt.core.client.JavaScriptObject jsObj)`
`protected com.google.gwt.user.client.Element` | `getElement(com.google.gwt.core.client.JavaScriptObject jsObj)`
`java.lang.String` | `getXType()` Gets the xtype for this component as registered with ComponentMgr.
`protected void` | `initComponent()` This template method is called after the Component has been instantiated but before it's rendered.
`protected abstract void` | `onTriggerClick(EventObject event)` Abstract method that must be implmented for custom trigger field behavior.
`void` | `setHideTrigger(boolean hideTrigger)` True to hide the trigger element and display only the base text field (defaults to false).
`void` | `setTriggerClass(java.lang.String triggerClass)` A CSS class to apply to the trigger.

Methods inherited from class com.gwtext.client.widgets.form.TextField
`addKeyListener, addKeyListener, addKeyListener, addKeyPressListener, addKeyPressListener, addListener, autoSize, getConfigPrototype, getText, selectText, selectText, setAllowBlank, setBlankText, setDisableKeyFilter, setEmptyClass, setEmptyText, setGrow, setGrowMax, setGrowMin, setMaskRe, setMaxLength, setMaxLengthText, setMinLength, setMinLengthText, setPassword, setRegex, setRegexText, setSelectOnFocus, setValidator, setVtype, setVtypeText, validateValue`

Methods inherited from class com.gwtext.client.widgets.form.Field
`addListener, applyTo, applyTo, clearInvalid, getClearCls, getCls, getFocusClass, getInputType, getInvalidClass, getInvalidText, getLabelSeparator, getLabelStyle, getName, getRawValue, getTabindex, getValidationDelay, getValueAsString, 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, 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, afterRender, beforeDestroy, check, cloneComponent, cloneComponent, cloneConfig, destroy, disable, enable, equals, error, findParentBy, findParentByType, focus, focus, focus, getApplyTo, getAttribute, getAttributeAsBoolean, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAutoShow, getComponentJS, getConfig, getCtCls, getDisabledClass, getEl, getElement, getHideMode, getHideParent, getId, getItemId, getJsObj, getOffsetHeight, getOffsetWidth, getOrCreateJsObj, getOwnerContainer, getRenderTo, getStateEvents, getStateId, getStyle, getStyleElement, getTitle, getXTypes, hashCode, hide, isCreated, isDisabled, isHidden, isRendered, isVisible, isXType, isXType, onDestroy, purgeListeners, removeClass, 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, setStateEvents, setStateId, setStyle, setTitle, setVisible, show, 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
`addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, setPixelSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkEvents, toString, unsinkEvents`

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

Constructor Detail

### TriggerField

    public TriggerField()

  Construct a new TriggerField.

### TriggerField

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

Method Detail

### initComponent

    protected void initComponent()

  Description copied from class: `Component`
  This template method is called after the Component has been instantiated but before it's rendered. Subclasses can override it to provide any "constructor" type logic thats desired/

  Overrides:
    `initComponent` in class `Component`

### getElement

    protected com.google.gwt.user.client.Element getElement(com.google.gwt.core.client.JavaScriptObject jsObj)

  Overrides:
    `getElement` in class `Component`

### create

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

  Overrides:
    `create` in class `TextField`

### onTriggerClick

    protected abstract void onTriggerClick(EventObject event)

  Abstract method that must be implmented for custom trigger field behavior.

  Parameters:
    `event` - the event object

### 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 `TextField`
  Returns:
    the xtype

### setHideTrigger

    public void setHideTrigger(boolean hideTrigger)
                        throws java.lang.IllegalStateException

  True to hide the trigger element and display only the base text field (defaults to false).

  Parameters:
    `hideTrigger` - true to hide trigger
  Throws:
    `java.lang.IllegalStateException` - this property cannot be changed after the Component has been rendered

### setTriggerClass

    public void setTriggerClass(java.lang.String triggerClass)
                         throws java.lang.IllegalStateException

  A CSS class to apply to the trigger.

  Parameters:
    `triggerClass` - the trigger CSS class.
  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