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 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.SourceCodeEditor
SourceCodeEditor.Mode
-
Field Summary
Modifier and TypeFieldDescriptionprotected AutoCompleteSupport
protected HighlightMode
protected Suggester
protected SuggestionExtension
protected boolean
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.SourceCodeEditor
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AutoCompleteSupport
protected JmixSourceCodeEditor
void
focus()
Sets focus to this componentgetMode()
int
Returns a string representation of the value.int
Gets the tabulator index of theHasTabIndex
component.getValue()
protected void
handleAttach
(com.vaadin.server.ClientConnector.AttachEvent attachEvent) protected void
initComponent
(JmixSourceCodeEditor component) boolean
boolean
boolean
boolean
boolean
void
Reset the stack of undo/redo redo operations.void
setHandleTabKey
(boolean handleTabKey) Enables Tab key handling as tab symbol.void
setHighlightActiveLine
(boolean highlightActiveLine) void
setMode
(HighlightMode mode) void
setPrintMarginColumn
(int printMarginColumn) Set print margin position in symbolsvoid
setShowGutter
(boolean showGutter) void
setShowPrintMargin
(boolean showPrintMargin) void
setSuggester
(Suggester suggester) void
setSuggestOnDot
(boolean suggest) Sets whether SourceCodeEditor should suggest options after typing a dot character.void
setTabIndex
(int tabIndex) Sets the tabulator index of theFocusable
component.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, validate
Methods 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, valueBindingConnected
Methods 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, 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.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
isFocusable, setFocusable
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.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, 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
-
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:
getMode
in interfaceSourceCodeEditor
-
setMode
- Specified by:
setMode
in interfaceSourceCodeEditor
-
resetEditHistory
public void resetEditHistory()Description copied from interface:SourceCodeEditor
Reset the stack of undo/redo redo operations.- Specified by:
resetEditHistory
in interfaceSourceCodeEditor
-
getSuggester
- Specified by:
getSuggester
in interfaceSourceCodeEditor
-
setSuggester
- Specified by:
setSuggester
in interfaceSourceCodeEditor
-
getAutoCompleteSupport
- Specified by:
getAutoCompleteSupport
in interfaceSourceCodeEditor
-
setShowGutter
public void setShowGutter(boolean showGutter) - Specified by:
setShowGutter
in interfaceSourceCodeEditor
-
isShowGutter
public boolean isShowGutter()- Specified by:
isShowGutter
in interfaceSourceCodeEditor
-
setShowPrintMargin
public void setShowPrintMargin(boolean showPrintMargin) - Specified by:
setShowPrintMargin
in interfaceSourceCodeEditor
-
isShowPrintMargin
public boolean isShowPrintMargin()- Specified by:
isShowPrintMargin
in interfaceSourceCodeEditor
-
setPrintMarginColumn
public void setPrintMarginColumn(int printMarginColumn) Description copied from interface:SourceCodeEditor
Set print margin position in symbols- Specified by:
setPrintMarginColumn
in interfaceSourceCodeEditor
- Parameters:
printMarginColumn
- print margin position in symbols
-
getPrintMarginColumn
public int getPrintMarginColumn()- Specified by:
getPrintMarginColumn
in interfaceSourceCodeEditor
- Returns:
- print margin position in symbols
-
setHighlightActiveLine
public void setHighlightActiveLine(boolean highlightActiveLine) - Specified by:
setHighlightActiveLine
in interfaceSourceCodeEditor
-
isHighlightActiveLine
public boolean isHighlightActiveLine()- Specified by:
isHighlightActiveLine
in interfaceSourceCodeEditor
-
setHandleTabKey
public void setHandleTabKey(boolean handleTabKey) Description copied from interface:SourceCodeEditor
Enables 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:
setHandleTabKey
in interfaceSourceCodeEditor
-
isHandleTabKey
public boolean isHandleTabKey()- Specified by:
isHandleTabKey
in interfaceSourceCodeEditor
- Returns:
- if Tab key handling is enabled
-
getValue
- Specified by:
getValue
in interfaceHasValue<String>
- Specified by:
getValue
in interfaceSourceCodeEditor
- Overrides:
getValue
in classAbstractValueComponent<JmixSourceCodeEditor,
String, String>
-
getRawValue
Description copied from interface:SourceCodeEditor
Returns a string representation of the value.- Specified by:
getRawValue
in interfaceSourceCodeEditor
-
focus
public void focus()Description copied from interface:Component.Focusable
Sets focus to this component- Specified by:
focus
in interfaceComponent.Focusable
-
getTabIndex
public int getTabIndex()Description copied from interface:Component.Focusable
Gets the tabulator index of theHasTabIndex
component.- Specified by:
getTabIndex
in interfaceComponent.Focusable
- Returns:
- tab index set for the
HasTabIndex
component
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.Focusable
Sets the tabulator index of theFocusable
component. 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:
setTabIndex
in interfaceComponent.Focusable
- Parameters:
tabIndex
- tab index
-
isSuggestOnDot
public boolean isSuggestOnDot()- Specified by:
isSuggestOnDot
in interfaceSourceCodeEditor
- Returns:
- true if SourceCodeEditor suggests options after typing a dot character
-
setSuggestOnDot
public void setSuggestOnDot(boolean suggest) Description copied from interface:SourceCodeEditor
Sets whether SourceCodeEditor should suggest options after typing a dot character. Default value is true.- Specified by:
setSuggestOnDot
in interfaceSourceCodeEditor
- Parameters:
suggest
- suggest option
-