@JavaScript(value="codemirror-connector.js") public class CmsCodeMirror extends com.vaadin.ui.AbstractJavaScriptComponent implements com.vaadin.v7.data.Property<java.lang.String>, com.vaadin.v7.data.Property.ValueChangeNotifier
| Modifier and Type | Class and Description |
|---|---|
static class |
CmsCodeMirror.CodeMirrorLanguage
The available editor languages.
|
static class |
CmsCodeMirror.CodeMirrorState
The editor state.
|
static class |
CmsCodeMirror.CodeMirrorTheme
The available editor themes.
|
static class |
CmsCodeMirror.ValueChangeEvent
The code mirror change event.
|
com.vaadin.v7.data.Property.Editor, com.vaadin.v7.data.Property.ReadOnlyException, com.vaadin.v7.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.v7.data.Property.ReadOnlyStatusChangeListener, com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.v7.data.Property.Transactional<T>, com.vaadin.v7.data.Property.ValueChangeListener, com.vaadin.v7.data.Property.ValueChangeNotifier, com.vaadin.v7.data.Property.Viewercom.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, 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 |
|---|
CmsCodeMirror()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBlurListener(com.vaadin.event.FieldEvents.BlurListener listener)
Adds a blur listener.
|
void |
addListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
|
void |
addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener) |
java.lang.String |
getFontSize()
Returns the font size.
|
protected CmsCodeMirror.CodeMirrorState |
getState() |
java.lang.Class<? extends java.lang.String> |
getType() |
java.lang.String |
getValue()
Returns the current editor content value.
|
boolean |
isCloseBrackets()
Returns whether auto close brackets is active.
|
boolean |
isHighlighting()
Returns whether highlighting is active.
|
boolean |
isLineWrapping()
Returns whether line wrapping is active.
|
boolean |
isReadOnly() |
boolean |
isTabsVisible()
Returns whether tabs are visible.
|
void |
registerSearchReplace(com.vaadin.ui.Button search,
com.vaadin.ui.Button replace)
Registers the given buttons as the search and replace buttons.
|
void |
registerUndoRedo(com.vaadin.ui.Button undo,
com.vaadin.ui.Button redo)
Registers the given buttons as undo redo buttons.
|
void |
removeBlurListener(com.vaadin.event.FieldEvents.BlurNotifier listener)
Removes the given blur listener.
|
void |
removeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
|
void |
removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener) |
void |
setCloseBrackets(boolean closeBrackets)
Sets the auto close brackets feature enabled.
|
void |
setFontSize(java.lang.String fontSize)
Sets the editor font size.
|
void |
setHeight(float height,
com.vaadin.server.Sizeable.Unit unit) |
void |
setHeight(java.lang.String height) |
void |
setHighlighting(boolean highlighting)
Sets the language highlighting enabled.
|
void |
setLanguage(CmsCodeMirror.CodeMirrorLanguage codeMirrorLanguage)
Sets the editor language.
|
void |
setLineWrapping(boolean lineWrapping)
Sets line wrapping enabled.
|
void |
setReadOnly(boolean readOnly) |
void |
setTabsVisible(boolean tabsVisible)
Sets tab characters visible.
|
void |
setTheme(CmsCodeMirror.CodeMirrorTheme codeMirrorTheme)
Sets the editor theme.
|
void |
setValue(java.lang.String value)
Sets the editor content value.
|
void |
setWidth(float width,
com.vaadin.server.Sizeable.Unit unit) |
void |
setWidth(java.lang.String width) |
addFunction, callFunction, getState, registerRpcaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, readDesign, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidthUndefined, writeDesignaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddStyleNames, getUI, removeStyleNames, setStyleNameaddAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerpublic CmsCodeMirror()
public void addBlurListener(com.vaadin.event.FieldEvents.BlurListener listener)
listener - the blur listener@Deprecated public void addListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
addListener in interface com.vaadin.v7.data.Property.ValueChangeNotifierProperty.ValueChangeNotifier.addListener(com.vaadin.v7.data.Property.ValueChangeListener)public void addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
addValueChangeListener in interface com.vaadin.v7.data.Property.ValueChangeNotifierProperty.ValueChangeNotifier.addValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)public java.lang.String getFontSize()
public java.lang.Class<? extends java.lang.String> getType()
getType in interface com.vaadin.v7.data.Property<java.lang.String>Property.getType()public java.lang.String getValue()
getValue in interface com.vaadin.v7.data.Property<java.lang.String>public boolean isCloseBrackets()
true if auto close brackets is activepublic boolean isHighlighting()
true if highlighting is activepublic boolean isLineWrapping()
true if line wrapping is activepublic boolean isReadOnly()
isReadOnly in interface com.vaadin.v7.data.Property<java.lang.String>isReadOnly in class com.vaadin.ui.AbstractComponentAbstractComponent.isReadOnly()public boolean isTabsVisible()
true if tabs are visiblepublic void registerSearchReplace(com.vaadin.ui.Button search, com.vaadin.ui.Button replace)
search - the search buttonreplace - the replace buttonpublic void registerUndoRedo(com.vaadin.ui.Button undo, com.vaadin.ui.Button redo)
undo - the undo buttonredo - the redo buttonpublic void removeBlurListener(com.vaadin.event.FieldEvents.BlurNotifier listener)
listener - the listener to remove@Deprecated public void removeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
removeListener in interface com.vaadin.v7.data.Property.ValueChangeNotifierProperty.ValueChangeNotifier.removeListener(com.vaadin.v7.data.Property.ValueChangeListener)public void removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener listener)
removeValueChangeListener in interface com.vaadin.v7.data.Property.ValueChangeNotifierProperty.ValueChangeNotifier.removeValueChangeListener(com.vaadin.v7.data.Property.ValueChangeListener)public void setCloseBrackets(boolean closeBrackets)
closeBrackets - true to auto close bracketspublic void setFontSize(java.lang.String fontSize)
fontSize - the editor font sizepublic void setHeight(float height, com.vaadin.server.Sizeable.Unit unit)
setHeight in interface com.vaadin.server.SizeablesetHeight in class com.vaadin.ui.AbstractComponentAbstractComponent.setHeight(float, com.vaadin.server.Sizeable.Unit)public void setHeight(java.lang.String height)
setHeight in interface com.vaadin.server.SizeablesetHeight in class com.vaadin.ui.AbstractComponentAbstractComponent.setHeight(java.lang.String)public void setHighlighting(boolean highlighting)
highlighting - true to highlightpublic void setLanguage(CmsCodeMirror.CodeMirrorLanguage codeMirrorLanguage)
codeMirrorLanguage - the editor languagepublic void setLineWrapping(boolean lineWrapping)
lineWrapping - true to wrap linespublic void setReadOnly(boolean readOnly)
setReadOnly in interface com.vaadin.v7.data.Property<java.lang.String>setReadOnly in class com.vaadin.ui.AbstractComponentAbstractComponent.setReadOnly(boolean)public void setTabsVisible(boolean tabsVisible)
tabsVisible - true to show tab characterspublic void setTheme(CmsCodeMirror.CodeMirrorTheme codeMirrorTheme)
codeMirrorTheme - the editor themepublic void setValue(java.lang.String value)
setValue in interface com.vaadin.v7.data.Property<java.lang.String>value - the content valuepublic void setWidth(float width, com.vaadin.server.Sizeable.Unit unit)
setWidth in interface com.vaadin.server.SizeablesetWidth in class com.vaadin.ui.AbstractComponentAbstractComponent.setWidth(float, com.vaadin.server.Sizeable.Unit)public void setWidth(java.lang.String width)
setWidth in interface com.vaadin.server.SizeablesetWidth in class com.vaadin.ui.AbstractComponentAbstractComponent.setWidth(java.lang.String)protected CmsCodeMirror.CodeMirrorState getState()
getState in class com.vaadin.ui.AbstractJavaScriptComponentAbstractJavaScriptComponent.getState()