javax.swing.text
Class AbstractDocument.AbstractElement

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.AbstractDocument.AbstractElement
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet , Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element , MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet , TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode
Direct Known Subclasses:
AbstractDocument.BranchElement sample code for javax.swing.text.AbstractDocument.BranchElement definition code for javax.swing.text.AbstractDocument.BranchElement , AbstractDocument.LeafElement sample code for javax.swing.text.AbstractDocument.LeafElement definition code for javax.swing.text.AbstractDocument.LeafElement
Enclosing class:
AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument

public abstract class AbstractDocument.AbstractElement
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element , MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode

Implements the abstract part of an element. By default elements support attributes by having a field that represents the immutable part of the current attribute set for the element. The element itself implements MutableAttributeSet which can be used to modify the set by fetching a new immutable set. The immutable sets are provided by the AttributeContext associated with the document.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
AttributeSet.CharacterAttribute sample code for javax.swing.text.AttributeSet.CharacterAttribute definition code for javax.swing.text.AttributeSet.CharacterAttribute , AttributeSet.ColorAttribute sample code for javax.swing.text.AttributeSet.ColorAttribute definition code for javax.swing.text.AttributeSet.ColorAttribute , AttributeSet.FontAttribute sample code for javax.swing.text.AttributeSet.FontAttribute definition code for javax.swing.text.AttributeSet.FontAttribute , AttributeSet.ParagraphAttribute sample code for javax.swing.text.AttributeSet.ParagraphAttribute definition code for javax.swing.text.AttributeSet.ParagraphAttribute
 
Field Summary
 
Fields inherited from interface javax.swing.text.AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
NameAttribute sample code for javax.swing.text.AttributeSet.NameAttribute definition code for javax.swing.text.AttributeSet.NameAttribute , ResolveAttribute sample code for javax.swing.text.AttributeSet.ResolveAttribute definition code for javax.swing.text.AttributeSet.ResolveAttribute
 
Constructor Summary
AbstractDocument.AbstractElement sample code for javax.swing.text.AbstractDocument.AbstractElement.AbstractDocument.AbstractElement(javax.swing.text.Element, javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.AbstractDocument.AbstractElement(javax.swing.text.Element, javax.swing.text.AttributeSet) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  parent, AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  a)
          Creates a new AbstractElement.
 
Method Summary
 void addAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.addAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.addAttribute(java.lang.Object, java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  name, Object sample code for java.lang.Object definition code for java.lang.Object  value)
          Adds an attribute to the element.
 void addAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.addAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.addAttributes(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
          Adds a set of attributes to the element.
abstract  Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration children sample code for javax.swing.text.AbstractDocument.AbstractElement.children() definition code for javax.swing.text.AbstractDocument.AbstractElement.children() ()
          Returns the children of the receiver as an Enumeration.
 boolean containsAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.containsAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.containsAttribute(java.lang.Object, java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  name, Object sample code for java.lang.Object definition code for java.lang.Object  value)
          Checks whether a given attribute name/value is defined.
 boolean containsAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.containsAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.containsAttributes(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attrs)
          Checks whether the element contains all the attributes.
 AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet copyAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.copyAttributes() definition code for javax.swing.text.AbstractDocument.AbstractElement.copyAttributes() ()
          Copies a set of attributes.
 void dump sample code for javax.swing.text.AbstractDocument.AbstractElement.dump(java.io.PrintStream, int) definition code for javax.swing.text.AbstractDocument.AbstractElement.dump(java.io.PrintStream, int) (PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream  psOut, int indentAmount)
          Dumps a debugging representation of the element hierarchy.
abstract  boolean getAllowsChildren sample code for javax.swing.text.AbstractDocument.AbstractElement.getAllowsChildren() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAllowsChildren() ()
          Returns true if the receiver allows children.
 Object sample code for java.lang.Object definition code for java.lang.Object getAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttribute(java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttribute(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  attrName)
          Gets the value of an attribute.
 int getAttributeCount sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeCount() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeCount() ()
          Gets the number of attributes that are defined.
 Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <?> getAttributeNames sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeNames() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeNames() ()
          Gets the names of all attributes.
 AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet getAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttributes() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttributes() ()
          Gets the attributes for the element.
 TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode getChildAt sample code for javax.swing.text.AbstractDocument.AbstractElement.getChildAt(int) definition code for javax.swing.text.AbstractDocument.AbstractElement.getChildAt(int) (int childIndex)
          Returns the child TreeNode at index childIndex.
 int getChildCount sample code for javax.swing.text.AbstractDocument.AbstractElement.getChildCount() definition code for javax.swing.text.AbstractDocument.AbstractElement.getChildCount() ()
          Returns the number of children TreeNode's receiver contains.
 Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document getDocument sample code for javax.swing.text.AbstractDocument.AbstractElement.getDocument() definition code for javax.swing.text.AbstractDocument.AbstractElement.getDocument() ()
          Retrieves the underlying model.
abstract  Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element getElement sample code for javax.swing.text.AbstractDocument.AbstractElement.getElement(int) definition code for javax.swing.text.AbstractDocument.AbstractElement.getElement(int) (int index)
          Gets a child element.
abstract  int getElementCount sample code for javax.swing.text.AbstractDocument.AbstractElement.getElementCount() definition code for javax.swing.text.AbstractDocument.AbstractElement.getElementCount() ()
          Gets the number of children for the element.
abstract  int getElementIndex sample code for javax.swing.text.AbstractDocument.AbstractElement.getElementIndex(int) definition code for javax.swing.text.AbstractDocument.AbstractElement.getElementIndex(int) (int offset)
          Gets the child element index closest to the given model offset.
abstract  int getEndOffset sample code for javax.swing.text.AbstractDocument.AbstractElement.getEndOffset() definition code for javax.swing.text.AbstractDocument.AbstractElement.getEndOffset() ()
          Gets the ending offset in the model for the element.
 int getIndex sample code for javax.swing.text.AbstractDocument.AbstractElement.getIndex(javax.swing.tree.TreeNode) definition code for javax.swing.text.AbstractDocument.AbstractElement.getIndex(javax.swing.tree.TreeNode) (TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode  node)
          Returns the index of node in the receivers children.
 String sample code for java.lang.String definition code for java.lang.String getName sample code for javax.swing.text.AbstractDocument.AbstractElement.getName() definition code for javax.swing.text.AbstractDocument.AbstractElement.getName() ()
          Gets the name of the element.
 TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode getParent sample code for javax.swing.text.AbstractDocument.AbstractElement.getParent() definition code for javax.swing.text.AbstractDocument.AbstractElement.getParent() ()
          Returns the parent TreeNode of the receiver.
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element getParentElement sample code for javax.swing.text.AbstractDocument.AbstractElement.getParentElement() definition code for javax.swing.text.AbstractDocument.AbstractElement.getParentElement() ()
          Gets the parent of the element.
 AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet getResolveParent sample code for javax.swing.text.AbstractDocument.AbstractElement.getResolveParent() definition code for javax.swing.text.AbstractDocument.AbstractElement.getResolveParent() ()
          Gets the resolving parent.
abstract  int getStartOffset sample code for javax.swing.text.AbstractDocument.AbstractElement.getStartOffset() definition code for javax.swing.text.AbstractDocument.AbstractElement.getStartOffset() ()
          Gets the starting offset in the model for the element.
 boolean isDefined sample code for javax.swing.text.AbstractDocument.AbstractElement.isDefined(java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.isDefined(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  attrName)
          Checks whether a given attribute is defined.
 boolean isEqual sample code for javax.swing.text.AbstractDocument.AbstractElement.isEqual(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.isEqual(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
          Checks whether two attribute sets are equal.
abstract  boolean isLeaf sample code for javax.swing.text.AbstractDocument.AbstractElement.isLeaf() definition code for javax.swing.text.AbstractDocument.AbstractElement.isLeaf() ()
          Checks whether the element is a leaf.
 void removeAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.removeAttribute(java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.removeAttribute(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  name)
          Removes an attribute from the set.
 void removeAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attrs)
          Removes a set of attributes for the element.
 void removeAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(java.util.Enumeration) definition code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(java.util.Enumeration) (Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <?> names)
          Removes a set of attributes for the element.
 void setResolveParent sample code for javax.swing.text.AbstractDocument.AbstractElement.setResolveParent(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.setResolveParent(javax.swing.text.AttributeSet) (AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  parent)
          Sets the resolving parent.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

AbstractDocument.AbstractElement sample code for javax.swing.text.AbstractDocument.AbstractElement(javax.swing.text.Element, javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement(javax.swing.text.Element, javax.swing.text.AttributeSet)

public AbstractDocument.AbstractElement(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  parent,
                                        AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  a)
Creates a new AbstractElement.

Parameters:
parent - the parent element
a - the attributes for the element
Method Detail

dump sample code for javax.swing.text.AbstractDocument.AbstractElement.dump(java.io.PrintStream, int) definition code for javax.swing.text.AbstractDocument.AbstractElement.dump(java.io.PrintStream, int)

public void dump(PrintStream sample code for java.io.PrintStream definition code for java.io.PrintStream  psOut,
                 int indentAmount)
Dumps a debugging representation of the element hierarchy.

Parameters:
psOut - the output stream
indentAmount - the indentation level >= 0

getAttributeCount sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeCount() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeCount()

public int getAttributeCount()
Gets the number of attributes that are defined.

Specified by:
getAttributeCount sample code for javax.swing.text.AttributeSet.getAttributeCount() definition code for javax.swing.text.AttributeSet.getAttributeCount() in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Returns:
the number of attributes >= 0
See Also:
AttributeSet.getAttributeCount() sample code for javax.swing.text.AttributeSet.getAttributeCount() definition code for javax.swing.text.AttributeSet.getAttributeCount()

isDefined sample code for javax.swing.text.AbstractDocument.AbstractElement.isDefined(java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.isDefined(java.lang.Object)

public boolean isDefined(Object sample code for java.lang.Object definition code for java.lang.Object  attrName)
Checks whether a given attribute is defined.

Specified by:
isDefined sample code for javax.swing.text.AttributeSet.isDefined(java.lang.Object) definition code for javax.swing.text.AttributeSet.isDefined(java.lang.Object) in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Parameters:
attrName - the non-null attribute name
Returns:
true if the attribute is defined
See Also:
AttributeSet.isDefined(java.lang.Object) sample code for javax.swing.text.AttributeSet.isDefined(java.lang.Object) definition code for javax.swing.text.AttributeSet.isDefined(java.lang.Object)

isEqual sample code for javax.swing.text.AbstractDocument.AbstractElement.isEqual(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.isEqual(javax.swing.text.AttributeSet)

public boolean isEqual(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
Checks whether two attribute sets are equal.

Specified by:
isEqual sample code for javax.swing.text.AttributeSet.isEqual(javax.swing.text.AttributeSet) definition code for javax.swing.text.AttributeSet.isEqual(javax.swing.text.AttributeSet) in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Parameters:
attr - the attribute set to check against
Returns:
true if the same
See Also:
AttributeSet.isEqual(javax.swing.text.AttributeSet) sample code for javax.swing.text.AttributeSet.isEqual(javax.swing.text.AttributeSet) definition code for javax.swing.text.AttributeSet.isEqual(javax.swing.text.AttributeSet)

copyAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.copyAttributes() definition code for javax.swing.text.AbstractDocument.AbstractElement.copyAttributes()

public AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  copyAttributes()
Copies a set of attributes.

Specified by:
copyAttributes sample code for javax.swing.text.AttributeSet.copyAttributes() definition code for javax.swing.text.AttributeSet.copyAttributes() in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Returns:
the copy
See Also:
AttributeSet.copyAttributes() sample code for javax.swing.text.AttributeSet.copyAttributes() definition code for javax.swing.text.AttributeSet.copyAttributes()

getAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttribute(java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttribute(java.lang.Object)

public Object sample code for java.lang.Object definition code for java.lang.Object  getAttribute(Object sample code for java.lang.Object definition code for java.lang.Object  attrName)
Gets the value of an attribute.

Specified by:
getAttribute sample code for javax.swing.text.AttributeSet.getAttribute(java.lang.Object) definition code for javax.swing.text.AttributeSet.getAttribute(java.lang.Object) in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Parameters:
attrName - the non-null attribute name
Returns:
the attribute value
See Also:
AttributeSet.getAttribute(java.lang.Object) sample code for javax.swing.text.AttributeSet.getAttribute(java.lang.Object) definition code for javax.swing.text.AttributeSet.getAttribute(java.lang.Object)

getAttributeNames sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeNames() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttributeNames()

public Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <?> getAttributeNames()
Gets the names of all attributes.

Specified by:
getAttributeNames sample code for javax.swing.text.AttributeSet.getAttributeNames() definition code for javax.swing.text.AttributeSet.getAttributeNames() in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Returns:
the attribute names as an enumeration
See Also:
AttributeSet.getAttributeNames() sample code for javax.swing.text.AttributeSet.getAttributeNames() definition code for javax.swing.text.AttributeSet.getAttributeNames()

containsAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.containsAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.containsAttribute(java.lang.Object, java.lang.Object)

public boolean containsAttribute(Object sample code for java.lang.Object definition code for java.lang.Object  name,
                                 Object sample code for java.lang.Object definition code for java.lang.Object  value)
Checks whether a given attribute name/value is defined.

Specified by:
containsAttribute sample code for javax.swing.text.AttributeSet.containsAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AttributeSet.containsAttribute(java.lang.Object, java.lang.Object) in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Parameters:
name - the non-null attribute name
value - the attribute value
Returns:
true if the name/value is defined
See Also:
AttributeSet.containsAttribute(java.lang.Object, java.lang.Object) sample code for javax.swing.text.AttributeSet.containsAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AttributeSet.containsAttribute(java.lang.Object, java.lang.Object)

containsAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.containsAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.containsAttributes(javax.swing.text.AttributeSet)

public boolean containsAttributes(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attrs)
Checks whether the element contains all the attributes.

Specified by:
containsAttributes sample code for javax.swing.text.AttributeSet.containsAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AttributeSet.containsAttributes(javax.swing.text.AttributeSet) in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Parameters:
attrs - the attributes to check
Returns:
true if the element contains all the attributes
See Also:
AttributeSet.containsAttributes(javax.swing.text.AttributeSet) sample code for javax.swing.text.AttributeSet.containsAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AttributeSet.containsAttributes(javax.swing.text.AttributeSet)

getResolveParent sample code for javax.swing.text.AbstractDocument.AbstractElement.getResolveParent() definition code for javax.swing.text.AbstractDocument.AbstractElement.getResolveParent()

public AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  getResolveParent()
Gets the resolving parent. If not overridden, the resolving parent defaults to the parent element.

Specified by:
getResolveParent sample code for javax.swing.text.AttributeSet.getResolveParent() definition code for javax.swing.text.AttributeSet.getResolveParent() in interface AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet
Returns:
the attributes from the parent, null if none
See Also:
AttributeSet.getResolveParent() sample code for javax.swing.text.AttributeSet.getResolveParent() definition code for javax.swing.text.AttributeSet.getResolveParent()

addAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.addAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.addAttribute(java.lang.Object, java.lang.Object)

public void addAttribute(Object sample code for java.lang.Object definition code for java.lang.Object  name,
                         Object sample code for java.lang.Object definition code for java.lang.Object  value)
Adds an attribute to the element.

Specified by:
addAttribute sample code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) in interface MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet
Parameters:
name - the non-null attribute name
value - the attribute value
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) sample code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

addAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.addAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.addAttributes(javax.swing.text.AttributeSet)

public void addAttributes(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
Adds a set of attributes to the element.

Specified by:
addAttributes sample code for javax.swing.text.MutableAttributeSet.addAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.addAttributes(javax.swing.text.AttributeSet) in interface MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet
Parameters:
attr - the attributes to add
See Also:
MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) sample code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.addAttribute(java.lang.Object, java.lang.Object)

removeAttribute sample code for javax.swing.text.AbstractDocument.AbstractElement.removeAttribute(java.lang.Object) definition code for javax.swing.text.AbstractDocument.AbstractElement.removeAttribute(java.lang.Object)

public void removeAttribute(Object sample code for java.lang.Object definition code for java.lang.Object  name)
Removes an attribute from the set.

Specified by:
removeAttribute sample code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object) in interface MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet
Parameters:
name - the non-null attribute name
See Also:
MutableAttributeSet.removeAttribute(java.lang.Object) sample code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object) definition code for javax.swing.text.MutableAttributeSet.removeAttribute(java.lang.Object)

removeAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(java.util.Enumeration<?>) definition code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(java.util.Enumeration<?>)

public void removeAttributes(Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <?> names)
Removes a set of attributes for the element.

Specified by:
removeAttributes sample code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration) in interface MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet
Parameters:
names - the attribute names
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration) sample code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration)

removeAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.removeAttributes(javax.swing.text.AttributeSet)

public void removeAttributes(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attrs)
Removes a set of attributes for the element.

Specified by:
removeAttributes sample code for javax.swing.text.MutableAttributeSet.removeAttributes(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(javax.swing.text.AttributeSet) in interface MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet
Parameters:
attrs - the attributes
See Also:
MutableAttributeSet.removeAttributes(java.util.Enumeration) sample code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration) definition code for javax.swing.text.MutableAttributeSet.removeAttributes(java.util.Enumeration)

setResolveParent sample code for javax.swing.text.AbstractDocument.AbstractElement.setResolveParent(javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.AbstractElement.setResolveParent(javax.swing.text.AttributeSet)

public void setResolveParent(AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  parent)
Sets the resolving parent.

Specified by:
setResolveParent sample code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) in interface MutableAttributeSet sample code for javax.swing.text.MutableAttributeSet definition code for javax.swing.text.MutableAttributeSet
Parameters:
parent - the parent, null if none
See Also:
MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) sample code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet) definition code for javax.swing.text.MutableAttributeSet.setResolveParent(javax.swing.text.AttributeSet)

getDocument sample code for javax.swing.text.AbstractDocument.AbstractElement.getDocument() definition code for javax.swing.text.AbstractDocument.AbstractElement.getDocument()

public Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document  getDocument()
Retrieves the underlying model.

Specified by:
getDocument sample code for javax.swing.text.Element.getDocument() definition code for javax.swing.text.Element.getDocument() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Returns:
the model

getParentElement sample code for javax.swing.text.AbstractDocument.AbstractElement.getParentElement() definition code for javax.swing.text.AbstractDocument.AbstractElement.getParentElement()

public Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  getParentElement()
Gets the parent of the element.

Specified by:
getParentElement sample code for javax.swing.text.Element.getParentElement() definition code for javax.swing.text.Element.getParentElement() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Returns:
the parent

getAttributes sample code for javax.swing.text.AbstractDocument.AbstractElement.getAttributes() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAttributes()

public AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  getAttributes()
Gets the attributes for the element.

Specified by:
getAttributes sample code for javax.swing.text.Element.getAttributes() definition code for javax.swing.text.Element.getAttributes() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Returns:
the attribute set

getName sample code for javax.swing.text.AbstractDocument.AbstractElement.getName() definition code for javax.swing.text.AbstractDocument.AbstractElement.getName()

public String sample code for java.lang.String definition code for java.lang.String  getName()
Gets the name of the element.

Specified by:
getName sample code for javax.swing.text.Element.getName() definition code for javax.swing.text.Element.getName() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Returns:
the name, null if none

getStartOffset sample code for javax.swing.text.AbstractDocument.AbstractElement.getStartOffset() definition code for javax.swing.text.AbstractDocument.AbstractElement.getStartOffset()

public abstract int getStartOffset()
Gets the starting offset in the model for the element.

Specified by:
getStartOffset sample code for javax.swing.text.Element.getStartOffset() definition code for javax.swing.text.Element.getStartOffset() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Returns:
the offset >= 0
See Also:
Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document , AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument

getEndOffset sample code for javax.swing.text.AbstractDocument.AbstractElement.getEndOffset() definition code for javax.swing.text.AbstractDocument.AbstractElement.getEndOffset()

public abstract int getEndOffset()
Gets the ending offset in the model for the element.

Specified by:
getEndOffset sample code for javax.swing.text.Element.getEndOffset() definition code for javax.swing.text.Element.getEndOffset() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Returns:
the offset >= 0
See Also:
Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document , AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument

getElement sample code for javax.swing.text.AbstractDocument.AbstractElement.getElement(int) definition code for javax.swing.text.AbstractDocument.AbstractElement.getElement(int)

public abstract Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  getElement(int index)
Gets a child element.

Specified by:
getElement sample code for javax.swing.text.Element.getElement(int) definition code for javax.swing.text.Element.getElement(int) in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Parameters:
index - the child index, >= 0 && < getElementCount()
Returns:
the child element

getElementCount sample code for javax.swing.text.AbstractDocument.AbstractElement.getElementCount() definition code for javax.swing.text.AbstractDocument.AbstractElement.getElementCount()

public abstract int getElementCount()
Gets the number of children for the element.

Specified by:
getElementCount sample code for javax.swing.text.Element.getElementCount() definition code for javax.swing.text.Element.getElementCount() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Returns:
the number of children >= 0

getElementIndex sample code for javax.swing.text.AbstractDocument.AbstractElement.getElementIndex(int) definition code for javax.swing.text.AbstractDocument.AbstractElement.getElementIndex(int)

public abstract int getElementIndex(int offset)
Gets the child element index closest to the given model offset.

Specified by:
getElementIndex sample code for javax.swing.text.Element.getElementIndex(int) definition code for javax.swing.text.Element.getElementIndex(int) in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Parameters:
offset - the offset >= 0
Returns:
the element index >= 0

isLeaf sample code for javax.swing.text.AbstractDocument.AbstractElement.isLeaf() definition code for javax.swing.text.AbstractDocument.AbstractElement.isLeaf()

public abstract boolean isLeaf()
Checks whether the element is a leaf.

Specified by:
isLeaf sample code for javax.swing.text.Element.isLeaf() definition code for javax.swing.text.Element.isLeaf() in interface Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element
Specified by:
isLeaf sample code for javax.swing.tree.TreeNode.isLeaf() definition code for javax.swing.tree.TreeNode.isLeaf() in interface TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode
Returns:
true if a leaf

getChildAt sample code for javax.swing.text.AbstractDocument.AbstractElement.getChildAt(int) definition code for javax.swing.text.AbstractDocument.AbstractElement.getChildAt(int)

public TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode  getChildAt(int childIndex)
Returns the child TreeNode at index childIndex.

Specified by:
getChildAt sample code for javax.swing.tree.TreeNode.getChildAt(int) definition code for javax.swing.tree.TreeNode.getChildAt(int) in interface TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode

getChildCount sample code for javax.swing.text.AbstractDocument.AbstractElement.getChildCount() definition code for javax.swing.text.AbstractDocument.AbstractElement.getChildCount()

public int getChildCount()
Returns the number of children TreeNode's receiver contains.

Specified by:
getChildCount sample code for javax.swing.tree.TreeNode.getChildCount() definition code for javax.swing.tree.TreeNode.getChildCount() in interface TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode
Returns:
the number of children TreeNodews's receiver contains

getParent sample code for javax.swing.text.AbstractDocument.AbstractElement.getParent() definition code for javax.swing.text.AbstractDocument.AbstractElement.getParent()

public TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode  getParent()
Returns the parent TreeNode of the receiver.

Specified by:
getParent sample code for javax.swing.tree.TreeNode.getParent() definition code for javax.swing.tree.TreeNode.getParent() in interface TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode
Returns:
the parent TreeNode of the receiver

getIndex sample code for javax.swing.text.AbstractDocument.AbstractElement.getIndex(javax.swing.tree.TreeNode) definition code for javax.swing.text.AbstractDocument.AbstractElement.getIndex(javax.swing.tree.TreeNode)

public int getIndex(TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode  node)
Returns the index of node in the receivers children. If the receiver does not contain node, -1 will be returned.

Specified by:
getIndex sample code for javax.swing.tree.TreeNode.getIndex(javax.swing.tree.TreeNode) definition code for javax.swing.tree.TreeNode.getIndex(javax.swing.tree.TreeNode) in interface TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode
Parameters:
node - the location of interest
Returns:
the index of node in the receiver's children, or -1 if absent

getAllowsChildren sample code for javax.swing.text.AbstractDocument.AbstractElement.getAllowsChildren() definition code for javax.swing.text.AbstractDocument.AbstractElement.getAllowsChildren()

public abstract boolean getAllowsChildren()
Returns true if the receiver allows children.

Specified by:
getAllowsChildren sample code for javax.swing.tree.TreeNode.getAllowsChildren() definition code for javax.swing.tree.TreeNode.getAllowsChildren() in interface TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode
Returns:
true if the receiver allows children, otherwise false

children sample code for javax.swing.text.AbstractDocument.AbstractElement.children() definition code for javax.swing.text.AbstractDocument.AbstractElement.children()

public abstract Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration  children()
Returns the children of the receiver as an Enumeration.

Specified by:
children sample code for javax.swing.tree.TreeNode.children() definition code for javax.swing.tree.TreeNode.children() in interface TreeNode sample code for javax.swing.tree.TreeNode definition code for javax.swing.tree.TreeNode
Returns:
the children of the receiver as an Enumeration