public class AceEditor
extends com.vaadin.ui.AbstractField<java.lang.String>
implements com.vaadin.event.FieldEvents.BlurNotifier, com.vaadin.event.FieldEvents.FocusNotifier
| Modifier and Type | Class and Description |
|---|---|
static class |
AceEditor.DiffEvent |
static interface |
AceEditor.DiffListener |
static class |
AceEditor.SelectionChangeEvent |
static interface |
AceEditor.SelectionChangeListener |
static class |
AceEditor.TextChangeEventImpl |
com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandlercom.vaadin.data.HasValue.ValueChangeEvent<V>, com.vaadin.data.HasValue.ValueChangeListener<V>com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.HasContextHelp, com.vaadin.ui.Component.Listenercom.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener| Constructor and Description |
|---|
AceEditor() |
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.shared.Registration |
addBlurListener(com.vaadin.event.FieldEvents.BlurListener listener) |
void |
addDiffListener(AceEditor.DiffListener listener) |
com.vaadin.shared.Registration |
addFocusListener(com.vaadin.event.FieldEvents.FocusListener listener) |
java.lang.String |
addMarker(AceMarker marker)
Adds an ace marker.
|
java.lang.String |
addMarker(AceRange range,
java.lang.String cssClass,
AceMarker.Type type,
boolean inFront,
AceMarker.OnTextChange onChange)
Adds an ace marker with a generated id.
|
void |
addMarkerAnnotation(AceAnnotation ann,
AceMarker marker) |
void |
addMarkerAnnotation(AceAnnotation ann,
java.lang.String markerId) |
void |
addRowAnnotation(AceAnnotation ann,
int row) |
void |
addSelectionChangeListener(AceEditor.SelectionChangeListener listener) |
void |
beforeClientResponse(boolean initial) |
void |
clearMarkerAnnotations() |
void |
clearMarkers() |
void |
clearRowAnnotations() |
protected void |
clientChanged(TransportDiff diff,
TransportDoc.TransportRange selection,
boolean focused) |
protected void |
doSetValue(java.lang.String s) |
int |
getCursorPosition() |
AceDoc |
getDoc() |
java.lang.String |
getFontSize() |
TextRange |
getSelection() |
protected AceEditorState |
getState() |
protected AceEditorState |
getState(boolean markAsDirty) |
java.lang.Class<? extends java.lang.String> |
getType() |
java.lang.String |
getValue() |
boolean |
isDisplayIndentGuides() |
boolean |
isHighlightActiveLine() |
boolean |
isHighlightSelectedWord() |
boolean |
isShowGutter() |
boolean |
isShowInvisibles() |
boolean |
isShowPrintMargin() |
void |
removeBlurListener(com.vaadin.event.FieldEvents.BlurListener listener) |
void |
removeDiffListener(AceEditor.DiffListener listener) |
void |
removeFocusListener(com.vaadin.event.FieldEvents.FocusListener listener) |
void |
removeMarker(AceMarker marker) |
void |
removeMarker(java.lang.String markerId) |
void |
removeSelectionChangeListener(AceEditor.SelectionChangeListener listener) |
void |
scrollToPosition(int pos)
Scrolls the to the given position (characters from the start of the
file).
|
void |
scrollToRow(int row)
Scrolls to the given row.
|
void |
setBasePath(java.lang.String path) |
void |
setCursorPosition(int pos)
Sets the cursor position to be pos characters from the beginning of the
text.
|
void |
setCursorRowCol(int row,
int col)
Sets the cursor on the given row and column.
|
void |
setDisplayIndentGuides(boolean displayIndentGuides) |
void |
setDoc(AceDoc doc) |
void |
setFontSize(java.lang.String size)
Use "auto" if you want to detect font size from CSS
|
void |
setHighlightActiveLine(boolean highlightActiveLine) |
void |
setHighlightSelectedWord(boolean highlightSelectedWord) |
void |
setMode(AceMode mode) |
void |
setMode(java.lang.String mode) |
void |
setModePath(java.lang.String path) |
void |
setSelection(int start,
int end)
Sets the selection to be between characters [start,end).
|
void |
setSelectionRowCol(int startRow,
int startCol,
int endRow,
int endCol)
Sets the selection to be between the given (startRow,startCol) and
(endRow, endCol).
|
void |
setShowGutter(boolean showGutter) |
void |
setShowInvisibles(boolean showInvisibles) |
void |
setShowPrintMargin(boolean showPrintMargin) |
void |
setTabSize(int size) |
void |
setTheme(AceTheme theme) |
void |
setTheme(java.lang.String theme) |
void |
setThemePath(java.lang.String path) |
void |
setUseSoftTabs(boolean softTabs) |
void |
setUseWorker(boolean useWorker) |
void |
setValue(java.lang.String newValue) |
void |
setWordWrap(boolean ww) |
void |
setWorkerPath(java.lang.String path) |
addValueChangeListener, createValueChange, focus, getCustomAttributes, getTabIndex, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, readDesign, setReadOnly, setRequiredIndicatorVisible, setTabIndex, setValue, writeDesignaddContextClickListener, addContextHelpIconClickListener, addListener, addShortcutListener, addStyleName, attach, detach, ensureContextHelpInitialized, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireContextHelpClick, getActionManager, getCaption, getComponentError, getComponentErrorProvider, getContextHelpText, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getRequiredError, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isContextHelpTextHtmlEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setComponentErrorProvider, setContextHelpText, setContextHelpTextHtmlEnabled, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setJTestId, setLocale, setParent, setPrimaryStyleName, setRequiredError, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitclear, getDefaultValidator, getEmptyValue, getOptionalValue, isEmptyaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getJTestId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setJTestId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerprotected void doSetValue(java.lang.String s)
doSetValue in class com.vaadin.ui.AbstractField<java.lang.String>public void addDiffListener(AceEditor.DiffListener listener)
public com.vaadin.shared.Registration addFocusListener(com.vaadin.event.FieldEvents.FocusListener listener)
addFocusListener in interface com.vaadin.event.FieldEvents.FocusNotifierpublic com.vaadin.shared.Registration addBlurListener(com.vaadin.event.FieldEvents.BlurListener listener)
addBlurListener in interface com.vaadin.event.FieldEvents.BlurNotifierpublic java.lang.String addMarker(AceMarker marker)
marker - public java.lang.String addMarker(AceRange range, java.lang.String cssClass, AceMarker.Type type, boolean inFront, AceMarker.OnTextChange onChange)
range - cssClass - type - inFront - onChange - public void addMarkerAnnotation(AceAnnotation ann, AceMarker marker)
public void addMarkerAnnotation(AceAnnotation ann, java.lang.String markerId)
public void addRowAnnotation(AceAnnotation ann, int row)
public void addSelectionChangeListener(AceEditor.SelectionChangeListener listener)
public void beforeClientResponse(boolean initial)
beforeClientResponse in interface com.vaadin.server.ClientConnectorbeforeClientResponse in class com.vaadin.ui.AbstractComponentpublic void clearMarkerAnnotations()
public void clearMarkers()
public void clearRowAnnotations()
public int getCursorPosition()
public AceDoc getDoc()
public TextRange getSelection()
public java.lang.Class<? extends java.lang.String> getType()
public void removeDiffListener(AceEditor.DiffListener listener)
public void removeFocusListener(com.vaadin.event.FieldEvents.FocusListener listener)
public void removeBlurListener(com.vaadin.event.FieldEvents.BlurListener listener)
public void removeMarker(AceMarker marker)
public void removeMarker(java.lang.String markerId)
public void removeSelectionChangeListener(AceEditor.SelectionChangeListener listener)
public void setBasePath(java.lang.String path)
public void setCursorPosition(int pos)
pos - public void setCursorRowCol(int row,
int col)
row - starting from 0col - starting from 0public void setDoc(AceDoc doc)
public void setMode(AceMode mode)
public void setMode(java.lang.String mode)
public void setModePath(java.lang.String path)
public void setSelection(int start,
int end)
start - end - public void setSelectionRowCol(int startRow,
int startCol,
int endRow,
int endCol)
startRow - starting from 0startCol - starting from 0endRow - starting from 0endCol - starting from 0public void scrollToRow(int row)
public void scrollToPosition(int pos)
public void setTheme(AceTheme theme)
public void setTheme(java.lang.String theme)
public void setThemePath(java.lang.String path)
public void setUseWorker(boolean useWorker)
public void setWordWrap(boolean ww)
public void setShowGutter(boolean showGutter)
public boolean isShowGutter()
public void setShowPrintMargin(boolean showPrintMargin)
public boolean isShowPrintMargin()
public void setHighlightActiveLine(boolean highlightActiveLine)
public boolean isHighlightActiveLine()
public void setWorkerPath(java.lang.String path)
public void setFontSize(java.lang.String size)
size - auto or font sizepublic java.lang.String getFontSize()
public void setHighlightSelectedWord(boolean highlightSelectedWord)
public boolean isHighlightSelectedWord()
public void setShowInvisibles(boolean showInvisibles)
public boolean isShowInvisibles()
public void setDisplayIndentGuides(boolean displayIndentGuides)
public boolean isDisplayIndentGuides()
public void setTabSize(int size)
public void setUseSoftTabs(boolean softTabs)
protected void clientChanged(TransportDiff diff, TransportDoc.TransportRange selection, boolean focused)
protected AceEditorState getState()
getState in class com.vaadin.ui.AbstractField<java.lang.String>protected AceEditorState getState(boolean markAsDirty)
getState in class com.vaadin.ui.AbstractField<java.lang.String>public void setValue(java.lang.String newValue)
setValue in interface com.vaadin.data.HasValue<java.lang.String>setValue in class com.vaadin.ui.AbstractField<java.lang.String>public java.lang.String getValue()
getValue in interface com.vaadin.data.HasValue<java.lang.String>