EasyFormComponent (base API)
Date: 2019-04-05

com.twosigma.beakerx.easyform

## Class EasyFormComponent<T extends com.twosigma.beakerx.widget.ValueWidget<?>>

- java.lang.Object
- - com.twosigma.beakerx.easyform.EasyFormComponent<T>

- All Implemented Interfaces:
    com.twosigma.beakerx.widget.CommFunctionality
  Direct Known Subclasses:
    ButtonComponentWidget, CheckBoxGroupWidget, CheckBoxWidget, ComboBoxWidget, DatePickerComponentWidget, ListComponent, LoadValuesButton, PasswordWidget, RadioButtonComponentWidget, SaveValuesButton, TextAreaWidget, TextFieldWidget

      public class EasyFormComponent<T extends com.twosigma.beakerx.widget.ValueWidget<?>>
      extends java.lang.Object
      implements com.twosigma.beakerx.widget.CommFunctionality

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected T` | `widget`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EasyFormComponent()`
    `EasyFormComponent(T widget)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOnChangeListener(EasyFormListener listener)`
    `void` | `addOnInitListener(EasyFormListener listener)`
    `protected boolean` | `checkValue(java.lang.Object value)` Throw IllegalArgumentException if such value can't be set to this component
    `void` | `clearListeners()`
    `void` | `close()`
    `void` | `fireChanged()`
    `void` | `fireInit()`
    `java.lang.Object` | `formatValue(java.lang.Object value)`
    `com.twosigma.beakerx.kernel.comm.Comm` | `getComm()`
    `java.lang.String` | `getLabel()`
    `java.lang.Object` | `getValue()`
    `T` | `getWidget()`
    `boolean` | `isButton()`
    `boolean` | `isEnabled()`
    `EasyFormComponent` | `onChange(EasyFormListener listener)`
    `EasyFormComponent` | `onInit(EasyFormListener listener)`
    `void` | `registerUpdateValueCallback(com.twosigma.beakerx.widget.UpdateValueCallback updateValueCallback)`
    `void` | `removeOnChangeListener(EasyFormListener listener)`
    `void` | `removeOnInitListener(EasyFormListener listener)`
    `void` | `setEnabled(boolean enabled)`
    `void` | `setLabel(java.lang.String label)`
    `void` | `setValue(java.lang.Object value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### widget

          protected T extends com.twosigma.beakerx.widget.ValueWidget<?> widget

  - ### Constructor Detail

    - #### EasyFormComponent

          public EasyFormComponent(T widget)

    - #### EasyFormComponent

          public EasyFormComponent()

  - ### Method Detail

    - #### getLabel

          public java.lang.String getLabel()

    - #### setLabel

          public void setLabel(java.lang.String label)

    - #### getValue

          public java.lang.Object getValue()

    - #### setValue

          public void setValue(java.lang.Object value)

    - #### getWidget

          public T getWidget()

    - #### fireInit

          public void fireInit()

    - #### onInit

          public EasyFormComponent onInit(EasyFormListener listener)

    - #### addOnInitListener

          public void addOnInitListener(EasyFormListener listener)

    - #### removeOnInitListener

          public void removeOnInitListener(EasyFormListener listener)

    - #### onChange

          public EasyFormComponent onChange(EasyFormListener listener)

    - #### fireChanged

          public void fireChanged()

    - #### addOnChangeListener

          public void addOnChangeListener(EasyFormListener listener)

    - #### removeOnChangeListener

          public void removeOnChangeListener(EasyFormListener listener)

    - #### clearListeners

          public void clearListeners()

    - #### isEnabled

          public boolean isEnabled()

    - #### setEnabled

          public void setEnabled(boolean enabled)

    - #### formatValue

          public java.lang.Object formatValue(java.lang.Object value)

    - #### checkValue

          protected boolean checkValue(java.lang.Object value)

      Throw IllegalArgumentException if such value can't be set to this component
      Parameters:
        `value` - object with data to be set
      Returns:
        true if value can be set to given component

    - #### registerUpdateValueCallback

          public void registerUpdateValueCallback(com.twosigma.beakerx.widget.UpdateValueCallback updateValueCallback)

    - #### isButton

          public boolean isButton()

    - #### getComm

          public com.twosigma.beakerx.kernel.comm.Comm getComm()

      Specified by:
        `getComm` in interface `com.twosigma.beakerx.widget.CommFunctionality`

    - #### close

          public void close()

      Specified by:
        `close` in interface `com.twosigma.beakerx.widget.CommFunctionality`