Class CurrencyField

java.lang.Object
All Implemented Interfaces:
ClientObject, Component, TextInputHandlingField

public class CurrencyField
extends AbstractField<CurrencyValue>
implements TextInputHandlingField
  • Field Details

    • onTextInput

      public final Event<java.lang.String> onTextInput
    • onSpecialKeyPressed

      public final Event<SpecialKey> onSpecialKeyPressed
  • Constructor Details

    • CurrencyField

      public CurrencyField()
    • CurrencyField

      public CurrencyField​(java.util.List<CurrencyUnit> currencies)
  • Method Details

    • createUiComponent

      public org.teamapps.dto.UiField createUiComponent()
      Specified by:
      createUiComponent in class AbstractComponent
    • handleUiEvent

      public void handleUiEvent​(org.teamapps.dto.UiEvent event)
      Specified by:
      handleUiEvent in interface ClientObject
      Overrides:
      handleUiEvent in class AbstractField<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: AbstractField
      Converts a server-side value to a client-side field-specific value. Implementations must not have any side effects to the component!
      Overrides:
      convertUxValueToUiValue in class AbstractField<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:
      convertUiValueToUxValue in class AbstractField<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:
      onTextInput in interface TextInputHandlingField
    • onSpecialKeyPressed

      public Event<SpecialKey> onSpecialKeyPressed()
      Specified by:
      onSpecialKeyPressed in interface TextInputHandlingField