Class TextToFloatFieldSwitcher

java.lang.Object
com.axemble.vdp.ui.framework.foundation.Component
com.axemble.vdp.ui.framework.foundation.Widget
com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseComponent
com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent
com.vdoc.sdk.commons.ui.widget.view.inline.edit.switcher.TextToFloatFieldSwitcher
All Implemented Interfaces:
IFieldComponent, IWidget, IWritable, com.axemble.vdp.form.classes.IBaseComponentSupport, com.axemble.vdp.ui.core.document.fields.IFieldControl, com.axemble.vdp.utils.parameters.ParamsHandler, IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>, Serializable

public class TextToFloatFieldSwitcher extends com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent implements IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>
Text to float field switcher Created by amhin on 07/09/2015.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final com.axemble.vdp.ui.framework.widgets.CtlText
    the read render widget
    protected final com.axemble.vdp.ui.core.document.fields.FloatField
    the edit render widget

    Fields inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent

    aggregate, hasService

    Fields inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent

    accesskey, associatedLabel, condition, description, editable, errorInfo, formula, formulaCondition, includeErrorInfo, javascriptId, mandatory, modeFormula, property, propertytype, quickCreateLink, requiredFormula, rules, stringRecipient, tabindex, temporarypropertyname, throwDocumentChangedScript, throwEvents, throwEventsDefined, validationRules

    Fields inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseComponent

    additionalParameters, additionalParametersNodes, id, parameters

    Fields inherited from class com.axemble.vdp.ui.framework.foundation.Widget

    actionListeners, isHidden, param, parentBlock, sysname, userId

    Fields inherited from class com.axemble.vdp.ui.framework.foundation.Component

    changeListeners, LOGGER

    Fields inherited from interface com.axemble.vdp.utils.parameters.ParamsHandler

    ERROR_EXCEED_ELEM_SIZE, ERROR_EXCEED_TOTAL_SIZE, ERROR_NOT_COMPLETED, ERROR_READ_FAILED, EXCEED_ELEM_NUMBER, NO_ERROR
  • Constructor Summary

    Constructors
    Constructor
    Description
    TextToFloatFieldSwitcher(com.axemble.vdp.ui.framework.widgets.CtlText readWidget, com.axemble.vdp.ui.core.document.fields.FloatField writeWidget)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel editing
    com.axemble.vdp.ui.framework.widgets.CtlText
    get the widget used in InlineEditMode.READ mode
     
    get the current value
    com.axemble.vdp.ui.core.document.fields.FloatField
    get the widget used in InlineEditMode.WRITE mode
    protected void
     
    boolean
     
    Render the widget
    void
    setValue(Float value)
    set the current value
    void
    Update widget
    void
    Update field value
    void
    update the read widget from the write widget

    Methods inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent

    addCssDependency, addScriptDependency, getAbstractField, getField, getFieldChangeListener, getTemplateWriter, init, init, isHasService, setHasService, stateChanged

    Methods inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent

    addRefreshButton, addValidationRule, afterInit, canThrowEventsInWebBrowser, clearValidationRules, findStringRecipient, focus, getAccesskey, getAssociatedLabel, getDescription, getDocumentChangedScript, getErrorInfo, getFormula, getFormulaCondition, getHelpMessageIcon, getJavaScriptFocusScript, getJavascriptId, getModeFormula, getParentId, getProperty, getPropertyName, getPropertytype, getQuickCreateLink, getRefreshButton, getRequiredFormula, getTabindex, getTemporarypropertyname, getValidationRules, handleNoParams, handleParams, handleParams, hasValidationRules, inform, init, initParameters, initParameters, isCondition, isDescription, isDocumentChangedScript, isEditable, isFocus, isForceParentId, isIncludeErrorInfo, isMandatory, isThrowDocumentChangedScript, isThrowEvents, isThrowEventsDefined, registerWidget, renderErrorInfo, renderInfoMessage, renderQuickCreate, setAccesskey, setAssociatedLabel, setCondition, setDescription, setEditable, setErrorInfo, setFormula, setFormulaCondition, setIncludeErrorInfo, setJavascriptId, setMandatory, setModeFormula, setProperty, setPropertytype, setQuickCreateContextParameter, setQuickCreateScreen, setRequiredFormula, setTabindex, setTemporarypropertyname, setThrowDocumentChangedScript, setThrowEvents, setThrowEventsDefined, setValidationRules, validate

    Methods inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseComponent

    addParameter, getAdditionalParameters, getAdditionalParametersNodes, getAdditionalParametersNodesElement, getId, getParameter, getParameter, getParameterBoolean, getParameterBoolean, getParameterDate, getParameterDate, getParameterInt, getParameterInteger, getParameterList, getParameterLong, getParameterNumber, getParameters, getParameterString, getParameterString, hasParameter, removeParameter, setAdditionalParameters, setAdditionalParametersNodes, setId, setParameters

    Methods inherited from class com.axemble.vdp.ui.framework.foundation.Widget

    addActionListener, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireOnClickMessage, buildFireOnClickMessage, buildFormName, findFileRecipient, findXmlRecipient, fireActionEvent, getCtrlTemplate, getCtrlTemplateWriter, getParam, getParentBlock, getSysname, getUserDisplayName, getUserId, handleAction, hasActionListeners, isHidden, refresh, refreshWidgets, removeActionListener, removeActionListeners, renderMobile, setHidden, setParam, setParentBlock, setSysname, setUserId, write

    Methods inherited from class com.axemble.vdp.ui.framework.foundation.Component

    addChangeListener, createComponent, evaluateExpressions, fireChangeEvent, getDynamicDescription, getDynamicLabel, getLanguage, getNavigator, getRootNavigator, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, hasChangeListeners, removeChangeListener, removeChangeListeners

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.axemble.vdp.form.classes.IBaseComponentSupport

    getLanguage, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, isHidden, setHidden

    Methods inherited from interface com.axemble.vdp.ui.core.document.fields.IFieldControl

    addValidationRule, clearValidationRules, getUserId, getValidationRules, hasValidationRules, inform, isEditable, isHidden, isMandatory, setEditable, setHidden, setMandatory, setUserId, validate

    Methods inherited from interface com.axemble.vdoc.sdk.interfaces.ui.IWritable

    write
  • Field Details

    • readWidget

      protected final com.axemble.vdp.ui.framework.widgets.CtlText readWidget
      the read render widget
    • writeWidget

      protected final com.axemble.vdp.ui.core.document.fields.FloatField writeWidget
      the edit render widget
  • Constructor Details

    • TextToFloatFieldSwitcher

      public TextToFloatFieldSwitcher(com.axemble.vdp.ui.framework.widgets.CtlText readWidget, com.axemble.vdp.ui.core.document.fields.FloatField writeWidget)
      Constructor
      Parameters:
      readWidget - the read render widget
      writeWidget - the edit render widget
  • Method Details

    • getValue

      public Float getValue()
      Description copied from interface: IInlineEditSwitcher
      get the current value
      Specified by:
      getValue in interface IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>
      Returns:
    • setValue

      public void setValue(Float value)
      Description copied from interface: IInlineEditSwitcher
      set the current value
      Specified by:
      setValue in interface IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>
    • getReadWidget

      public com.axemble.vdp.ui.framework.widgets.CtlText getReadWidget()
      Description copied from interface: IInlineEditSwitcher
      get the widget used in InlineEditMode.READ mode
      Specified by:
      getReadWidget in interface IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>
      Returns:
    • getWriteWidget

      public com.axemble.vdp.ui.core.document.fields.FloatField getWriteWidget()
      Description copied from interface: IInlineEditSwitcher
      get the widget used in InlineEditMode.WRITE mode
      Specified by:
      getWriteWidget in interface IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>
      Returns:
    • updateWidgets

      public void updateWidgets()
      Description copied from interface: IInlineEditSwitcher
      update the read widget from the write widget
      Specified by:
      updateWidgets in interface IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>
    • cancel

      public void cancel()
      Description copied from interface: IInlineEditSwitcher
      Cancel editing
      Specified by:
      cancel in interface IInlineEditSwitcher<Float,com.axemble.vdp.ui.framework.widgets.CtlText,com.axemble.vdp.ui.core.document.fields.FloatField>
    • initAdditionalParameters

      protected void initAdditionalParameters()
      Specified by:
      initAdditionalParameters in class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
    • getValidationObject

      public Object getValidationObject()
      Specified by:
      getValidationObject in class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
    • updateValue

      public void updateValue()
      Description copied from interface: IFieldComponent
      Update field value
      Specified by:
      updateValue in interface IFieldComponent
      Specified by:
      updateValue in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • updateControl

      public void updateControl()
      Description copied from interface: IFieldComponent
      Update widget
      Specified by:
      updateControl in interface IFieldComponent
      Specified by:
      updateControl in interface com.axemble.vdp.ui.core.document.fields.IFieldControl
    • render

      public IWritable render() throws RenderException
      Description copied from interface: IWidget
      Render the widget
      Specified by:
      render in interface IWidget
      Specified by:
      render in class com.axemble.vdp.ui.framework.foundation.Widget
      Returns:
      writableWidget
      Throws:
      RenderException