Class CurrencyField
- java.lang.Object
-
- org.teamapps.ux.component.AbstractComponent
-
- org.teamapps.ux.component.field.AbstractField<CurrencyValue>
-
- org.teamapps.ux.component.field.multicurrency.CurrencyField
-
- All Implemented Interfaces:
Component,TextInputHandlingField
public class CurrencyField extends AbstractField<CurrencyValue> implements TextInputHandlingField
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCurrencyField.Currency
-
Field Summary
Fields Modifier and Type Field Description Event<SpecialKey>onSpecialKeyPressedEvent<java.lang.String>onTextInput-
Fields inherited from class org.teamapps.ux.component.field.AbstractField
onValueChanged, onVisibilityChanged
-
Fields inherited from class org.teamapps.ux.component.AbstractComponent
onDestroyed, onRendered
-
-
Constructor Summary
Constructors Constructor Description CurrencyField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CurrencyValueconvertUiValueToUxValue(java.lang.Object value)java.lang.ObjectconvertUxValueToUiValue(CurrencyValue currencyValue)Converts a server-side value to a client-side field-specific value.org.teamapps.dto.UiFieldcreateUiComponent()protected voiddoDestroy()Override this method to release resources whenever this component gets destroyedjava.util.List<CurrencyField.Currency>getCurrencyList()CurrencyField.CurrencygetDefaultCurrency()intgetPrecision()voidhandleUiEvent(org.teamapps.dto.UiEvent event)booleanisAlphaKeysQueryForCurrency()booleanisShowCurrencyBeforeAmount()booleanisShowCurrencySymbol()Event<SpecialKey>onSpecialKeyPressed()Event<java.lang.String>onTextInput()voidsetAlphaKeysQueryForCurrency(boolean alphaKeysQueryForCurrency)CurrencyFieldsetCurrencyList(java.util.List<CurrencyField.Currency> currencyList)CurrencyFieldsetDefaultCurrency(CurrencyField.Currency defaultCurrency)voidsetPrecision(int precision)CurrencyFieldsetShowCurrencyBeforeAmount(boolean showCurrencyBeforeAmount)CurrencyFieldsetShowCurrencySymbol(boolean showCurrencySymbol)-
Methods inherited from class org.teamapps.ux.component.field.AbstractField
addCustomFieldMessage, addValidator, applyValueFromUi, clearCustomFieldMessages, focus, getCustomFieldMessages, getDefaultMessagePosition, getDefaultMessageVisibility, getEditingMode, getFieldMessages, getMaxFieldMessageSeverity, getValidators, getValue, isEmpty, isRequired, isValid, isVisible, mapAbstractFieldAttributesToUiField, removeCustomFieldMessage, removeValidator, setAndLockValue, setCustomFieldMessages, setDefaultMessagePosition, setDefaultMessageVisibility, setEditingMode, setRequired, setValue, setVisible, validate
-
Methods inherited from class org.teamapps.ux.component.AbstractComponent
createUiComponentReference, destroy, getId, getParent, getSessionContext, isDestroyed, isEffectivelyVisible, isRendered, mapAbstractUiComponentProperties, queueCommandIfRendered, render, reRenderIfRendered, setCssStyle, setMargin, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setParent, setShadow, toString, unrender
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.teamapps.ux.component.Component
setCssStyle
-
Methods inherited from interface org.teamapps.ux.component.field.TextInputHandlingField
defaultHandleTextInputEvent
-
-
-
-
Field Detail
-
onTextInput
public final Event<java.lang.String> onTextInput
-
onSpecialKeyPressed
public final Event<SpecialKey> onSpecialKeyPressed
-
-
Method Detail
-
createUiComponent
public org.teamapps.dto.UiField createUiComponent()
- Specified by:
createUiComponentin classAbstractComponent
-
handleUiEvent
public void handleUiEvent(org.teamapps.dto.UiEvent event)
- Specified by:
handleUiEventin interfaceComponent- Overrides:
handleUiEventin classAbstractField<CurrencyValue>
-
getDefaultCurrency
public CurrencyField.Currency getDefaultCurrency()
-
setDefaultCurrency
public CurrencyField setDefaultCurrency(CurrencyField.Currency defaultCurrency)
-
getCurrencyList
public java.util.List<CurrencyField.Currency> getCurrencyList()
-
setCurrencyList
public CurrencyField setCurrencyList(java.util.List<CurrencyField.Currency> currencyList)
-
convertUxValueToUiValue
public java.lang.Object convertUxValueToUiValue(CurrencyValue currencyValue)
Description copied from class:AbstractFieldConverts a server-side value to a client-side field-specific value. Implementations must not have any side effects to the component!- Overrides:
convertUxValueToUiValuein classAbstractField<CurrencyValue>- Parameters:
currencyValue- the server-side value- Returns:
- the object to be sent to the ui
-
convertUiValueToUxValue
public CurrencyValue convertUiValueToUxValue(java.lang.Object value)
- Overrides:
convertUiValueToUxValuein classAbstractField<CurrencyValue>
-
doDestroy
protected void doDestroy()
Description copied from class:AbstractComponentOverride this method to release resources whenever this component gets destroyed- Overrides:
doDestroyin classAbstractComponent
-
getPrecision
public int getPrecision()
-
isShowCurrencyBeforeAmount
public boolean isShowCurrencyBeforeAmount()
-
setShowCurrencyBeforeAmount
public CurrencyField setShowCurrencyBeforeAmount(boolean showCurrencyBeforeAmount)
-
isShowCurrencySymbol
public boolean isShowCurrencySymbol()
-
setShowCurrencySymbol
public CurrencyField setShowCurrencySymbol(boolean showCurrencySymbol)
-
isAlphaKeysQueryForCurrency
public boolean isAlphaKeysQueryForCurrency()
-
setPrecision
public void setPrecision(int precision)
-
setAlphaKeysQueryForCurrency
public void setAlphaKeysQueryForCurrency(boolean alphaKeysQueryForCurrency)
-
onTextInput
public Event<java.lang.String> onTextInput()
- Specified by:
onTextInputin interfaceTextInputHandlingField
-
onSpecialKeyPressed
public Event<SpecialKey> onSpecialKeyPressed()
- Specified by:
onSpecialKeyPressedin interfaceTextInputHandlingField
-
-