@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%/backoffice-ui/vcl/components/currency-field.html") public interface CurrencyField<V extends java.lang.Number> extends Field<V>, HasDatatype<V>, HasConversionErrorMessage, Buffered, Component.Focusable
Modifier and Type | Interface and Description |
---|---|
static class |
CurrencyField.CurrencyLabelPosition
Defines where the currency label is located.
|
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static org.springframework.core.ParameterizedTypeReference<CurrencyField<java.math.BigDecimal>> |
TYPE_BIGDECIMAL |
static org.springframework.core.ParameterizedTypeReference<CurrencyField<java.math.BigDecimal>> |
TYPE_DEFAULT |
static org.springframework.core.ParameterizedTypeReference<CurrencyField<java.lang.Double>> |
TYPE_DOUBLE |
static org.springframework.core.ParameterizedTypeReference<CurrencyField<java.lang.Integer>> |
TYPE_INTEGER |
static org.springframework.core.ParameterizedTypeReference<CurrencyField<java.lang.Long>> |
TYPE_LONG |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCurrency() |
CurrencyField.CurrencyLabelPosition |
getCurrencyLabelPosition() |
boolean |
getShowCurrencyLabel() |
void |
setCurrency(java.lang.String currency)
Sets the given
currency to the field. |
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.
|
void |
setShowCurrencyLabel(boolean showCurrencyLabel)
Enables or disables currency label displaying.
|
getValueSource, setValueSource
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
addValidator, addValidators, getValidators, removeValidator
getRequiredMessage, isRequired, setRequired, setRequiredMessage
getDatatype, setDatatype
getConversionErrorMessage, setConversionErrorMessage
commit, discard, isBuffered, isModified, setBuffered
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
static final java.lang.String NAME
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<java.math.BigDecimal>> TYPE_DEFAULT
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<java.math.BigDecimal>> TYPE_BIGDECIMAL
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<java.lang.Integer>> TYPE_INTEGER
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<java.lang.Long>> TYPE_LONG
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<java.lang.Double>> TYPE_DOUBLE
@StudioProperty @Length(max=3) void setCurrency(@Nullable java.lang.String currency)
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.currency
- currency ($, EUR, etc)@Nullable java.lang.String getCurrency()
@StudioProperty(defaultValue="true") void setShowCurrencyLabel(boolean showCurrencyLabel)
boolean getShowCurrencyLabel()
@StudioProperty(name="currencyLabelPosition", defaultValue="RIGHT", options={"RIGHT","LEFT"}) void setCurrencyLabelPosition(CurrencyField.CurrencyLabelPosition currencyLabelPosition)
currencyLabelPosition
- not-null CurrencyField.CurrencyLabelPosition
valueCurrencyField.CurrencyLabelPosition getCurrencyLabelPosition()