|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.gwt.wysiwyg.client.plugin.macro.MacroDisplayer
public class MacroDisplayer
Hides macro meta data and displays macro output in a read only text box.
| Field Summary | |
|---|---|
static java.lang.String |
BLOCK_MACRO_STYLE_NAME
The CSS class name used on the text box containing the output of a block macro. |
protected DOMUtils |
domUtils
Collection of DOM utility methods. |
static java.lang.String |
INLINE_MACRO_STYLE_NAME
The CSS class name used on the text box containing the output of an in-line macro. |
static java.lang.String |
MACRO_STYLE_NAME
The CSS class name used on the text box containing the output of a macro. |
static java.lang.String |
SELECTED_MACRO_STYLE_NAME
The CSS class name used on the text box containing the output of a selected macro. |
static java.lang.String |
START_MACRO_COMMENT_PREFIX
The prefix of the start macro comment node. |
static java.lang.String |
STOP_MACRO_COMMENT_VALUE
The value of the stop macro comment node. |
| Constructor Summary | |
|---|---|
MacroDisplayer()
|
|
| Method Summary | |
|---|---|
protected Element |
createMacroContainer(com.google.gwt.dom.client.Node start,
com.google.gwt.dom.client.Node stop,
int siblingCount)
Puts macro output inside a read only text box that can be collapsed. |
protected Element |
createReadOnlyBox()
|
void |
destroy()
Destroys this displayer. |
java.util.List<Element> |
getMacroContainers(Element root)
|
protected java.lang.String |
getMacroContainerTagName()
|
protected Element |
getOutput(Element container)
|
protected Element |
getPlaceHolder(Element container)
|
java.lang.String |
getSerializedMacroCall(Element container)
|
RichTextArea |
getTextArea()
|
boolean |
isCollapsed(Element container)
|
boolean |
isMacroContainer(com.google.gwt.dom.client.Node node)
|
boolean |
isSelected(Element container)
|
void |
onInnerHTMLChange(Element element)
|
void |
setCollapsed(Element container,
boolean collapsed)
Collapses or expands the specified macro. |
void |
setSelected(Element container,
boolean selected)
Changes the appearance of the specified macro based on its selected state. |
void |
setTextArea(RichTextArea textArea)
Sets the underlying rich text area where the macros are displayed. NOTE: We were forced to add this method because instances of this class are created using deferred binding and thus we cannot pass the rich text area as a parameter to the constructor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MACRO_STYLE_NAME
public static final java.lang.String SELECTED_MACRO_STYLE_NAME
public static final java.lang.String BLOCK_MACRO_STYLE_NAME
public static final java.lang.String INLINE_MACRO_STYLE_NAME
public static final java.lang.String START_MACRO_COMMENT_PREFIX
public static final java.lang.String STOP_MACRO_COMMENT_VALUE
protected final DOMUtils domUtils
| Constructor Detail |
|---|
public MacroDisplayer()
| Method Detail |
|---|
public void destroy()
public RichTextArea getTextArea()
textAreapublic void setTextArea(RichTextArea textArea)
textArea - the rich text area whose macros will be displayed using this object
protected Element createMacroContainer(com.google.gwt.dom.client.Node start,
com.google.gwt.dom.client.Node stop,
int siblingCount)
start - start macro comment nodestop - stop macro comment nodesiblingCount - the number of siblings between start and stop nodes
protected Element createReadOnlyBox()
public void setSelected(Element container,
boolean selected)
container - a macro containerselected - true to select the specified macro, false otherwisepublic boolean isSelected(Element container)
container - a macro container
true if the specified macro is selected, false otherwisepublic boolean isMacroContainer(com.google.gwt.dom.client.Node node)
node - a DOM node
true if the given node is a macro container, false otherwisepublic java.util.List<Element> getMacroContainers(Element root)
root - a DOM element
protected java.lang.String getMacroContainerTagName()
public void setCollapsed(Element container,
boolean collapsed)
container - a macro containercollapsed - true to collapse the specified macro, false to expand itpublic boolean isCollapsed(Element container)
container - a macro container
true if the specified macro is collapsed, false otherwiseprotected Element getOutput(Element container)
container - a macro container
protected Element getPlaceHolder(Element container)
container - a macro container
public void onInnerHTMLChange(Element element)
onInnerHTMLChange in interface InnerHTMLListenerInnerHTMLListener.onInnerHTMLChange(Element)public java.lang.String getSerializedMacroCall(Element container)
container - a macro container
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||