com.exadel.vpe.editor.template
Interface VpeCreator

All Known Implementing Classes:
VpeAbstractCreator

public interface VpeCreator


Method Summary
 VpeCreatorInfo create(VpePageContext pageContext, org.w3c.dom.Node sourceNode, com.exadel.swt.internal.mozilla.nsIDOMDocument visualDocument, com.exadel.swt.internal.mozilla.nsIDOMElement visualElement, java.util.Map visualNodeMap)
          Creates a node of the visual tree on the node of the source tree.
 boolean isRecreateAtAttrChange(VpePageContext pageContext, org.w3c.dom.Element sourceElement, com.exadel.swt.internal.mozilla.nsIDOMDocument visualDocument, com.exadel.swt.internal.mozilla.nsIDOMNode visualNode, java.lang.Object data, java.lang.String name, java.lang.String value)
          Returns true if it is required to re-create an element at a modification of attribute, false otherwise.
 boolean nonctrlKeyPressHandler(VpePageContext pageContext, org.w3c.dom.Document sourceDocument, org.w3c.dom.Node sourceNode, java.lang.Object data, int charCode, VpeSourceSelection selection, ITextFormatter formatter)
          Processes key press in the visual editor.
 void pseudo(VpePageContext pageContext, org.w3c.dom.Node sourceNode, com.exadel.swt.internal.mozilla.nsIDOMNode visualNode, java.util.Map visualNodeMap)
          Deprecated.  
 void refreshElement(VpePageContext pageContext, org.w3c.dom.Element sourceElement, java.util.Map visualNodeMap)
          Is used for refresh the current element of visual tree.
 void removeAttribute(VpePageContext pageContext, org.w3c.dom.Element sourceElement, java.util.Map visualNodeMap, java.lang.String name)
          Informs on remove of attribute of the current source element.
 void removeElement(VpePageContext pageContext, org.w3c.dom.Element sourceElement, java.util.Map visualNodeMap)
          Informs on remove of an element of the visual tree.
 void setAttribute(VpePageContext pageContext, org.w3c.dom.Element sourceElement, java.util.Map visualNodeMap, java.lang.String name, java.lang.String value)
          Sets value of attribute of the current visual element.
 void validate(VpePageContext pageContext, org.w3c.dom.Element sourceElement, com.exadel.swt.internal.mozilla.nsIDOMDocument visualDocument, com.exadel.swt.internal.mozilla.nsIDOMElement visualParent, com.exadel.swt.internal.mozilla.nsIDOMElement visualElement, java.util.Map visualNodeMap)
          Is invoked after construction of all child nodes of the current visual node.
 

Method Detail

create

public VpeCreatorInfo create(VpePageContext pageContext,
                             org.w3c.dom.Node sourceNode,
                             com.exadel.swt.internal.mozilla.nsIDOMDocument visualDocument,
                             com.exadel.swt.internal.mozilla.nsIDOMElement visualElement,
                             java.util.Map visualNodeMap)
Creates a node of the visual tree on the node of the source tree. This visual node should not have the parent node This visual node can have child nodes.

Parameters:
pageContext - Contains the information on edited page.
sourceNode - The current node of the source tree.
visualDocument - The document of the visual tree.
visualElement - The current element of the visual tree.
visualNodeMap - Is used for a storage padding information.
Returns:
The information on the created node of the visual tree.

validate

public void validate(VpePageContext pageContext,
                     org.w3c.dom.Element sourceElement,
                     com.exadel.swt.internal.mozilla.nsIDOMDocument visualDocument,
                     com.exadel.swt.internal.mozilla.nsIDOMElement visualParent,
                     com.exadel.swt.internal.mozilla.nsIDOMElement visualElement,
                     java.util.Map visualNodeMap)
Is invoked after construction of all child nodes of the current visual node.

Parameters:
pageContext - Contains the information on edited page.
sourceElement - The current element of the source tree.
visualDocument - The document of the visual tree.
visualParent - The future parent of the current visual element.
visualElement - The current element of the visual tree.
visualNodeMap - Is used for a storage padding information.

pseudo

public void pseudo(VpePageContext pageContext,
                   org.w3c.dom.Node sourceNode,
                   com.exadel.swt.internal.mozilla.nsIDOMNode visualNode,
                   java.util.Map visualNodeMap)
Deprecated.  


removeElement

public void removeElement(VpePageContext pageContext,
                          org.w3c.dom.Element sourceElement,
                          java.util.Map visualNodeMap)
Informs on remove of an element of the visual tree.

Parameters:
pageContext - Contains the information on edited page.
sourceElement - The current element of the source tree.
visualNodeMap - Is used for a storage padding information.

refreshElement

public void refreshElement(VpePageContext pageContext,
                           org.w3c.dom.Element sourceElement,
                           java.util.Map visualNodeMap)
Is used for refresh the current element of visual tree.

Parameters:
pageContext - Contains the information on edited page.
sourceElement - The current element of the source tree.
visualNodeMap - Is used for a storage padding information.

setAttribute

public void setAttribute(VpePageContext pageContext,
                         org.w3c.dom.Element sourceElement,
                         java.util.Map visualNodeMap,
                         java.lang.String name,
                         java.lang.String value)
Sets value of attribute of the current visual element. Is invoked at change of attribute of an source element.

Parameters:
pageContext - Contains the information on edited page.
sourceElement - The current element of the source tree.
visualNodeMap - Is used for a storage padding information.
name - Attribute name.
value - Attribute value.

removeAttribute

public void removeAttribute(VpePageContext pageContext,
                            org.w3c.dom.Element sourceElement,
                            java.util.Map visualNodeMap,
                            java.lang.String name)
Informs on remove of attribute of the current source element.

Parameters:
pageContext - Contains the information on edited page.
sourceElement - The current element of the source tree.
visualNodeMap - Is used for a storage padding information.
name - Attribute name.

isRecreateAtAttrChange

public boolean isRecreateAtAttrChange(VpePageContext pageContext,
                                      org.w3c.dom.Element sourceElement,
                                      com.exadel.swt.internal.mozilla.nsIDOMDocument visualDocument,
                                      com.exadel.swt.internal.mozilla.nsIDOMNode visualNode,
                                      java.lang.Object data,
                                      java.lang.String name,
                                      java.lang.String value)
Returns true if it is required to re-create an element at a modification of attribute, false otherwise.

Parameters:
pageContext - Contains the information on edited page.
sourceElement - The current element of the source tree.
visualDocument - The document of the visual tree.
visualNode - The current node of the visual tree.
data - The saved data in a method create.
name - Attribute name.
value - Attribute value.
Returns:
true if it is required to re-create an element at a modification of attribute, false otherwise.

nonctrlKeyPressHandler

public boolean nonctrlKeyPressHandler(VpePageContext pageContext,
                                      org.w3c.dom.Document sourceDocument,
                                      org.w3c.dom.Node sourceNode,
                                      java.lang.Object data,
                                      int charCode,
                                      VpeSourceSelection selection,
                                      ITextFormatter formatter)
Processes key press in the visual editor.

Parameters:
pageContext - Contains the information on edited page.
sourceDocument - The document of the source tree.
sourceNode - The current node of the source tree.
data - The saved data in a method create.
charCode - The code of char.
selection - The current selection in source editor.
formatter - Formatter of text.
Returns:
true if the key is treated, false otherwise.