|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.BoxComponent
com.extjs.gxt.ui.client.widget.form.Field<java.lang.String>
com.extjs.gxt.ui.client.widget.form.HtmlEditor
public class HtmlEditor
Provides a lightweight HTML Editor component.
Note: The focus/blur and validation marking functionality inherited fromField
is NOT supported by this editor.
An Editor is a sensitive component that can't be used in all spots standard
fields can be used. Putting an Editor within any element that has display set
to 'none' can cause problems in Safari and Firefox due to their default
iframe reloading bugs.
Nested Class Summary | |
---|---|
protected class |
HtmlEditor.EventHandler
|
class |
HtmlEditor.HtmlEditorImages
|
class |
HtmlEditor.HtmlEditorMessages
|
protected class |
HtmlEditor.rte
|
Nested classes/interfaces inherited from class com.extjs.gxt.ui.client.widget.form.Field |
---|
Field.FieldImages, Field.FieldMessages |
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 | |
---|---|
protected com.google.gwt.user.client.ui.RichTextArea.FontSize |
activeFontSize
|
protected Button |
backcolor
|
protected ToggleButton |
bold
|
protected SelectionListener<ButtonEvent> |
btnListener
|
protected Button |
decreasefontsize
|
protected java.util.List<com.google.gwt.user.client.ui.RichTextArea.FontSize> |
fontSizesConstants
|
protected Button |
forecolor
|
protected HtmlEditor.EventHandler |
handler
|
protected com.google.gwt.user.client.ui.impl.RichTextAreaImpl |
impl
|
protected Button |
increasefontsize
|
protected ToggleButton |
italic
|
protected Button |
justifyCenter
|
protected Button |
justifyLeft
|
protected Button |
justifyRight
|
protected Button |
link
|
protected Button |
ol
|
protected HtmlEditor.rte |
rte
|
protected ToggleButton |
sourceEdit
|
protected ToolBar |
tb
|
protected El |
textarea
|
protected Button |
ul
|
protected ToggleButton |
underline
|
Fields inherited from class com.extjs.gxt.ui.client.widget.form.Field |
---|
autoValidate, emptyText, errorIcon, fieldStyle, focusStyle, focusValue, forceInvalidText, hasFocus, images, invalidStyle, messages, name, originalValue, preventMark, propertyEditor, readOnly, readOnlyFieldStyle, validationDelay, validationTask, value |
Fields inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustSize, cacheSizes, ensureVisibilityOnSizing, height, lastSize, layer, shim, width |
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
HtmlEditor()
|
Method Summary | |
---|---|
protected void |
afterRender()
Called after the component has been rendered and is attached for the first time. |
protected Button |
createButton(com.google.gwt.user.client.ui.AbstractImagePrototype icon,
java.lang.String tt,
java.lang.String toolTipTitle)
|
protected Button |
createColorButton(com.google.gwt.user.client.ui.AbstractImagePrototype icon,
java.lang.String toolTip,
java.lang.String toolTipTitle,
Listener<ComponentEvent> listener)
|
protected ToggleButton |
createToggleButton(com.google.gwt.user.client.ui.AbstractImagePrototype icon,
java.lang.String tt,
java.lang.String toolTipTitle)
|
protected void |
doAttachChildren()
|
protected void |
doDetachChildren()
|
com.google.gwt.user.client.ui.RichTextArea.BasicFormatter |
getBasicFormatter()
Gets the basic rich text formatting interface. |
com.google.gwt.user.client.ui.RichTextArea.ExtendedFormatter |
getExtendedFormatter()
Gets the full rich text formatting interface. |
HtmlEditor.HtmlEditorImages |
getImages()
|
protected El |
getInputEl()
Provides support for wrapping the actual input element. |
HtmlEditor.HtmlEditorMessages |
getMessages()
Returns the field's messages. |
java.lang.String |
getRawValue()
Returns the raw data value which may or may not be a valid, defined value. |
boolean |
isEnableAlignments()
|
boolean |
isEnableColors()
|
boolean |
isEnableFont()
|
boolean |
isEnableFontSize()
|
boolean |
isEnableFormat()
|
boolean |
isEnableLinks()
|
boolean |
isEnableLists()
|
boolean |
isShowToolbar()
|
boolean |
isSourceEditMode()
|
protected void |
onAttach()
|
protected void |
onBlur(ComponentEvent ce)
|
protected void |
onDisable()
|
protected void |
onEditorKeyDown(com.google.gwt.event.dom.client.KeyDownEvent e)
|
protected void |
onEnable()
|
protected void |
onFocus(ComponentEvent ce)
|
protected void |
onRender(com.google.gwt.user.client.Element target,
int index)
Subclasses must override and ensure setElement is called for lazy rendered components. |
protected void |
onResize(int width,
int height)
Called after the component is resized, this method is empty by default but can be implemented by any subclass that needs to perform custom logic after a resize occurs. |
void |
pushValue()
|
void |
setEnableAlignments(boolean enableAlignments)
|
void |
setEnableColors(boolean enableColors)
|
void |
setEnableFont(boolean enableFont)
|
void |
setEnableFontSize(boolean enableFontSize)
|
void |
setEnableFormat(boolean enableFormat)
|
void |
setEnableLinks(boolean enableLinks)
|
void |
setEnableLists(boolean enableLists)
|
protected void |
setHighContrastImage(Button btn,
java.lang.String image)
|
void |
setRawValue(java.lang.String value)
Sets the underlying DOM field's value directly, bypassing validation. |
void |
setShowToolbar(boolean showToolbar)
|
void |
setSourceEditMode(boolean mode)
|
protected void |
setupToolbar()
|
void |
setValue(java.lang.String value)
Sets a data value into the field and validates it. |
void |
syncValue()
|
protected void |
toggleSourceEditMode()
|
protected void |
updateStatus()
|
boolean |
validate(boolean silent)
Validates the field value. |
Methods inherited from class com.extjs.gxt.ui.client.widget.BoxComponent |
---|
adjustPosition, adjustSize, getBounds, getHeight, getHeight, getPosition, getPositionEl, getResizeEl, getShadow, getShadowOffset, getShadowPosition, getSize, getWidth, getWidth, hideShadow, hideShim, hideUnders, isAutoHeight, isAutoWidth, isDeferHeight, isShim, onPosition, onUnload, setAutoHeight, setAutoWidth, setBounds, setBounds, setDeferHeight, setHeight, setHeight, setPagePosition, setPagePosition, setPixelSize, setPosition, setShadow, setShadowOffset, setShadowPosition, setShim, setSize, setSize, setWidth, setWidth, sync, syncSize |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected com.google.gwt.user.client.ui.RichTextArea.FontSize activeFontSize
protected Button backcolor
protected ToggleButton bold
protected SelectionListener<ButtonEvent> btnListener
protected Button decreasefontsize
protected java.util.List<com.google.gwt.user.client.ui.RichTextArea.FontSize> fontSizesConstants
protected Button forecolor
protected HtmlEditor.EventHandler handler
protected com.google.gwt.user.client.ui.impl.RichTextAreaImpl impl
protected Button increasefontsize
protected ToggleButton italic
protected Button justifyCenter
protected Button justifyLeft
protected Button justifyRight
protected Button link
protected Button ol
protected HtmlEditor.rte rte
protected ToggleButton sourceEdit
protected ToolBar tb
protected El textarea
protected Button ul
protected ToggleButton underline
Constructor Detail |
---|
public HtmlEditor()
Method Detail |
---|
public com.google.gwt.user.client.ui.RichTextArea.BasicFormatter getBasicFormatter()
null
if basic formatting is not supportedpublic com.google.gwt.user.client.ui.RichTextArea.ExtendedFormatter getExtendedFormatter()
null
if full formatting is not supportedpublic HtmlEditor.HtmlEditorImages getImages()
getImages
in class Field<java.lang.String>
public HtmlEditor.HtmlEditorMessages getMessages()
Field
getMessages
in class Field<java.lang.String>
public java.lang.String getRawValue()
Field
Field.getValue()
.
getRawValue
in class Field<java.lang.String>
public boolean isEnableAlignments()
public boolean isEnableColors()
public boolean isEnableFont()
public boolean isEnableFontSize()
public boolean isEnableFormat()
public boolean isEnableLinks()
public boolean isEnableLists()
public boolean isShowToolbar()
public boolean isSourceEditMode()
public void pushValue()
public void setEnableAlignments(boolean enableAlignments)
public void setEnableColors(boolean enableColors)
public void setEnableFont(boolean enableFont)
public void setEnableFontSize(boolean enableFontSize)
public void setEnableFormat(boolean enableFormat)
public void setEnableLinks(boolean enableLinks)
public void setEnableLists(boolean enableLists)
public void setRawValue(java.lang.String value)
Field
Field.setValue(D)
.
setRawValue
in class Field<java.lang.String>
value
- the raw valuepublic void setShowToolbar(boolean showToolbar)
public void setSourceEditMode(boolean mode)
public void setValue(java.lang.String value)
Field
Field.setRawValue(java.lang.String)
.
setValue
in class Field<java.lang.String>
value
- the value to setpublic void syncValue()
public boolean validate(boolean silent)
Field
validate
in class Field<java.lang.String>
silent
- true to not mark the field valid and fire invalid event
when invalid
true
if valid, otherwise false
protected void afterRender()
Component
afterRender
in class Field<java.lang.String>
protected Button createButton(com.google.gwt.user.client.ui.AbstractImagePrototype icon, java.lang.String tt, java.lang.String toolTipTitle)
protected Button createColorButton(com.google.gwt.user.client.ui.AbstractImagePrototype icon, java.lang.String toolTip, java.lang.String toolTipTitle, Listener<ComponentEvent> listener)
protected ToggleButton createToggleButton(com.google.gwt.user.client.ui.AbstractImagePrototype icon, java.lang.String tt, java.lang.String toolTipTitle)
protected void doAttachChildren()
doAttachChildren
in class Component
protected void doDetachChildren()
doDetachChildren
in class Field<java.lang.String>
protected El getInputEl()
Field
getInputEl
in class Field<java.lang.String>
protected void onAttach()
onAttach
in class Component
protected void onBlur(ComponentEvent ce)
onBlur
in class Field<java.lang.String>
protected void onDisable()
onDisable
in class Field<java.lang.String>
protected void onEditorKeyDown(com.google.gwt.event.dom.client.KeyDownEvent e)
protected void onEnable()
onEnable
in class Field<java.lang.String>
protected void onFocus(ComponentEvent ce)
onFocus
in class Field<java.lang.String>
protected void onRender(com.google.gwt.user.client.Element target, int index)
Component
onRender
in class Field<java.lang.String>
target
- the target elementindex
- the insert locationprotected void onResize(int width, int height)
BoxComponent
onResize
in class Field<java.lang.String>
width
- the widthheight
- the heightprotected void setHighContrastImage(Button btn, java.lang.String image)
protected void setupToolbar()
protected void toggleSourceEditMode()
protected void updateStatus()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |