|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
org.apache.xerces.dom.ElementNSImpl
fi.hut.tml.xsmiles.dom.XSmilesElementImpl
fi.hut.tml.xsmiles.dom.VisualElementImpl
fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
fi.hut.tml.xsmiles.mlfc.xforms.dom.PrologElement
fi.hut.tml.xsmiles.mlfc.xforms.dom.ModelElementImpl
The model element implementation - ties together instance and schema - Listens for mutation events from the instance and initiates recalculate and revalidate
| Nested Class Summary |
| Nested classes inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
XSmilesElementImpl.PseudoNodeList |
| Field Summary | |
protected java.util.Vector |
changedNodes
the changed nodes |
protected InstanceElementImpl |
defaultInstance
the cached default instance |
protected DynamicDependencyHandler |
dynDependencyHandler
the dynamic dependency handler |
protected java.util.Hashtable |
instances
all instances with an id are stored in a hashtable |
protected java.util.Vector |
invalidNodes
currently invalid nodes |
protected InstanceElementImpl |
lazyBastardInstance
for lazy bastard mode, only one generated instance can be found per model. |
protected MainDependencyGraph |
maindep
|
protected SchemaElementImpl |
model
|
static short |
MODEL_CALCULATING
|
static short |
MODEL_CONSTRUCTING
|
static short |
MODEL_NOTCONSTRUCTED
|
static short |
MODEL_READY
|
static short |
MODEL_REFRESHING
|
static short |
MODEL_VALIDATING
|
protected short |
modelStatus
|
protected boolean |
needsRebuild
for deferred updates |
protected boolean |
needsRecalculate
for deferred updates |
protected boolean |
needsRefresh
for deferred updates |
protected boolean |
needsRevalidate
for deferred updates |
static java.lang.String |
SCHEMA_URI
|
protected org.w3c.dom.Element |
schemaElement
|
protected SchemaPool |
schemaPool
my schema pool |
protected XPathEngine |
xpathAPI
the cached XPath api context |
| Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl |
debugEvents, EVENTS_NS, handler, inited, ownerDoc |
| Fields inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl |
views |
| Fields inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
DESTROYED, elementStatus, INITIALIZED, INITIALIZING, setPseudoClasses, style, UNINITIALIZED, xblpropname |
| Fields inherited from class org.apache.xerces.dom.ElementNSImpl |
localName, namespaceURI |
| Fields inherited from class org.apache.xerces.dom.ElementImpl |
attributes, name |
| Fields inherited from class org.apache.xerces.dom.ParentNode |
firstChild, fNodeListCache, ownerDocument |
| Fields inherited from class org.apache.xerces.dom.ChildNode |
nextSibling, previousSibling |
| Fields inherited from class org.apache.xerces.dom.NodeImpl |
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE, UNNORMALIZED |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Constructor Summary | |
ModelElementImpl(XFormsElementHandler owner,
java.lang.String ns,
java.lang.String name)
|
|
| Method Summary | |
protected void |
addSchemaFromElement(org.w3c.dom.Element schema,
SchemaPool pool,
java.lang.String schemaurl)
|
void |
checkFunctions()
|
protected static void |
copyNamespaceDeclarations(org.w3c.dom.Element to,
org.w3c.dom.Element from,
boolean recursive,
java.lang.String elementPrefix)
this mehod copies xmlns:xxx attributes from an element to another. |
protected InstanceElementImpl |
createLazyBastardInstance()
this method generates the lazy bastard instance by adding a new 'instance' element as a child of 'model' and adds an 'instanceData' element to it. |
protected void |
createSchemaPool()
|
void |
destroy()
Destroy this element and its descendants recursively. |
boolean |
dispatchEvent(org.w3c.dom.events.Event event)
this method is overridden so that default actions for certain events can be processed |
protected InstanceElementImpl |
findFirstInstance()
|
void |
functionValueChanged(java.lang.String function)
|
org.w3c.dom.NodeList |
getBinds()
return all binds in DOCUMENT ORDER (important for initialization) |
DynamicDependencyHandler |
getDynamicDependencyHandler()
|
java.lang.String |
getId()
The unique id. |
InstanceElementImpl |
getInstance()
|
InstanceElementImpl |
getInstance(java.lang.String id)
|
org.w3c.dom.Document |
getInstanceDocument()
|
org.w3c.dom.Document |
getInstanceDocument(java.lang.String id)
|
java.util.Enumeration |
getInstanceDocuments()
|
org.w3c.dom.Node |
getInstanceRoot()
public method for ECMAScripts to get the root of the instance document |
InstanceElementImpl |
getLazyBastardInstance()
|
ModelElementImpl |
getModel()
Gets the default XForm element |
short |
getModelStatus()
|
SchemaElementImpl |
getSchema()
|
SchemaPool |
getSchemaPool()
|
org.w3c.dom.Element |
getSchemaRoot()
|
SubmissionElementImpl |
getSubmitInfo(java.lang.String id)
Goes dynamically thru children and returns the submitinfo, with the id = id; |
XPathEngine |
getXPathEngine()
|
void |
handleEvent(org.w3c.dom.events.Event evt)
The DOM event handler This method gets all changes to the instance data, and dispatches correct events NOTE: maybe this should be moved to the InstanceDocument, the only problem is that actually they both need the information: instance does internal changes and model dispatches events etc. |
void |
init()
Initialize this element. |
void |
instanceAdded(InstanceElementImpl newChild)
the instance element registers itself using this method |
void |
internalRecalculate()
|
protected void |
internalRefresh()
This method does the refresh processing. |
protected void |
internalRemove(org.w3c.dom.Node newChild)
|
boolean |
internalRevalidate()
Revalidate the instance |
protected void |
listenAllMutations()
|
void |
outermostActionExited()
|
void |
rebuild(boolean canBeDeferred)
rebuild the calculation engine |
void |
recalculate()
recalculate this model |
void |
recreateUIBindings()
this method goes thru all UI elements which bind to this model and recreates their bindings |
protected void |
recreateUIBindingsRecursively(org.w3c.dom.Element elem)
this method recreates all UI bindings recursively when e.g. |
void |
reevaluateUIBindings()
re-evaluate all UI bindings |
void |
refresh()
recalculate this model |
protected void |
removeAllMutationListeners()
|
protected void |
removeAllMutationListeners(org.w3c.dom.Node n)
|
org.w3c.dom.Node |
removeChild(org.w3c.dom.Node oldChild)
Do all stuff when a node is removed. |
org.w3c.dom.Node |
replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
this method tries to propagate DOM changes to the layout element, if such is found |
void |
reset()
reset all instances and the model |
protected void |
resetInstances()
|
void |
resetModel(boolean reAddEventListeners)
reset the model without resetting the instances |
static InstanceItem |
retrieveInstanceItem(org.w3c.dom.Node n)
|
void |
revalidate()
revalidate this model |
protected void |
rewire()
This re-evaluates all dirty UI bindings. |
protected void |
runEventsAfterChanges()
|
void |
schemaAdded(SchemaElementImpl newChild)
the instance element registers itself using this method |
protected void |
setModelStatus(short status)
|
void |
uiValueChange(org.w3c.dom.Node n,
java.lang.String text)
the ui should always change values through this method. |
boolean |
validation()
|
protected boolean |
validationAttribute()
|
protected boolean |
validationElement()
|
| Methods inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl |
debugNode, dispatch, dispatch, dispatchActivateEvent, dispatchClickEvent, findFirstRelevantControl, getBrowser, getClassName, getComponentFactory, getModel, getModelId, getModelInScope, getSrc, getStyleAttrValue, getXMLDocument, handleXFormsException, initializeXMLEvents, isCSSLayoutDoc, moveNodes, printEvent, removeAllChildren, retrieveResourceAsString, serializeNode, setClassName, setHandler, setId, setOwnerDoc |
| Methods inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl |
addView, belongsToTree, getViews, insertBefore, isCurrentlyVisible, isFocusPoint, isPseudoClass, isVisibleByCSSProperties, notifyPseudoRemoved, removeAllViews, removeAttribute, setAttribute, setStatus, styleChanged, updateViews |
| Methods inherited from class org.apache.xerces.dom.ElementNSImpl |
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, setPrefix, setType, setValues |
| Methods inherited from class org.apache.xerces.dom.ElementImpl |
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData |
| Methods inherited from class org.apache.xerces.dom.ParentNode |
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren |
| Methods inherited from class org.apache.xerces.dom.ChildNode |
getNextSibling, getParentNode, getPreviousSibling |
| Methods inherited from class org.apache.xerces.dom.NodeImpl |
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface fi.hut.tml.xsmiles.dom.StylableElement |
getRuleNode, getStyle, hasStyle, isPseudoClass, setRuleNode, setStyle |
| Methods inherited from interface org.w3c.dom.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, setNodeValue, setPrefix |
| Methods inherited from interface fi.hut.tml.xsmiles.dom.VisualElement |
getStyle |
| Methods inherited from interface fi.hut.tml.xsmiles.dom.PseudoClassController |
getPseudoClass, setPseudoClass |
| Field Detail |
protected java.util.Hashtable instances
protected SchemaElementImpl model
protected MainDependencyGraph maindep
public static final short MODEL_NOTCONSTRUCTED
public static final short MODEL_CONSTRUCTING
public static final short MODEL_READY
public static final short MODEL_REFRESHING
public static final short MODEL_CALCULATING
public static final short MODEL_VALIDATING
protected short modelStatus
protected java.util.Vector invalidNodes
protected java.util.Vector changedNodes
protected DynamicDependencyHandler dynDependencyHandler
protected SchemaPool schemaPool
protected XPathEngine xpathAPI
protected InstanceElementImpl defaultInstance
protected boolean needsRecalculate
protected boolean needsRefresh
protected boolean needsRevalidate
protected boolean needsRebuild
protected InstanceElementImpl lazyBastardInstance
public static final java.lang.String SCHEMA_URI
protected org.w3c.dom.Element schemaElement
| Constructor Detail |
public ModelElementImpl(XFormsElementHandler owner,
java.lang.String ns,
java.lang.String name)
| Method Detail |
public void instanceAdded(InstanceElementImpl newChild)
public void schemaAdded(SchemaElementImpl newChild)
public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
throws org.w3c.dom.DOMException
VisualElementImpl
removeChild in interface org.w3c.dom.NoderemoveChild in class VisualElementImplorg.w3c.dom.DOMException
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node newChild,
org.w3c.dom.Node oldChild)
throws org.w3c.dom.DOMException
VisualElementImpl
replaceChild in interface org.w3c.dom.NodereplaceChild in class VisualElementImplorg.w3c.dom.DOMExceptionprotected void internalRemove(org.w3c.dom.Node newChild)
protected void setModelStatus(short status)
public short getModelStatus()
public void init()
XSmilesElementImpl
init in interface XFormsElementinit in class XFormsElementImpl
public void checkFunctions()
throws XFormsException
XFormsExceptionpublic SubmissionElementImpl getSubmitInfo(java.lang.String id)
protected InstanceElementImpl findFirstInstance()
public InstanceElementImpl getInstance()
public SchemaElementImpl getSchema()
getSchema in class PrologElementpublic java.lang.String getId()
XFormsElement
getId in interface XFormsElementgetId in class XFormsElementImplpublic DynamicDependencyHandler getDynamicDependencyHandler()
public boolean dispatchEvent(org.w3c.dom.events.Event event)
dispatchEvent in interface org.w3c.dom.events.EventTargetdispatchEvent in class XFormsElementImplpublic boolean validation()
public org.w3c.dom.Element getSchemaRoot()
protected boolean validationAttribute()
protected boolean validationElement()
public void reevaluateUIBindings()
public boolean internalRevalidate()
public void internalRecalculate()
public void uiValueChange(org.w3c.dom.Node n,
java.lang.String text)
n - text - protected void runEventsAfterChanges()
public void handleEvent(org.w3c.dom.events.Event evt)
handleEvent in interface org.w3c.dom.events.EventListenerhandleEvent in class VisualElementImplprotected void removeAllMutationListeners(org.w3c.dom.Node n)
protected void listenAllMutations()
protected void removeAllMutationListeners()
public void destroy()
XSmilesElementImpl
destroy in interface XFormsElementdestroy in class XSmilesElementImplpublic org.w3c.dom.NodeList getBinds()
public SchemaPool getSchemaPool()
public static InstanceItem retrieveInstanceItem(org.w3c.dom.Node n)
protected static void copyNamespaceDeclarations(org.w3c.dom.Element to,
org.w3c.dom.Element from,
boolean recursive,
java.lang.String elementPrefix)
protected void createSchemaPool()
throws XFormsLinkException
XFormsLinkException
protected void addSchemaFromElement(org.w3c.dom.Element schema,
SchemaPool pool,
java.lang.String schemaurl)
throws XFormsLinkException
XFormsLinkExceptionpublic org.w3c.dom.Node getInstanceRoot()
public org.w3c.dom.Document getInstanceDocument()
public org.w3c.dom.Document getInstanceDocument(java.lang.String id)
getInstanceDocument in interface ModelContextpublic InstanceElementImpl getInstance(java.lang.String id)
getInstance in class PrologElementpublic void rebuild(boolean canBeDeferred)
public void recalculate()
public void revalidate()
public void refresh()
protected void internalRefresh()
protected void rewire()
protected void resetInstances()
public void reset()
public void resetModel(boolean reAddEventListeners)
public void recreateUIBindings()
protected void recreateUIBindingsRecursively(org.w3c.dom.Element elem)
public XPathEngine getXPathEngine()
getXPathEngine in interface ModelContextpublic ModelElementImpl getModel()
XFormsElementImpl
getModel in class PrologElementprotected InstanceElementImpl createLazyBastardInstance()
public InstanceElementImpl getLazyBastardInstance()
public void outermostActionExited()
public java.util.Enumeration getInstanceDocuments()
getInstanceDocuments in interface XFormsModelElementpublic void functionValueChanged(java.lang.String function)
functionValueChanged in interface FunctionChangeListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||