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.
|
Field.Validator<T>
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
static com.google.common.reflect.TypeToken<CurrencyField<java.math.BigDecimal>> |
TYPE_BIGDECIMAL |
static com.google.common.reflect.TypeToken<CurrencyField<java.math.BigDecimal>> |
TYPE_DEFAULT |
static com.google.common.reflect.TypeToken<CurrencyField<java.lang.Double>> |
TYPE_DOUBLE |
static com.google.common.reflect.TypeToken<CurrencyField<java.lang.Integer>> |
TYPE_INTEGER |
static com.google.common.reflect.TypeToken<CurrencyField<java.lang.Long>> |
TYPE_LONG |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
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.
|
addValidator, getRequiredMessage, getValidators, isRequired, removeValidator, setRequired, setRequiredMessage
getDatasource, getMetaProperty, getMetaPropertyPath, setDatasource
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, removeValueChangeListener, setValue
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getValueSource, setValueSource
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
getDatatype, setDatatype
getConversionErrorMessage, setConversionErrorMessage
commit, discard, isBuffered, isModified, setBuffered
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
static final java.lang.String NAME
static final com.google.common.reflect.TypeToken<CurrencyField<java.math.BigDecimal>> TYPE_DEFAULT
static final com.google.common.reflect.TypeToken<CurrencyField<java.math.BigDecimal>> TYPE_BIGDECIMAL
static final com.google.common.reflect.TypeToken<CurrencyField<java.lang.Integer>> TYPE_INTEGER
static final com.google.common.reflect.TypeToken<CurrencyField<java.lang.Long>> TYPE_LONG
static final com.google.common.reflect.TypeToken<CurrencyField<java.lang.Double>> TYPE_DOUBLE
void setCurrency(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)java.lang.String getCurrency()
void setShowCurrencyLabel(boolean showCurrencyLabel)
boolean getShowCurrencyLabel()
void setCurrencyLabelPosition(CurrencyField.CurrencyLabelPosition currencyLabelPosition)
currencyLabelPosition
- not-null CurrencyField.CurrencyLabelPosition
valueCurrencyField.CurrencyLabelPosition getCurrencyLabelPosition()