fi.hut.tml.xsmiles.mlfc.xmlcss.xhtml
Class ObjectElementImpl

java.lang.Object
  extended byorg.apache.xerces.dom.NodeImpl
      extended byorg.apache.xerces.dom.ChildNode
          extended byorg.apache.xerces.dom.ParentNode
              extended byorg.apache.xerces.dom.ElementImpl
                  extended byorg.apache.xerces.dom.ElementNSImpl
                      extended byfi.hut.tml.xsmiles.dom.XSmilesElementImpl
                          extended byfi.hut.tml.xsmiles.dom.VisualElementImpl
                              extended byfi.hut.tml.xsmiles.mlfc.xmlcss.xhtml.XHTMLElement
                                  extended byfi.hut.tml.xsmiles.mlfc.xmlcss.xhtml.ObjectElementImpl
All Implemented Interfaces:
java.lang.Cloneable, CSSStyleChangeListener, org.w3c.dom.Element, org.w3c.dom.events.EventListener, org.w3c.dom.events.EventTarget, InitializableElement, MediaElement, MediaListener, org.w3c.dom.Node, org.w3c.dom.NodeList, PseudoClassController, ResourceFetcher, java.io.Serializable, StylableElement, org.w3c.dom.TypeInfo, VisualComponentService, VisualElement, XSmilesLayoutReference

public class ObjectElementImpl
extends XHTMLElement
implements VisualComponentService, MediaElement, MediaListener

Implements the html object element

Since:
Mar 23, 2004
Version:
$Revision: 6468 $, $Date: 2006-02-24 15:51:02 +0200 (Fri, 24 Feb 2006) $
Author:
tjjalava
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
XSmilesElementImpl.PseudoNodeList
 
Field Summary
 
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 fi.hut.tml.xsmiles.dom.VisualComponentService
EVENT_STYLECHANGED
 
Fields inherited from interface fi.hut.tml.xsmiles.dom.MediaElement
PAUSED, PLAYING, STOPPED
 
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
ObjectElementImpl(org.apache.xerces.dom.DocumentImpl ownerDocument, java.lang.String namespaceURI, java.lang.String qualifiedName, MLFC mlfc)
          New object element
 
Method Summary
 void addMediaListener(MediaListener listener)
          Adds a new listener for the media
 void destroy()
          Destroy this element and its descendants recursively.
 java.awt.Component getComponent()
          Return the visual component for this extension element
 java.awt.Dimension getSize()
          Returns the approximate size of this extension element
 int getStatus()
          Returns the current status of the media
 boolean getVisible()
           
 void init()
          Initialize this element.
 boolean isStatic()
          Static elements have no defined duration.
 void mediaEnded()
          Called when the media has ended.
 void mediaPrefetched()
          Called when the media has been prefetched.
 void mouseClicked(java.awt.event.MouseEvent e)
          Mouse events.
 void mouseEntered()
           
 void mouseExited()
           
 void mousePressed()
           
 void mouseReleased()
           
 void pause()
          Pauses the media
 void play()
          Starts playing the media
 void prefetch()
          Prefetches the media
 void removeMediaListener(MediaListener listener)
          Removes a certain listener
 void setActive(boolean active)
          Sets this element active or inactive
 void setVisible(boolean visible)
           
 void setZoom(double zoom)
           
 void stop()
          Stops the media
 java.lang.String toString()
           
 void visualEvent(int event, java.lang.Object obj)
           
 
Methods inherited from class fi.hut.tml.xsmiles.mlfc.xmlcss.xhtml.XHTMLElement
getStyleAttrValue
 
Methods inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl
addView, belongsToTree, getViews, handleEvent, insertBefore, isCurrentlyVisible, isFocusPoint, isPseudoClass, isVisibleByCSSProperties, notifyPseudoRemoved, removeAllViews, removeAttribute, removeChild, replaceChild, setAttribute, setStatus, styleChanged, updateViews
 
Methods inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
addBinding, addUndistributedChild, clone, clonePseudoElements, cloneSubtree, debugNode, debugNode, dispatchEventInMainThread, get, getApplyBindingSheets, getAuthorSheets, getChildNodes, getElementStatus, getId, getOriginalClone, getPseudoClass, getResourceReferencer, getRuleNode, getStyle, 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
 
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.VisualElement
getStyle
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.PseudoClassController
getPseudoClass, setPseudoClass
 
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
 

Constructor Detail

ObjectElementImpl

public ObjectElementImpl(org.apache.xerces.dom.DocumentImpl ownerDocument,
                         java.lang.String namespaceURI,
                         java.lang.String qualifiedName,
                         MLFC mlfc)
New object element

Parameters:
ownerDocument - the document this element belongs to
namespaceURI -
qualifiedName -
mlfc - MLFC that is controlling the current document
Method Detail

init

public void init()
Description copied from class: XSmilesElementImpl
Initialize this element.

Specified by:
init in interface InitializableElement
Overrides:
init in class VisualElementImpl

destroy

public void destroy()
Description copied from class: XSmilesElementImpl
Destroy this element and its descendants recursively. NOTE: When overriding this method, please be sure to call super.destroy(), otherwise the destroy call will not propagate. NOTE: Actually, the recursion, which destroys the elements should be here, because usually everybody forgets to call super.destroy when overriding, thus causing the destroy sceme to break down.

Overrides:
destroy in class XSmilesElementImpl

getComponent

public java.awt.Component getComponent()
Description copied from interface: VisualComponentService
Return the visual component for this extension element

Specified by:
getComponent in interface VisualComponentService

getSize

public java.awt.Dimension getSize()
Description copied from interface: VisualComponentService
Returns the approximate size of this extension element

Specified by:
getSize in interface VisualComponentService

setZoom

public void setZoom(double zoom)
Specified by:
setZoom in interface VisualComponentService

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible in interface VisualComponentService

getVisible

public boolean getVisible()
Specified by:
getVisible in interface VisualComponentService

setActive

public void setActive(boolean active)
Description copied from interface: MediaElement
Sets this element active or inactive

Specified by:
setActive in interface MediaElement
Parameters:
active -

play

public void play()
          throws java.lang.Exception
Description copied from interface: MediaElement
Starts playing the media

Specified by:
play in interface MediaElement
Throws:
java.lang.Exception

pause

public void pause()
Description copied from interface: MediaElement
Pauses the media

Specified by:
pause in interface MediaElement

stop

public void stop()
Description copied from interface: MediaElement
Stops the media

Specified by:
stop in interface MediaElement

addMediaListener

public void addMediaListener(MediaListener listener)
Description copied from interface: MediaElement
Adds a new listener for the media

Specified by:
addMediaListener in interface MediaElement
Parameters:
listener -

removeMediaListener

public void removeMediaListener(MediaListener listener)
Description copied from interface: MediaElement
Removes a certain listener

Specified by:
removeMediaListener in interface MediaElement
Parameters:
listener -

mediaPrefetched

public void mediaPrefetched()
Description copied from interface: MediaListener
Called when the media has been prefetched.

Specified by:
mediaPrefetched in interface MediaListener

mediaEnded

public void mediaEnded()
Description copied from interface: MediaListener
Called when the media has ended.

Specified by:
mediaEnded in interface MediaListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Description copied from interface: MediaListener
Mouse events.

Specified by:
mouseClicked in interface MediaListener

mouseEntered

public void mouseEntered()
Specified by:
mouseEntered in interface MediaListener

mouseExited

public void mouseExited()
Specified by:
mouseExited in interface MediaListener

mousePressed

public void mousePressed()
Specified by:
mousePressed in interface MediaListener

mouseReleased

public void mouseReleased()
Specified by:
mouseReleased in interface MediaListener

getStatus

public int getStatus()
Description copied from interface: MediaElement
Returns the current status of the media

Specified by:
getStatus in interface MediaElement
Returns:
the status of the media

toString

public java.lang.String toString()

prefetch

public void prefetch()
              throws java.lang.Exception
Description copied from interface: MediaElement
Prefetches the media

Specified by:
prefetch in interface MediaElement
Throws:
java.lang.Exception

isStatic

public boolean isStatic()
Description copied from interface: MediaElement
Static elements have no defined duration. These include all html elements and object elements that refer to static media, like images. Non-static media include audio and video

Specified by:
isStatic in interface MediaElement
Returns:

visualEvent

public void visualEvent(int event,
                        java.lang.Object obj)
Specified by:
visualEvent in interface VisualComponentService


X-Smiles 1.2