Interface SourceCodeEditor

All Superinterfaces:
Component, Component.BelongToFrame, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Field<String>, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasValidator<String>, HasValue<String>, HasValueSource<String>, Requirable, Validatable
All Known Implementing Classes:
SourceCodeEditorImpl

@StudioComponent(caption="SourceCodeEditor", category="Components", xmlElement="sourceCodeEditor", icon="io/jmix/ui/icon/component/sourceCodeEditor.svg", canvasBehaviour=SOURCE_CODE_EDITOR, documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/source-code-editor.html") public interface SourceCodeEditor extends Field<String>, Component.Focusable
Text area component with source code highlighting support.
  • Field Details

  • Method Details

    • getMode

      HighlightMode getMode()
    • setMode

      @StudioProperty(type=ENUMERATION, defaultValue="Text", options={"Java","HTML","CSS","SCSS","XML","Groovy","SQL","JavaScript","Properties","Text"}) void setMode(HighlightMode mode)
    • getSuggester

      @Nullable Suggester getSuggester()
    • setSuggester

      void setSuggester(@Nullable Suggester suggester)
    • getAutoCompleteSupport

      AutoCompleteSupport getAutoCompleteSupport()
    • setShowGutter

      @StudioProperty(defaultValue="true") void setShowGutter(boolean showGutter)
    • isShowGutter

      boolean isShowGutter()
    • setShowPrintMargin

      @StudioProperty(name="printMargin", defaultValue="true") void setShowPrintMargin(boolean showPrintMargin)
    • isShowPrintMargin

      boolean isShowPrintMargin()
    • setPrintMarginColumn

      @StudioProperty(defaultValue="80") void setPrintMarginColumn(int printMarginColumn)
      Set print margin position in symbols
      Parameters:
      printMarginColumn - print margin position in symbols
    • getPrintMarginColumn

      int getPrintMarginColumn()
      Returns:
      print margin position in symbols
    • setHighlightActiveLine

      @StudioProperty(defaultValue="true") void setHighlightActiveLine(boolean highlightActiveLine)
    • isHighlightActiveLine

      boolean isHighlightActiveLine()
    • setHandleTabKey

      @StudioProperty(defaultValue="true") void setHandleTabKey(boolean handleTabKey)
      Enables Tab key handling as tab symbol. If handleTabKey is false then Tab/Shift-Tab key press will change focus to next/previous field.
    • isHandleTabKey

      boolean isHandleTabKey()
      Returns:
      if Tab key handling is enabled
    • getValue

      @Nullable String getValue()
      Specified by:
      getValue in interface HasValue<String>
    • getRawValue

      String getRawValue()
      Returns a string representation of the value.
    • resetEditHistory

      void resetEditHistory()
      Reset the stack of undo/redo redo operations.
    • isSuggestOnDot

      boolean isSuggestOnDot()
      Returns:
      true if SourceCodeEditor suggests options after typing a dot character
    • setSuggestOnDot

      @StudioProperty(name="suggestOnDot", defaultValue="true") void setSuggestOnDot(boolean suggest)
      Sets whether SourceCodeEditor should suggest options after typing a dot character. Default value is true.
      Parameters:
      suggest - suggest option