fi.hut.tml.xsmiles.dom
Class VisualElementImpl
java.lang.Object
org.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
- All Implemented Interfaces:
- java.lang.Cloneable, CSSStyleChangeListener, org.w3c.dom.Element, org.w3c.dom.events.EventListener, org.w3c.dom.events.EventTarget, InitializableElement, org.w3c.dom.Node, org.w3c.dom.NodeList, PseudoClassController, ResourceFetcher, java.io.Serializable, StylableElement, org.w3c.dom.TypeInfo, VisualElement, XSmilesLayoutReference
- Direct Known Subclasses:
- DivElementImpl, MessageContentPseudoElement, OutputElementImpl.OutputValuePseudoElement, RepeatItemPseudoElement, RootElementImpl, SMILElementImpl, StylableImpl, TestControl, XFormsControl.ValuePseudoElement, XFormsElementImpl, XHTML2NavigationListElementImpl, XHTMLElement
- public class VisualElementImpl
- extends XSmilesElementImpl
- implements XSmilesLayoutReference, CSSStyleChangeListener, VisualElement, org.w3c.dom.events.EventListener
XSmiles DOM Elements
- See Also:
- Serialized Form
|
Field Summary |
protected java.util.Vector |
views
|
| 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 |
VisualElementImpl(org.apache.xerces.dom.DocumentImpl ownerDocument,
java.lang.String value)
|
VisualElementImpl(org.apache.xerces.dom.DocumentImpl ownerDocument,
java.lang.String namespaceURI,
java.lang.String qualifiedName)
|
|
Method Summary |
void |
addView(View view)
|
boolean |
belongsToTree()
|
java.util.Vector |
getViews()
|
void |
handleEvent(org.w3c.dom.events.Event evt)
|
void |
init()
Initialize this element. |
org.w3c.dom.Node |
insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
this method tries to propagate DOM changes to the layout element, if such
is found |
boolean |
isCurrentlyVisible()
checks whether belongs to CSS tree and is not display:none or visibility:hidden for any ancestor node |
boolean |
isFocusPoint()
|
boolean |
isPseudoClass(java.lang.String pseudoclass)
ask whether this element belongs to a certain CSS pseudoclass |
boolean |
isVisibleByCSSProperties()
|
void |
notifyPseudoRemoved(org.w3c.dom.Element elem)
since the pseudoelement removals are not catched by the
xsmilesvisualelement, this method can be used to notify a remove |
void |
removeAllViews()
|
void |
removeAttribute(java.lang.String name)
|
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 |
setAttribute(java.lang.String name,
java.lang.String value)
|
void |
setStatus(boolean status)
|
void |
styleChanged()
notify that the style should be recomputed |
protected void |
updateViews()
Recreates all the child views for this node's children. |
| Methods inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
addBinding, addUndistributedChild, clone, clonePseudoElements, cloneSubtree, debugNode, debugNode, destroy, dispatchEventInMainThread, get, getApplyBindingSheets, getAuthorSheets, getChildNodes, getElementStatus, getId, getOriginalClone, getPseudoClass, getResourceReferencer, getRuleNode, getStyle, getStyleAttrValue, getText, getText, getUndistributedChildNodes, getXblImplementations, hasBinding, hasStyle, initFinalFlattenedTree, initStyle, isInitedForReset, removeBinding, removeUndistributedChild, replaceNode, resetFinalFlattenedTree, resolveURI, searchElementWithId, searchElementWithId, setApplyBindingSheets, setAuthorSheets, setPseudoClass, setRuleNode, setStyle, updateStyle |
| 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, dispatchEvent, 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 org.w3c.dom.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttributeNode, removeAttributeNS, 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, isSupported, normalize, setNodeValue, setPrefix |
views
protected java.util.Vector views
VisualElementImpl
public VisualElementImpl(org.apache.xerces.dom.DocumentImpl ownerDocument,
java.lang.String value)
VisualElementImpl
public VisualElementImpl(org.apache.xerces.dom.DocumentImpl ownerDocument,
java.lang.String namespaceURI,
java.lang.String qualifiedName)
isFocusPoint
public boolean isFocusPoint()
getViews
public java.util.Vector getViews()
addView
public void addView(View view)
removeAllViews
public void removeAllViews()
init
public void init()
- Description copied from class:
XSmilesElementImpl
- Initialize this element.
- Specified by:
init in interface InitializableElement- Overrides:
init in class XSmilesElementImpl
insertBefore
public org.w3c.dom.Node insertBefore(org.w3c.dom.Node newChild,
org.w3c.dom.Node refChild)
- this method tries to propagate DOM changes to the layout element, if such
is found
- Specified by:
insertBefore in interface org.w3c.dom.Node
replaceChild
public 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
- Specified by:
replaceChild in interface org.w3c.dom.Node
removeChild
public org.w3c.dom.Node removeChild(org.w3c.dom.Node oldChild)
- Do all stuff when a node is removed. One thing is to remove all
components from view
- Specified by:
removeChild in interface org.w3c.dom.Node
handleEvent
public void handleEvent(org.w3c.dom.events.Event evt)
- Specified by:
handleEvent in interface org.w3c.dom.events.EventListener
setStatus
public void setStatus(boolean status)
isPseudoClass
public boolean isPseudoClass(java.lang.String pseudoclass)
- ask whether this element belongs to a certain CSS pseudoclass
- Specified by:
isPseudoClass in interface PseudoClassController- Overrides:
isPseudoClass in class XSmilesElementImpl
notifyPseudoRemoved
public void notifyPseudoRemoved(org.w3c.dom.Element elem)
- since the pseudoelement removals are not catched by the
xsmilesvisualelement, this method can be used to notify a remove
- Parameters:
elem -
updateViews
protected void updateViews()
- Recreates all the child views for this node's children.
setAttribute
public void setAttribute(java.lang.String name,
java.lang.String value)
- Specified by:
setAttribute in interface org.w3c.dom.Element
removeAttribute
public void removeAttribute(java.lang.String name)
- Specified by:
removeAttribute in interface org.w3c.dom.Element
belongsToTree
public boolean belongsToTree()
styleChanged
public void styleChanged()
- Description copied from interface:
VisualElement
- notify that the style should be recomputed
- Specified by:
styleChanged in interface CSSStyleChangeListener
isCurrentlyVisible
public boolean isCurrentlyVisible()
- checks whether belongs to CSS tree and is not display:none or visibility:hidden for any ancestor node
- Specified by:
isCurrentlyVisible in interface VisualElement
isVisibleByCSSProperties
public boolean isVisibleByCSSProperties()
- Specified by:
isVisibleByCSSProperties in interface VisualElement
X-Smiles 1.2