org.netbeans.modules.xml.xam/1 1.18.0 1

org.netbeans.modules.xml.xam.dom
Interface DocumentComponent<C extends DocumentComponent>

All Superinterfaces:
Component<C>
All Known Implementing Classes:
AbstractDocumentComponent

public interface DocumentComponent<C extends DocumentComponent>
extends Component<C>

A component in model.


Field Summary
static String TEXT_CONTENT_PROPERTY
           
 
Method Summary
 int findAttributePosition(String attributeName)
          Returns position of the attribute by the given name, or -1 if not found.
 C findChildComponent(Element e)
          Returns child component backed by given element node.
 int findPosition()
          Returns the position of this component in the schema document, expressed as an offset from the start of the document.
 String getAttribute(Attribute attribute)
           
 Element getPeer()
          Returns the DOM element corresponding to this component.
 boolean isInDocumentModel()
          Returns true if the component is part of the document model.
 boolean referencesSameNode(Node n)
          Returns true if the node referenced by this component is n.
 void setAttribute(String eventPropertyName, Attribute attribute, Object value)
          Sets the attribute value.
 
Methods inherited from interface org.netbeans.modules.xml.xam.Component
canPaste, copy, getChildren, getChildren, getChildren, getModel, getParent
 

Field Detail

TEXT_CONTENT_PROPERTY

static final String TEXT_CONTENT_PROPERTY
See Also:
Constant Field Values
Method Detail

getPeer

Element getPeer()
Returns the DOM element corresponding to this component.


getAttribute

String getAttribute(Attribute attribute)
Returns:
attribute string value or null if the attribute is currently undefined

setAttribute

void setAttribute(String eventPropertyName,
                  Attribute attribute,
                  Object value)
Sets the attribute value.

Parameters:
eventPropertyName - name property change event to fire.
attribute - the attribute to set value for.
value - for the attribute.

isInDocumentModel

boolean isInDocumentModel()
Returns true if the component is part of the document model.


findPosition

int findPosition()
Returns the position of this component in the schema document, expressed as an offset from the start of the document.

Returns:
the position of this component in the document

referencesSameNode

boolean referencesSameNode(Node n)
Returns true if the node referenced by this component is n.


findChildComponent

C findChildComponent(Element e)
Returns child component backed by given element node.


findAttributePosition

int findAttributePosition(String attributeName)
Returns position of the attribute by the given name, or -1 if not found.


org.netbeans.modules.xml.xam/1 1.18.0 1

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.