java.lang.Object
org.merlotxml.merlot.MerlotDOMNode
org.merlotxml.merlot.MerlotDOMElement
- All Implemented Interfaces:
- java.lang.Cloneable, MerlotConstants, java.awt.datatransfer.Transferable
- Direct Known Subclasses:
- MerlotLibraryItem
- public class MerlotDOMElement
- extends MerlotDOMNode
DOM element container for Merlot. Contains a DOM node, handles getting an
icon for a particular node, getting the editor for a node, etc. Also
implements transferable so that the node can be drag and dropped, or
cut and pasted.
| Fields inherited from class org.merlotxml.merlot.MerlotDOMNode |
_bean_gif, _bean_gif_lg, _children, _clonedFrom, _dtdPluginConfig, _file, _listeners, _parent, _theNode, DOM_TREENODE_FLAVOR, flavors, PLAIN_TEXT, STRING, TREE |
| Fields inherited from interface org.merlotxml.merlot.MerlotConstants |
ACTION_MENU_ACCELERATOR, ACTION_MENU_ICON, ACTION_NAME, ACTION_SHORT_DESCRIPTION, ACTION_SMALL_ICON, AFTER, BEFORE, ERR, INTO, UI, XML |
| Methods inherited from class org.merlotxml.merlot.MerlotDOMNode |
addMerlotNodeListener, appendChild, array2String, array2String, clone, delete, equals, fireNodeChanged, fireNodeDeleted, fireNodeInserted, fireNodeRemoved, getAppendableElements, getAttributes, getAttributesOfType, getChildElements, getChildIndex, getChildNodes, getChildText, getClonedFrom, getDescriptiveText, getDescriptiveText, getDisplayText, getDocument, getDTDAttributes, getDTDPluginConfig, getEditor, getEditPanel, getFirstAttributeOfType, getFirstChild, getIcon, getIdManager, getIndices, getInsertableElements, getMerlotDOMDocument, getMerlotNodeListeners, getNodeName, getNodes, getParentNode, getPreviousSibling, getPreviousSibling, getProperty, getRealNode, getSmallIcon, getTransferData, getTransferDataFlavors, getXMLFile, hashCode, importChild, importChildAfter, importChildBefore, insertAfter, insertBefore, insertChildAt, isAllowableChild, isAllowableChild, isDataFlavorSupported, isRootElement, isSpecialNode, locationIsValid, newChild, newChild, newSiblingAfter, newSiblingAfter, newSiblingBefore, newSiblingBefore, printNode, printNode, removeAllMerlotDOMNodeListeners, removeChild, removeMerlotNodeListener, resetCache, setClonedFrom, setParentNode, setParentNode, toString |
MerlotDOMElement
public MerlotDOMElement(org.w3c.dom.Element data,
XMLFile doc)
isElement
public boolean isElement()
- Description copied from class:
MerlotDOMNode
- Element nodes should overload this to return true.
- Overrides:
isElement in class MerlotDOMNode
getElementName
public java.lang.String getElementName()
- Returns the DTD name of the element (which we consider it's type)
in the context of merlot
getAttribute
public java.lang.String getAttribute(java.lang.String s)
setAttributes
public void setAttributes(java.util.HashMap h)
- Sets the attributes according the given hashtable.
(probably should make getAttributes consistent with this at some point
- Overrides:
setAttributes in class MerlotDOMNode
setAttribute
public void setAttribute(java.lang.String name,
java.lang.String value)
- sets the attributes one at a time
isValid
public boolean isValid()
- Overrides:
isValid in class MerlotDOMNode