Package io.jmix.ui.component
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.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Defines where the currency label is located.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<BigDecimal>>
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<BigDecimal>>
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<Double>>
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<Integer>>
static final org.springframework.core.ParameterizedTypeReference<CurrencyField<Long>>
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setCurrency
(String currency) Sets the givencurrency
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.Methods inherited from interface io.jmix.ui.component.Buffered
commit, discard, isBuffered, isModified, setBuffered
Methods inherited from interface io.jmix.ui.component.Component
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
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasConversionErrorMessage
getConversionErrorMessage, setConversionErrorMessage
Methods inherited from interface io.jmix.ui.component.HasDatatype
getDatatype, setDatatype
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValue
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
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
-
TYPE_DOUBLE
-
-
Method Details
-
setCurrency
Sets the givencurrency
to the field. Currency label will be displayed next to the text input component if theshowCurrency
option is enabled. Recommended max currency length - 3 character.- Parameters:
currency
- currency ($, EUR, etc)
-
getCurrency
- Returns:
- current currency
-
setShowCurrencyLabel
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-nullCurrencyField.CurrencyLabelPosition
value
-
getCurrencyLabelPosition
CurrencyField.CurrencyLabelPosition getCurrencyLabelPosition()- Returns:
- where the currency label is located
-