com.exadel.vpe.editor.template
Class VpeAbstractCreator

java.lang.Object
  extended bycom.exadel.vpe.editor.template.VpeAbstractCreator
All Implemented Interfaces:
VpeCreator
Direct Known Subclasses:
VpeAnyCreator, VpeAttributeCreator, VpeCommentCreator, VpeCopyCreator, VpeDataTableColumnCreator, VpeDataTableCreator, VpeFacetCreator, VpeGridCreator, VpeHtmlCreator, VpeIncludeCreator, VpeJspRootCreator, VpeLabeledFormCreator, VpeLinkCreator, VpeListCreator, VpeLoadBundleCreator, VpePanelGridCreator, VpePanelLayoutCreator, VpeStyleCreator, VpeTaglibCreator, VpeTextCreator, VpeValueCreator

public abstract class VpeAbstractCreator
extends java.lang.Object
implements VpeCreator


Constructor Summary
VpeAbstractCreator()
           
 
Method Summary
abstract  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 visualNde, 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VpeAbstractCreator

public VpeAbstractCreator()
Method Detail

create

public abstract 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.

Specified by:
create in interface VpeCreator
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.

Specified by:
validate in interface VpeCreator
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.  

Specified by:
pseudo in interface VpeCreator

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.

Specified by:
removeElement in interface VpeCreator
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.

Specified by:
refreshElement in interface VpeCreator
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.

Specified by:
setAttribute in interface VpeCreator
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.

Specified by:
removeAttribute in interface VpeCreator
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 visualNde,
                                      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.

Specified by:
isRecreateAtAttrChange in interface VpeCreator
Parameters:
pageContext - Contains the information on edited page.
sourceElement - The current element of the source tree.
visualDocument - The document of the visual tree.
data - The saved data in a method create.
name - Attribute name.
value - Attribute value.
visualNde - The current node of the visual tree.
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.

Specified by:
nonctrlKeyPressHandler in interface VpeCreator
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.