Class AceEditorWidget

java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.FocusWidget
io.jmix.ui.widget.client.addon.aceeditor.AceEditorWidget
All Implemented Interfaces:
com.google.gwt.event.dom.client.HasAllDragAndDropHandlers, com.google.gwt.event.dom.client.HasAllFocusHandlers, com.google.gwt.event.dom.client.HasAllGestureHandlers, com.google.gwt.event.dom.client.HasAllKeyHandlers, com.google.gwt.event.dom.client.HasAllMouseHandlers, com.google.gwt.event.dom.client.HasAllTouchHandlers, com.google.gwt.event.dom.client.HasBlurHandlers, com.google.gwt.event.dom.client.HasClickHandlers, com.google.gwt.event.dom.client.HasDoubleClickHandlers, com.google.gwt.event.dom.client.HasDragEndHandlers, com.google.gwt.event.dom.client.HasDragEnterHandlers, com.google.gwt.event.dom.client.HasDragHandlers, com.google.gwt.event.dom.client.HasDragLeaveHandlers, com.google.gwt.event.dom.client.HasDragOverHandlers, com.google.gwt.event.dom.client.HasDragStartHandlers, com.google.gwt.event.dom.client.HasDropHandlers, com.google.gwt.event.dom.client.HasFocusHandlers, com.google.gwt.event.dom.client.HasGestureChangeHandlers, com.google.gwt.event.dom.client.HasGestureEndHandlers, com.google.gwt.event.dom.client.HasGestureStartHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.dom.client.HasMouseDownHandlers, com.google.gwt.event.dom.client.HasMouseMoveHandlers, com.google.gwt.event.dom.client.HasMouseOutHandlers, com.google.gwt.event.dom.client.HasMouseOverHandlers, com.google.gwt.event.dom.client.HasMouseUpHandlers, com.google.gwt.event.dom.client.HasMouseWheelHandlers, com.google.gwt.event.dom.client.HasTouchCancelHandlers, com.google.gwt.event.dom.client.HasTouchEndHandlers, com.google.gwt.event.dom.client.HasTouchMoveHandlers, com.google.gwt.event.dom.client.HasTouchStartHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.Focusable, com.google.gwt.user.client.ui.HasEnabled, com.google.gwt.user.client.ui.HasFocus, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.SourcesClickEvents, com.google.gwt.user.client.ui.SourcesFocusEvents, com.google.gwt.user.client.ui.SourcesKeyboardEvents, com.google.gwt.user.client.ui.SourcesMouseEvents, GwtAceChangeCursorHandler, GwtAceChangeHandler, GwtAceChangeSelectionHandler, GwtAceFocusBlurHandler
Direct Known Subclasses:
JmixSourceCodeEditorWidget

public class AceEditorWidget extends com.google.gwt.user.client.ui.FocusWidget implements GwtAceChangeHandler, GwtAceFocusBlurHandler, GwtAceChangeSelectionHandler, GwtAceChangeCursorHandler
A Widget containing GwtAceEditor
  • Field Details

  • Constructor Details

    • AceEditorWidget

      public AceEditorWidget()
  • Method Details

    • addTextChangeListener

      public void addTextChangeListener(AceEditorWidget.TextChangeListener li)
    • removeTextChangeListener

      public void removeTextChangeListener(AceEditorWidget.TextChangeListener li)
    • addSelectionChangeListener

      public void addSelectionChangeListener(AceEditorWidget.SelectionChangeListener li)
    • removeSelectionChangeListener

      public void removeSelectionChangeListener(AceEditorWidget.SelectionChangeListener li)
    • setFocusChangeListener

      public void setFocusChangeListener(AceEditorWidget.FocusChangeListener li)
    • nextId

      protected static String nextId()
    • isInitialized

      public boolean isInitialized()
    • initialize

      public void initialize()
    • setKeyboardHandler

      public void setKeyboardHandler(GwtAceKeyboardHandler handler)
    • setWidth

      public void setWidth(String w)
      Overrides:
      setWidth in class com.google.gwt.user.client.ui.UIObject
    • setHeight

      public void setHeight(String h)
      Overrides:
      setHeight in class com.google.gwt.user.client.ui.UIObject
    • setWordwrap

      public void setWordwrap(boolean wrap)
    • setShowGutter

      public void setShowGutter(boolean showGutter)
    • setShowPrintMargin

      public void setShowPrintMargin(boolean showPrintMargin)
    • setHighlightActiveLineEnabled

      public void setHighlightActiveLineEnabled(boolean highlightActiveLine)
    • setDisplayIndentGuides

      public void setDisplayIndentGuides(boolean displayIndentGuides)
    • setUseSoftTabs

      public void setUseSoftTabs(boolean softTabs)
    • setTabSize

      public void setTabSize(int tabSize)
    • setText

      protected void setText(String text)
    • adjustInvisibleMarkersOnTextChange

      protected void adjustInvisibleMarkersOnTextChange(ClientSideDocDiff.Adjuster adjuster)
    • setSelection

      public void setSelection(AceRange s)
    • setSelection

      protected void setSelection(AceRange s, boolean force)
    • setMode

      public void setMode(String mode)
    • setTheme

      public void setTheme(String theme)
    • setFontSize

      public void setFontSize(String fontSize)
    • setHighlightSelectedWord

      public void setHighlightSelectedWord(boolean highlightSelectedWord)
    • setMarkers

      protected void setMarkers(Map<String,AceMarker> markers)
    • adjustMarkerAnnotations

      protected void adjustMarkerAnnotations()
    • setAnnotations

      protected void setAnnotations(Set<AceAnnotation.MarkerAnnotation> manns, Set<AceAnnotation.RowAnnotation> ranns)
    • setAnnotationsToEditor

      protected void setAnnotationsToEditor()
    • createAIEfromMA

    • rowOfMarker

      protected int rowOfMarker(String markerId)
    • onChange

      public void onChange(GwtAceChangeEvent e)
      Specified by:
      onChange in interface GwtAceChangeHandler
    • fireTextChanged

      public void fireTextChanged()
    • adjustMarkers

      protected void adjustMarkers(GwtAceChangeEvent e)
    • adjustInvisibleMarkers

      protected void adjustInvisibleMarkers(GwtAceChangeEvent event)
    • markerIsValid

      protected static boolean markerIsValid(AceMarker marker)
    • moveMarkerOnInsert

      protected static AceRange moveMarkerOnInsert(AceRange mr, GwtAceRange range)
    • moveMarkerOnRemove

      protected static AceRange moveMarkerOnRemove(AceRange mr, GwtAceRange range)
    • overlapping

      protected static int[] overlapping(GwtAceRange range, int row, int col)
    • removeMarkers

      protected void removeMarkers(Set<AceEditorWidget.MarkerInEditor> removed)
    • updateMarkers

      protected void updateMarkers(Set<AceEditorWidget.MarkerInEditor> moved)
    • getText

      public String getText()
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface com.google.gwt.user.client.ui.HasEnabled
      Overrides:
      setEnabled in class com.google.gwt.user.client.ui.FocusWidget
    • setPropertyReadOnly

      public void setPropertyReadOnly(boolean propertyReadOnly)
    • setReadOnly

      public void setReadOnly(boolean readOnly)
    • setShowInvisibles

      public void setShowInvisibles(boolean showInvisibles)
    • convertSelection

      protected static AceRange convertSelection(GwtAceSelection selection)
    • getSelection

      public AceRange getSelection()
    • onFocus

      public void onFocus(GwtAceEvent e)
      Specified by:
      onFocus in interface GwtAceFocusBlurHandler
    • onBlur

      public void onBlur(GwtAceEvent e)
      Specified by:
      onBlur in interface GwtAceFocusBlurHandler
    • onChangeSelection

      public void onChangeSelection(GwtAceEvent e)
      Specified by:
      onChangeSelection in interface GwtAceChangeSelectionHandler
    • onChangeCursor

      public void onChangeCursor(GwtAceEvent e)
      Specified by:
      onChangeCursor in interface GwtAceChangeCursorHandler
    • selectionChanged

      protected void selectionChanged()
    • setUseWorker

      public void setUseWorker(boolean use)
    • setFocus

      public void setFocus(boolean focused)
      Specified by:
      setFocus in interface com.google.gwt.user.client.ui.Focusable
      Overrides:
      setFocus in class com.google.gwt.user.client.ui.FocusWidget
    • isFocused

      public boolean isFocused()
    • convertRange

      protected GwtAceRange convertRange(AceRange r)
    • getMarkers

      protected Map<String,AceMarker> getMarkers()
    • resize

      public void resize()
    • getDoc

      public AceDoc getDoc()
    • scrollToRow

      public void scrollToRow(int row)
    • getMarkerAnnotations

      protected Set<AceAnnotation.MarkerAnnotation> getMarkerAnnotations()
    • getRowAnnotations

      protected Set<AceAnnotation.RowAnnotation> getRowAnnotations()
    • setDoc

      public void setDoc(AceDoc doc)
    • getCursorCoords

      public int[] getCursorCoords()
    • addInvisibleMarker

      public int addInvisibleMarker(AceRange range)
    • removeInvisibleMarker

      public void removeInvisibleMarker(int id)
    • getInvisibleMarker

      public AceRange getInvisibleMarker(int id)
    • setTextAndAdjust

      public void setTextAndAdjust(String text)
    • adjustMarkersOnTextChange

      protected HashMap<String,AceMarker> adjustMarkersOnTextChange(String text1, String text2)
    • removeContentsOfInvisibleMarker

      public void removeContentsOfInvisibleMarker(int imId)