Package io.jmix.ui.component.impl
Class SourceCodeEditorImpl
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<JmixSourceCodeEditor,String,String>
io.jmix.ui.component.impl.SourceCodeEditorImpl
- All Implemented Interfaces:
AttachNotifier,Component,Component.BelongToFrame,Component.Editable,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,HasValueSource<String>,Field<String>,HasContextHelp,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasValidator<String>,HasValue<String>,Requirable,SourceCodeEditor,Validatable
public class SourceCodeEditorImpl
extends AbstractField<JmixSourceCodeEditor,String,String>
implements SourceCodeEditor
-
Nested Class Summary
Nested ClassesNested 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.SourceCodeEditor
SourceCodeEditor.Mode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AutoCompleteSupportprotected HighlightModeprotected Suggesterprotected SuggestionExtensionprotected booleanFields 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.SourceCodeEditor
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AutoCompleteSupportprotected JmixSourceCodeEditorvoidfocus()Sets focus to this componentgetMode()intReturns a string representation of the value.intGets the tabulator index of theHasTabIndexcomponent.getValue()protected voidhandleAttach(com.vaadin.server.ClientConnector.AttachEvent attachEvent) protected voidinitComponent(JmixSourceCodeEditor component) booleanbooleanbooleanbooleanbooleanvoidReset the stack of undo/redo redo operations.voidsetHandleTabKey(boolean handleTabKey) Enables Tab key handling as tab symbol.voidsetHighlightActiveLine(boolean highlightActiveLine) voidsetMode(HighlightMode mode) voidsetPrintMarginColumn(int printMarginColumn) Set print margin position in symbolsvoidsetShowGutter(boolean showGutter) voidsetShowPrintMargin(boolean showPrintMargin) voidsetSuggester(Suggester suggester) voidsetSuggestOnDot(boolean suggest) Sets whether SourceCodeEditor should suggest options after typing a dot character.voidsetTabIndex(int tabIndex) Sets the tabulator index of theFocusablecomponent.Methods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validateMethods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, commit, componentValueChanged, convertToModel, convertToPresentation, discard, fieldValueEquals, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValue, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnectedMethods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, 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.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
isFocusable, setFocusableMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods 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.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods 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.HasValidator
addValidator, addValidators, getValidators, removeValidatorMethods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, isEmpty, setValueMethods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSourceMethods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessageMethods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
suggestOnDot
protected boolean suggestOnDot -
mode
-
suggester
-
suggestionExtension
-
autoCompleteSupport
-
-
Constructor Details
-
SourceCodeEditorImpl
public SourceCodeEditorImpl()
-
-
Method Details
-
createComponent
-
createAutoCompleteSupport
-
initComponent
-
handleAttach
protected void handleAttach(com.vaadin.server.ClientConnector.AttachEvent attachEvent) -
getMode
- Specified by:
getModein interfaceSourceCodeEditor
-
setMode
- Specified by:
setModein interfaceSourceCodeEditor
-
resetEditHistory
public void resetEditHistory()Description copied from interface:SourceCodeEditorReset the stack of undo/redo redo operations.- Specified by:
resetEditHistoryin interfaceSourceCodeEditor
-
getSuggester
- Specified by:
getSuggesterin interfaceSourceCodeEditor
-
setSuggester
- Specified by:
setSuggesterin interfaceSourceCodeEditor
-
getAutoCompleteSupport
- Specified by:
getAutoCompleteSupportin interfaceSourceCodeEditor
-
setShowGutter
public void setShowGutter(boolean showGutter) - Specified by:
setShowGutterin interfaceSourceCodeEditor
-
isShowGutter
public boolean isShowGutter()- Specified by:
isShowGutterin interfaceSourceCodeEditor
-
setShowPrintMargin
public void setShowPrintMargin(boolean showPrintMargin) - Specified by:
setShowPrintMarginin interfaceSourceCodeEditor
-
isShowPrintMargin
public boolean isShowPrintMargin()- Specified by:
isShowPrintMarginin interfaceSourceCodeEditor
-
setPrintMarginColumn
public void setPrintMarginColumn(int printMarginColumn) Description copied from interface:SourceCodeEditorSet print margin position in symbols- Specified by:
setPrintMarginColumnin interfaceSourceCodeEditor- Parameters:
printMarginColumn- print margin position in symbols
-
getPrintMarginColumn
public int getPrintMarginColumn()- Specified by:
getPrintMarginColumnin interfaceSourceCodeEditor- Returns:
- print margin position in symbols
-
setHighlightActiveLine
public void setHighlightActiveLine(boolean highlightActiveLine) - Specified by:
setHighlightActiveLinein interfaceSourceCodeEditor
-
isHighlightActiveLine
public boolean isHighlightActiveLine()- Specified by:
isHighlightActiveLinein interfaceSourceCodeEditor
-
setHandleTabKey
public void setHandleTabKey(boolean handleTabKey) Description copied from interface:SourceCodeEditorEnables Tab key handling as tab symbol. If handleTabKey is false then Tab/Shift-Tab key press will change focus to next/previous field.- Specified by:
setHandleTabKeyin interfaceSourceCodeEditor
-
isHandleTabKey
public boolean isHandleTabKey()- Specified by:
isHandleTabKeyin interfaceSourceCodeEditor- Returns:
- if Tab key handling is enabled
-
getValue
- Specified by:
getValuein interfaceHasValue<String>- Specified by:
getValuein interfaceSourceCodeEditor- Overrides:
getValuein classAbstractValueComponent<JmixSourceCodeEditor,String, String>
-
getRawValue
Description copied from interface:SourceCodeEditorReturns a string representation of the value.- Specified by:
getRawValuein interfaceSourceCodeEditor
-
focus
public void focus()Description copied from interface:Component.FocusableSets focus to this component- Specified by:
focusin interfaceComponent.Focusable
-
getTabIndex
public int getTabIndex()Description copied from interface:Component.FocusableGets the tabulator index of theHasTabIndexcomponent.- Specified by:
getTabIndexin interfaceComponent.Focusable- Returns:
- tab index set for the
HasTabIndexcomponent
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.FocusableSets the tabulator index of theFocusablecomponent. The tab index property is used to specify the order in which the fields are focused when the user presses the Tab key. Components with a defined tab index are focused sequentially first, and then the components with no tab index.- Specified by:
setTabIndexin interfaceComponent.Focusable- Parameters:
tabIndex- tab index
-
isSuggestOnDot
public boolean isSuggestOnDot()- Specified by:
isSuggestOnDotin interfaceSourceCodeEditor- Returns:
- true if SourceCodeEditor suggests options after typing a dot character
-
setSuggestOnDot
public void setSuggestOnDot(boolean suggest) Description copied from interface:SourceCodeEditorSets whether SourceCodeEditor should suggest options after typing a dot character. Default value is true.- Specified by:
setSuggestOnDotin interfaceSourceCodeEditor- Parameters:
suggest- suggest option
-