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
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
static interface
protected class
static interface
static interface
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Field Summary
Modifier and TypeFieldDescriptionprotected LinkedList<AceEditorWidget.TextChangeListener>
protected AceDoc
protected GwtAceEditor
protected String
protected boolean
protected AceEditorWidget.FocusChangeListener
protected boolean
protected static int
protected boolean
protected GwtAceKeyboardHandler
protected int
protected Set<AceAnnotation.MarkerAnnotation>
protected Set<AceEditorWidget.AnnotationInEditor>
protected Map<String,
AceEditorWidget.MarkerInEditor> protected boolean
protected boolean
protected Set<AceAnnotation.RowAnnotation>
protected Set<AceAnnotation.RowAnnotation>
protected AceRange
protected String
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
addInvisibleMarker
(AceRange range) void
void
protected void
protected void
protected void
protected void
adjustMarkersOnTextChange
(String text1, String text2) protected GwtAceRange
protected static AceRange
convertSelection
(GwtAceSelection selection) protected Set<AceEditorWidget.AnnotationInEditor>
void
int[]
getDoc()
getInvisibleMarker
(int id) protected Set<AceAnnotation.MarkerAnnotation>
protected Set<AceAnnotation.RowAnnotation>
getText()
void
boolean
boolean
protected static boolean
markerIsValid
(AceMarker marker) protected static AceRange
moveMarkerOnInsert
(AceRange mr, GwtAceRange range) protected static AceRange
moveMarkerOnRemove
(AceRange mr, GwtAceRange range) protected static String
nextId()
void
void
void
void
void
protected static int[]
overlapping
(GwtAceRange range, int row, int col) void
removeContentsOfInvisibleMarker
(int imId) void
removeInvisibleMarker
(int id) protected void
removeMarkers
(Set<AceEditorWidget.MarkerInEditor> removed) void
void
void
resize()
protected int
rowOfMarker
(String markerId) void
scrollToRow
(int row) protected void
protected void
setAnnotations
(Set<AceAnnotation.MarkerAnnotation> manns, Set<AceAnnotation.RowAnnotation> ranns) protected void
void
setDisplayIndentGuides
(boolean displayIndentGuides) void
void
setEnabled
(boolean enabled) void
setFocus
(boolean focused) void
void
setFontSize
(String fontSize) void
void
setHighlightActiveLineEnabled
(boolean highlightActiveLine) void
setHighlightSelectedWord
(boolean highlightSelectedWord) void
setKeyboardHandler
(GwtAceKeyboardHandler handler) protected void
setMarkers
(Map<String, AceMarker> markers) void
void
setPropertyReadOnly
(boolean propertyReadOnly) void
setReadOnly
(boolean readOnly) void
protected void
setSelection
(AceRange s, boolean force) void
setShowGutter
(boolean showGutter) void
setShowInvisibles
(boolean showInvisibles) void
setShowPrintMargin
(boolean showPrintMargin) void
setTabSize
(int tabSize) protected void
void
setTextAndAdjust
(String text) void
void
setUseSoftTabs
(boolean softTabs) void
setUseWorker
(boolean use) void
void
setWordwrap
(boolean wrap) protected void
Methods inherited from class com.google.gwt.user.client.ui.FocusWidget
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setTabIndex
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
-
Field Details
-
changeListeners
-
selChangeListeners
-
focusChangeListener
-
editor
-
editorId
-
idCounter
protected static int idCounter -
text
-
enabled
protected boolean enabled -
readOnly
protected boolean readOnly -
propertyReadOnly
protected boolean propertyReadOnly -
focused
protected boolean focused -
selection
-
markersInEditor
-
rowAnnsInEditor
-
markerAnnsInEditor
-
invisibleMarkers
-
latestInvisibleMarkerId
protected int latestInvisibleMarkerId -
ignoreEditorEvents
protected boolean ignoreEditorEvents -
markerAnnotations
-
rowAnnotations
-
keyboardHandler
-
doc
-
-
Constructor Details
-
AceEditorWidget
public AceEditorWidget()
-
-
Method Details
-
addTextChangeListener
-
removeTextChangeListener
-
addSelectionChangeListener
-
removeSelectionChangeListener
-
setFocusChangeListener
-
nextId
-
isInitialized
public boolean isInitialized() -
initialize
public void initialize() -
setKeyboardHandler
-
setWidth
- Overrides:
setWidth
in classcom.google.gwt.user.client.ui.UIObject
-
setHeight
- Overrides:
setHeight
in classcom.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
-
adjustInvisibleMarkersOnTextChange
-
setSelection
-
setSelection
-
setMode
-
setTheme
-
setFontSize
-
setHighlightSelectedWord
public void setHighlightSelectedWord(boolean highlightSelectedWord) -
setMarkers
-
adjustMarkerAnnotations
protected void adjustMarkerAnnotations() -
setAnnotations
protected void setAnnotations(Set<AceAnnotation.MarkerAnnotation> manns, Set<AceAnnotation.RowAnnotation> ranns) -
setAnnotationsToEditor
protected void setAnnotationsToEditor() -
createAIEfromMA
protected Set<AceEditorWidget.AnnotationInEditor> createAIEfromMA(Set<AceAnnotation.MarkerAnnotation> anns) -
rowOfMarker
-
onChange
- Specified by:
onChange
in interfaceGwtAceChangeHandler
-
fireTextChanged
public void fireTextChanged() -
adjustMarkers
-
adjustInvisibleMarkers
-
markerIsValid
-
moveMarkerOnInsert
-
moveMarkerOnRemove
-
overlapping
-
removeMarkers
-
updateMarkers
-
getText
-
setEnabled
public void setEnabled(boolean enabled) - Specified by:
setEnabled
in interfacecom.google.gwt.user.client.ui.HasEnabled
- Overrides:
setEnabled
in classcom.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
-
getSelection
-
onFocus
- Specified by:
onFocus
in interfaceGwtAceFocusBlurHandler
-
onBlur
- Specified by:
onBlur
in interfaceGwtAceFocusBlurHandler
-
onChangeSelection
- Specified by:
onChangeSelection
in interfaceGwtAceChangeSelectionHandler
-
onChangeCursor
- Specified by:
onChangeCursor
in interfaceGwtAceChangeCursorHandler
-
selectionChanged
protected void selectionChanged() -
setUseWorker
public void setUseWorker(boolean use) -
setFocus
public void setFocus(boolean focused) - Specified by:
setFocus
in interfacecom.google.gwt.user.client.ui.Focusable
- Overrides:
setFocus
in classcom.google.gwt.user.client.ui.FocusWidget
-
isFocused
public boolean isFocused() -
convertRange
-
getMarkers
-
resize
public void resize() -
getDoc
-
scrollToRow
public void scrollToRow(int row) -
getMarkerAnnotations
-
getRowAnnotations
-
setDoc
-
getCursorCoords
public int[] getCursorCoords() -
addInvisibleMarker
-
removeInvisibleMarker
public void removeInvisibleMarker(int id) -
getInvisibleMarker
-
setTextAndAdjust
-
adjustMarkersOnTextChange
-
removeContentsOfInvisibleMarker
public void removeContentsOfInvisibleMarker(int imId)
-