Package io.jmix.ui.component.impl
Class ResizableTextAreaImpl<V>
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractValueComponent<T,P,V>
io.jmix.ui.component.impl.AbstractField<T,String,V>
io.jmix.ui.component.impl.AbstractTextArea<JmixTextArea,V>
io.jmix.ui.component.impl.ResizableTextAreaImpl<V>
- All Implemented Interfaces:
AttachNotifier,Buffered,Component,Component.BelongToFrame,Component.Editable,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,HasValueSource<V>,Field<V>,HasContextHelp,HasConversionErrorMessage,HasDatatype<V>,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasInputPrompt,HasValidator<V>,HasValue<V>,Requirable,ResizableTextArea<V>,TextArea<V>,TextInputField<V>,TextInputField.CaseConversionSupported,TextInputField.CursorPositionSupported,TextInputField.MaxLengthLimited,TextInputField.TextChangeNotifier,TextInputField.TextSelectionSupported,TextInputField.TrimSupported,Validatable,org.springframework.beans.factory.InitializingBean
public class ResizableTextAreaImpl<V>
extends AbstractTextArea<JmixTextArea,V>
implements ResizableTextArea<V>, org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>Nested classes/interfaces inherited from interface io.jmix.ui.component.ResizableTextArea
ResizableTextArea.ResizeDirection, ResizableTextArea.ResizeEventNested classes/interfaces inherited from interface io.jmix.ui.component.TextInputField
TextInputField.CaseConversion, TextInputField.CaseConversionSupported, TextInputField.CursorPositionSupported, TextInputField.EnterPressEvent, TextInputField.EnterPressNotifier, TextInputField.HtmlNameSupported, TextInputField.MaxLengthLimited, TextInputField.TextChangeEvent, TextInputField.TextChangeEventMode, TextInputField.TextChangeNotifier, TextInputField.TextSelectionSupported, TextInputField.TrimSupported -
Field Summary
FieldsFields inherited from class io.jmix.ui.component.impl.AbstractTextArea
conversionErrorMessage, dataAwareComponentsTools, datatype, locale, trimmingFields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITYFields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBindingFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZEFields inherited from interface io.jmix.ui.component.ResizableTextArea
NAMEFields inherited from interface io.jmix.ui.component.TextArea
NAME, TYPE_BIGDECIMAL, TYPE_DATE, TYPE_DATETIME, TYPE_DEFAULT, TYPE_DOUBLE, TYPE_INTEGER, TYPE_LOCALDATE, TYPE_LOCALDATETIME, TYPE_LONG, TYPE_OFFSETTIME, TYPE_STRING, TYPE_TIME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that is fired when the component is resized.voidprotected voidcomponentValueChanged(String prevComponentValue, String newComponentValue, boolean isUserOriginated) protected JmixTextAreacom.vaadin.ui.ComponentGet the direction in which the textArea size changes.protected voidinitComponent(JmixTextArea component) booleanbooleanprotected voidvoidsetCaption(String caption) Sets the component's caption.voidsetCaptionAsHtml(boolean captionAsHtml) Sets whether the caption is rendered as HTML.voidsetCaseConversion(TextInputField.CaseConversion caseConversion) Disable automatic case conversion or enable with chosen modevoidsetDescription(String description) Sets the component's description.protected voidsetEditableToComponent(boolean editable) voidsetRequired(boolean required) Sets whether the component must contain a non-null value.voidsetRequiredMessage(String msg) Sets a message that will be displayed to user if the field is required but has null value.voidAllows resizing textArea in a given direction.Methods inherited from class io.jmix.ui.component.impl.AbstractTextArea
addTextChangeListener, commit, convertToModel, convertToPresentation, discard, fireTextChangeEvent, focus, getConversionErrorMessage, getConversionErrorMessageInternal, getDatatype, getInputPrompt, getMaxLength, getRawValue, getRows, getTabIndex, getTextChangeEventMode, getTextChangeTimeout, isBuffered, isEmpty, isModified, isTrimming, isWordWrap, selectAll, setBuffered, setConversionErrorMessage, setCurrentAuthentication, setCursorPosition, setDataAwareComponentsTools, setDatatype, setInputPrompt, setMaxLength, setRows, setSelectionRange, setTabIndex, setTextChangeEventMode, setTextChangeTimeout, setTrimming, setWordWrap, valueBindingConnectedMethods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getValidators, isEditable, isValid, removeValidator, setEditable, setParent, setupComponentErrorProvider, triggerValidators, validateMethods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, fieldValueEquals, getValue, getValueSource, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivatedMethods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getComponent, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.Buffered
commit, discard, isBuffered, isModified, setBufferedMethods 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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasConversionErrorMessage
getConversionErrorMessage, setConversionErrorMessageMethods inherited from interface io.jmix.ui.component.HasDatatype
getDatatype, setDatatypeMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasInputPrompt
getInputPrompt, setInputPromptMethods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidatorMethods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueMethods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSourceMethods inherited from interface io.jmix.ui.component.TextArea
getRawValue, getRows, isWordWrap, setRows, setWordWrapMethods inherited from interface io.jmix.ui.component.TextInputField.CursorPositionSupported
setCursorPositionMethods inherited from interface io.jmix.ui.component.TextInputField.MaxLengthLimited
getMaxLength, setMaxLengthMethods inherited from interface io.jmix.ui.component.TextInputField.TextChangeNotifier
addTextChangeListener, getTextChangeEventMode, getTextChangeTimeout, setTextChangeEventMode, setTextChangeTimeoutMethods inherited from interface io.jmix.ui.component.TextInputField.TextSelectionSupported
selectAll, setSelectionRangeMethods inherited from interface io.jmix.ui.component.TextInputField.TrimSupported
isTrimming, setTrimmingMethods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
wrapper
-
-
Constructor Details
-
ResizableTextAreaImpl
public ResizableTextAreaImpl()
-
-
Method Details
-
componentValueChanged
protected void componentValueChanged(String prevComponentValue, String newComponentValue, boolean isUserOriginated) - Overrides:
componentValueChangedin classAbstractTextArea<JmixTextArea,V>
-
createComponent
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
-
getComposition
public com.vaadin.ui.Component getComposition()- Specified by:
getCompositionin interfaceComponent.Wrapper- Overrides:
getCompositionin classAbstractComponent<JmixTextArea>
-
getCaption
- Specified by:
getCaptionin interfaceComponent.HasCaption- Overrides:
getCaptionin classAbstractComponent<JmixTextArea>- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaptionSets the component's caption.- Specified by:
setCaptionin interfaceComponent.HasCaption- Overrides:
setCaptionin classAbstractComponent<JmixTextArea>- Parameters:
caption- the new component's caption
-
isCaptionAsHtml
public boolean isCaptionAsHtml()- Specified by:
isCaptionAsHtmlin interfaceHasHtmlCaption- Overrides:
isCaptionAsHtmlin classAbstractComponent<JmixTextArea>- Returns:
trueif the caption is rendered as HTML,falseif rendered as plain text
-
setCaptionAsHtml
public void setCaptionAsHtml(boolean captionAsHtml) Description copied from interface:HasHtmlCaptionSets whether the caption is rendered as HTML.- Specified by:
setCaptionAsHtmlin interfaceHasHtmlCaption- Overrides:
setCaptionAsHtmlin classAbstractComponent<JmixTextArea>- Parameters:
captionAsHtml-trueif the caption is rendered as HTML,falseif rendered as plain text- See Also:
-
getDescription
- Specified by:
getDescriptionin interfaceComponent.HasDescription- Overrides:
getDescriptionin classAbstractComponent<JmixTextArea>- Returns:
- the components description, used in tooltips
-
setDescription
Description copied from interface:Component.HasDescriptionSets the component's description.- Specified by:
setDescriptionin interfaceComponent.HasDescription- Overrides:
setDescriptionin classAbstractComponent<JmixTextArea>- Parameters:
description- the new description to set
-
isRequired
public boolean isRequired()- Specified by:
isRequiredin interfaceRequirable- Overrides:
isRequiredin classAbstractField<JmixTextArea,String, V> - Returns:
- whether the component must contain a non-null value
-
setRequired
public void setRequired(boolean required) Description copied from interface:RequirableSets whether the component must contain a non-null value.- Specified by:
setRequiredin interfaceRequirable- Overrides:
setRequiredin classAbstractField<JmixTextArea,String, V> - Parameters:
required- required
-
setEditableToComponent
protected void setEditableToComponent(boolean editable) - Overrides:
setEditableToComponentin classAbstractField<JmixTextArea,String, V>
-
getRequiredMessage
- Specified by:
getRequiredMessagein interfaceRequirable- Overrides:
getRequiredMessagein classAbstractField<JmixTextArea,String, V> - Returns:
- a message that will be displayed to user if the component is required but has null value
-
setRequiredMessage
Description copied from interface:RequirableSets a message that will be displayed to user if the field is required but has null value.- Specified by:
setRequiredMessagein interfaceRequirable- Overrides:
setRequiredMessagein classAbstractField<JmixTextArea,String, V> - Parameters:
msg- message
-
getCaseConversion
- Specified by:
getCaseConversionin interfaceTextInputField.CaseConversionSupported- Returns:
- conversion mode or null if automatic conversion is disabled
-
setCaseConversion
Description copied from interface:TextInputField.CaseConversionSupportedDisable automatic case conversion or enable with chosen mode- Specified by:
setCaseConversionin interfaceTextInputField.CaseConversionSupported
-
getResizableDirection
Description copied from interface:ResizableTextAreaGet the direction in which the textArea size changes.- Specified by:
getResizableDirectionin interfaceResizableTextArea<V>- Returns:
- direction.
-
addResizeListener
Description copied from interface:ResizableTextAreaAdds a listener that is fired when the component is resized.- Specified by:
addResizeListenerin interfaceResizableTextArea<V>- Parameters:
listener- a listener to add- Returns:
- a subscription
-
setResizableDirection
Description copied from interface:ResizableTextAreaAllows resizing textArea in a given direction.- Specified by:
setResizableDirectionin interfaceResizableTextArea<V>- Parameters:
direction- the direction in which resizes textArea.
-
onResize
-