Interface CurrencyField<V extends Number>

All Superinterfaces:
Buffered, Component, Component.BelongToFrame, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Field<V>, HasContextHelp, HasConversionErrorMessage, HasDatatype<V>, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasValidator<V>, HasValue<V>, HasValueSource<V>, Requirable, Validatable
All Known Implementing Classes:
CurrencyFieldImpl

@StudioComponent(caption="CurrencyField", category="Components", xmlElement="currencyField", icon="io/jmix/ui/icon/component/currencyField.svg", canvasBehaviour=INPUT_FIELD, documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/currency-field.html") public interface CurrencyField<V extends Number> extends Field<V>, HasDatatype<V>, HasConversionErrorMessage, Buffered, Component.Focusable
The CurrencyField component is intended for displaying currency values.
  • Field Details

    • NAME

      static final String NAME
      See Also:
    • TYPE_DEFAULT

      static final org.springframework.core.ParameterizedTypeReference<CurrencyField<BigDecimal>> TYPE_DEFAULT
    • TYPE_BIGDECIMAL

      static final org.springframework.core.ParameterizedTypeReference<CurrencyField<BigDecimal>> TYPE_BIGDECIMAL
    • TYPE_INTEGER

      static final org.springframework.core.ParameterizedTypeReference<CurrencyField<Integer>> TYPE_INTEGER
    • TYPE_LONG

      static final org.springframework.core.ParameterizedTypeReference<CurrencyField<Long>> TYPE_LONG
    • TYPE_DOUBLE

      static final org.springframework.core.ParameterizedTypeReference<CurrencyField<Double>> TYPE_DOUBLE
  • Method Details

    • setCurrency

      @StudioProperty @Length(max=3) void setCurrency(@Nullable String currency)
      Sets the given currency to the field. Currency label will be displayed next to the text input component if the showCurrency option is enabled. Recommended max currency length - 3 character.
      Parameters:
      currency - currency ($, EUR, etc)
    • getCurrency

      @Nullable String getCurrency()
      Returns:
      current currency
    • setShowCurrencyLabel

      @StudioProperty(defaultValue="true") void setShowCurrencyLabel(boolean showCurrencyLabel)
      Enables or disables currency label displaying.
    • getShowCurrencyLabel

      boolean getShowCurrencyLabel()
      Returns:
      true if currency label is displayed or false otherwise
    • setCurrencyLabelPosition

      @StudioProperty(name="currencyLabelPosition", defaultValue="RIGHT", options={"RIGHT","LEFT"}) void setCurrencyLabelPosition(CurrencyField.CurrencyLabelPosition currencyLabelPosition)
      Sets where the currency label will be located: to the left or to the right from the text input component.
      Parameters:
      currencyLabelPosition - not-null CurrencyField.CurrencyLabelPosition value
    • getCurrencyLabelPosition

      CurrencyField.CurrencyLabelPosition getCurrencyLabelPosition()
      Returns:
      where the currency label is located