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:
ClientObject,Component,TextInputHandlingField
public class CurrencyField extends AbstractField<CurrencyValue> implements TextInputHandlingField
-
-
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
onBlur, onFocus, onValueChanged, onVisibilityChanged
-
Fields inherited from class org.teamapps.ux.component.AbstractComponent
DELETED_ATTRIBUTE, onRendered
-
-
Constructor Summary
Constructors Constructor Description CurrencyField()CurrencyField(java.util.List<CurrencyUnit> currencies)
-
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()java.util.Optional<java.math.BigDecimal>getAmount()java.util.List<CurrencyUnit>getCurrencies()java.util.Optional<CurrencyUnit>getCurrency()intgetFixedPrecision()java.util.LocalegetLocale()com.ibm.icu.util.ULocalegetULocale()voidhandleUiEvent(org.teamapps.dto.UiEvent event)booleanisAlphabeticKeysQueryEnabled()booleanisCurrencyBeforeAmount()booleanisCurrencySymbolsEnabled()Event<SpecialKey>onSpecialKeyPressed()Event<java.lang.String>onTextInput()voidsetAlphabeticKeysQueryEnabled(boolean alphabeticKeysQueryEnabled)voidsetAmount(java.math.BigDecimal amount)CurrencyFieldsetCurrencies(java.util.List<CurrencyUnit> currencies)voidsetCurrency(CurrencyUnit currencyUnit)CurrencyFieldsetCurrencyBeforeAmount(boolean currencyBeforeAmount)CurrencyFieldsetCurrencySymbolsEnabled(boolean currencySymbolsEnabled)voidsetFixedPrecision(int fixedPrecision)voidsetLocale(java.util.Locale locale)voidsetULocale(com.ibm.icu.util.ULocale locale)-
Methods inherited from class org.teamapps.ux.component.field.AbstractField
addCustomFieldMessage, addCustomFieldMessage, addValidator, applyValueFromUi, clearCustomFieldMessages, clearValidatorMessages, focus, getCustomFieldMessages, getDefaultMessagePosition, getDefaultMessageVisibility, getEditingMode, getFieldMessages, getMaxFieldMessageSeverity, getValidators, getValue, isEmpty, isEmptyValue, isRequired, isValid, isValueChangedByClient, isValueLocked, mapAbstractFieldAttributesToUiField, removeCustomFieldMessage, removeValidator, setAndLockValue, setCustomFieldMessages, setDefaultMessagePosition, setDefaultMessageVisibility, setEditingMode, setRequired, setRequiredIfVisibleAndEditable, setValue, setValueChangedByClient, setVisible, validate
-
Methods inherited from class org.teamapps.ux.component.AbstractComponent
createUiReference, getDebuggingId, getId, getParent, getSessionContext, isRendered, isVisible, mapAbstractUiComponentProperties, queueCommandIfRendered, render, reRenderIfRendered, setAttribute, setCssStyle, setDebuggingId, setParent, toggleCssClass, 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.ClientObject
handleUiQuery
-
Methods inherited from interface org.teamapps.ux.component.Component
setAriaLabel, setAttribute, setCssStyle, setHtmlTitle, setMargin, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setShadow, toggleCssClass
-
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
-
-
Constructor Detail
-
CurrencyField
public CurrencyField()
-
CurrencyField
public CurrencyField(java.util.List<CurrencyUnit> currencies)
-
-
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 interfaceClientObject- Overrides:
handleUiEventin classAbstractField<CurrencyValue>
-
getCurrencies
public java.util.List<CurrencyUnit> getCurrencies()
-
setCurrencies
public CurrencyField setCurrencies(java.util.List<CurrencyUnit> currencies)
-
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>
-
getCurrency
public java.util.Optional<CurrencyUnit> getCurrency()
-
setCurrency
public void setCurrency(CurrencyUnit currencyUnit)
-
getAmount
public java.util.Optional<java.math.BigDecimal> getAmount()
-
setAmount
public void setAmount(java.math.BigDecimal amount)
-
getFixedPrecision
public int getFixedPrecision()
-
isCurrencyBeforeAmount
public boolean isCurrencyBeforeAmount()
-
setCurrencyBeforeAmount
public CurrencyField setCurrencyBeforeAmount(boolean currencyBeforeAmount)
-
isCurrencySymbolsEnabled
public boolean isCurrencySymbolsEnabled()
-
setCurrencySymbolsEnabled
public CurrencyField setCurrencySymbolsEnabled(boolean currencySymbolsEnabled)
-
isAlphabeticKeysQueryEnabled
public boolean isAlphabeticKeysQueryEnabled()
-
setFixedPrecision
public void setFixedPrecision(int fixedPrecision)
-
setAlphabeticKeysQueryEnabled
public void setAlphabeticKeysQueryEnabled(boolean alphabeticKeysQueryEnabled)
-
getLocale
public java.util.Locale getLocale()
-
getULocale
public com.ibm.icu.util.ULocale getULocale()
-
setLocale
public void setLocale(java.util.Locale locale)
-
setULocale
public void setULocale(com.ibm.icu.util.ULocale locale)
-
onTextInput
public Event<java.lang.String> onTextInput()
- Specified by:
onTextInputin interfaceTextInputHandlingField
-
onSpecialKeyPressed
public Event<SpecialKey> onSpecialKeyPressed()
- Specified by:
onSpecialKeyPressedin interfaceTextInputHandlingField
-
-