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.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>
Nested classes/interfaces inherited from interface io.jmix.ui.component.ResizableTextArea
ResizableTextArea.ResizeDirection, ResizableTextArea.ResizeEvent
Nested 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
Fields inherited from class io.jmix.ui.component.impl.AbstractTextArea
conversionErrorMessage, dataAwareComponentsTools, datatype, locale, trimming
Fields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
Fields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBinding
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.ResizableTextArea
NAME
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that is fired when the component is resized.void
protected void
componentValueChanged
(String prevComponentValue, String newComponentValue, boolean isUserOriginated) protected JmixTextArea
com.vaadin.ui.Component
Get the direction in which the textArea size changes.protected void
initComponent
(JmixTextArea component) boolean
boolean
protected void
void
setCaption
(String caption) Sets the component's caption.void
setCaptionAsHtml
(boolean captionAsHtml) Sets whether the caption is rendered as HTML.void
setCaseConversion
(TextInputField.CaseConversion caseConversion) Disable automatic case conversion or enable with chosen modevoid
setDescription
(String description) Sets the component's description.protected void
setEditableToComponent
(boolean editable) void
setRequired
(boolean required) Sets whether the component must contain a non-null value.void
setRequiredMessage
(String msg) Sets a message that will be displayed to user if the field is required but has null value.void
Allows 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, valueBindingConnected
Methods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getValidators, isEditable, isValid, removeValidator, setEditable, setParent, setupComponentErrorProvider, triggerValidators, validate
Methods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, fieldValueEquals, getValue, getValueSource, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivated
Methods 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, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.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.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasInputPrompt
getInputPrompt, setInputPrompt
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.TextArea
getRawValue, getRows, isWordWrap, setRows, setWordWrap
Methods inherited from interface io.jmix.ui.component.TextInputField.CursorPositionSupported
setCursorPosition
Methods inherited from interface io.jmix.ui.component.TextInputField.MaxLengthLimited
getMaxLength, setMaxLength
Methods inherited from interface io.jmix.ui.component.TextInputField.TextChangeNotifier
addTextChangeListener, getTextChangeEventMode, getTextChangeTimeout, setTextChangeEventMode, setTextChangeTimeout
Methods inherited from interface io.jmix.ui.component.TextInputField.TextSelectionSupported
selectAll, setSelectionRange
Methods inherited from interface io.jmix.ui.component.TextInputField.TrimSupported
isTrimming, setTrimming
Methods 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:
componentValueChanged
in classAbstractTextArea<JmixTextArea,
V>
-
createComponent
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
-
getComposition
public com.vaadin.ui.Component getComposition()- Specified by:
getComposition
in interfaceComponent.Wrapper
- Overrides:
getComposition
in classAbstractComponent<JmixTextArea>
-
getCaption
- Specified by:
getCaption
in interfaceComponent.HasCaption
- Overrides:
getCaption
in classAbstractComponent<JmixTextArea>
- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaption
Sets the component's caption.- Specified by:
setCaption
in interfaceComponent.HasCaption
- Overrides:
setCaption
in classAbstractComponent<JmixTextArea>
- Parameters:
caption
- the new component's caption
-
isCaptionAsHtml
public boolean isCaptionAsHtml()- Specified by:
isCaptionAsHtml
in interfaceHasHtmlCaption
- Overrides:
isCaptionAsHtml
in classAbstractComponent<JmixTextArea>
- Returns:
true
if the caption is rendered as HTML,false
if rendered as plain text
-
setCaptionAsHtml
public void setCaptionAsHtml(boolean captionAsHtml) Description copied from interface:HasHtmlCaption
Sets whether the caption is rendered as HTML.- Specified by:
setCaptionAsHtml
in interfaceHasHtmlCaption
- Overrides:
setCaptionAsHtml
in classAbstractComponent<JmixTextArea>
- Parameters:
captionAsHtml
-true
if the caption is rendered as HTML,false
if rendered as plain text- See Also:
-
getDescription
- Specified by:
getDescription
in interfaceComponent.HasDescription
- Overrides:
getDescription
in classAbstractComponent<JmixTextArea>
- Returns:
- the components description, used in tooltips
-
setDescription
Description copied from interface:Component.HasDescription
Sets the component's description.- Specified by:
setDescription
in interfaceComponent.HasDescription
- Overrides:
setDescription
in classAbstractComponent<JmixTextArea>
- Parameters:
description
- the new description to set
-
isRequired
public boolean isRequired()- Specified by:
isRequired
in interfaceRequirable
- Overrides:
isRequired
in classAbstractField<JmixTextArea,
String, V> - Returns:
- whether the component must contain a non-null value
-
setRequired
public void setRequired(boolean required) Description copied from interface:Requirable
Sets whether the component must contain a non-null value.- Specified by:
setRequired
in interfaceRequirable
- Overrides:
setRequired
in classAbstractField<JmixTextArea,
String, V> - Parameters:
required
- required
-
setEditableToComponent
protected void setEditableToComponent(boolean editable) - Overrides:
setEditableToComponent
in classAbstractField<JmixTextArea,
String, V>
-
getRequiredMessage
- Specified by:
getRequiredMessage
in interfaceRequirable
- Overrides:
getRequiredMessage
in 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:Requirable
Sets a message that will be displayed to user if the field is required but has null value.- Specified by:
setRequiredMessage
in interfaceRequirable
- Overrides:
setRequiredMessage
in classAbstractField<JmixTextArea,
String, V> - Parameters:
msg
- message
-
getCaseConversion
- Specified by:
getCaseConversion
in interfaceTextInputField.CaseConversionSupported
- Returns:
- conversion mode or null if automatic conversion is disabled
-
setCaseConversion
Description copied from interface:TextInputField.CaseConversionSupported
Disable automatic case conversion or enable with chosen mode- Specified by:
setCaseConversion
in interfaceTextInputField.CaseConversionSupported
-
getResizableDirection
Description copied from interface:ResizableTextArea
Get the direction in which the textArea size changes.- Specified by:
getResizableDirection
in interfaceResizableTextArea<V>
- Returns:
- direction.
-
addResizeListener
Description copied from interface:ResizableTextArea
Adds a listener that is fired when the component is resized.- Specified by:
addResizeListener
in interfaceResizableTextArea<V>
- Parameters:
listener
- a listener to add- Returns:
- a subscription
-
setResizableDirection
Description copied from interface:ResizableTextArea
Allows resizing textArea in a given direction.- Specified by:
setResizableDirection
in interfaceResizableTextArea<V>
- Parameters:
direction
- the direction in which resizes textArea.
-
onResize
-