javax.swing.text.html
Class HTMLDocument.Iterator

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.html.HTMLDocument.Iterator
Enclosing class:
HTMLDocument sample code for javax.swing.text.html.HTMLDocument definition code for javax.swing.text.html.HTMLDocument

public abstract static class HTMLDocument.Iterator
extends Object sample code for java.lang.Object definition code for java.lang.Object

An iterator to iterate over a particular type of tag. The iterator is not thread safe. If reliable access to the document is not already ensured by the context under which the iterator is being used, its use should be performed under the protection of Document.render.


Constructor Summary
HTMLDocument.Iterator sample code for javax.swing.text.html.HTMLDocument.Iterator.HTMLDocument.Iterator() definition code for javax.swing.text.html.HTMLDocument.Iterator.HTMLDocument.Iterator() ()
           
 
Method Summary
abstract  AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet getAttributes sample code for javax.swing.text.html.HTMLDocument.Iterator.getAttributes() definition code for javax.swing.text.html.HTMLDocument.Iterator.getAttributes() ()
          Return the attributes for this tag.
abstract  int getEndOffset sample code for javax.swing.text.html.HTMLDocument.Iterator.getEndOffset() definition code for javax.swing.text.html.HTMLDocument.Iterator.getEndOffset() ()
          Returns the end of the range for which the current occurrence of the tag is defined and has the same attributes.
abstract  int getStartOffset sample code for javax.swing.text.html.HTMLDocument.Iterator.getStartOffset() definition code for javax.swing.text.html.HTMLDocument.Iterator.getStartOffset() ()
          Returns the start of the range for which the current occurrence of the tag is defined and has the same attributes.
abstract  HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.HTML.Tag getTag sample code for javax.swing.text.html.HTMLDocument.Iterator.getTag() definition code for javax.swing.text.html.HTMLDocument.Iterator.getTag() ()
          Type of tag this iterator represents.
abstract  boolean isValid sample code for javax.swing.text.html.HTMLDocument.Iterator.isValid() definition code for javax.swing.text.html.HTMLDocument.Iterator.isValid() ()
          Indicates if the iterator is currently representing an occurrence of a tag.
abstract  void next sample code for javax.swing.text.html.HTMLDocument.Iterator.next() definition code for javax.swing.text.html.HTMLDocument.Iterator.next() ()
          Move the iterator forward to the next occurrence of the tag it represents.
 
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

HTMLDocument.Iterator sample code for javax.swing.text.html.HTMLDocument.Iterator() definition code for javax.swing.text.html.HTMLDocument.Iterator()

public HTMLDocument.Iterator()
Method Detail

getAttributes sample code for javax.swing.text.html.HTMLDocument.Iterator.getAttributes() definition code for javax.swing.text.html.HTMLDocument.Iterator.getAttributes()

public abstract AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  getAttributes()
Return the attributes for this tag.

Returns:
the AttributeSet for this tag, or null if none can be found

getStartOffset sample code for javax.swing.text.html.HTMLDocument.Iterator.getStartOffset() definition code for javax.swing.text.html.HTMLDocument.Iterator.getStartOffset()

public abstract int getStartOffset()
Returns the start of the range for which the current occurrence of the tag is defined and has the same attributes.

Returns:
the start of the range, or -1 if it can't be found

getEndOffset sample code for javax.swing.text.html.HTMLDocument.Iterator.getEndOffset() definition code for javax.swing.text.html.HTMLDocument.Iterator.getEndOffset()

public abstract int getEndOffset()
Returns the end of the range for which the current occurrence of the tag is defined and has the same attributes.

Returns:
the end of the range

next sample code for javax.swing.text.html.HTMLDocument.Iterator.next() definition code for javax.swing.text.html.HTMLDocument.Iterator.next()

public abstract void next()
Move the iterator forward to the next occurrence of the tag it represents.


isValid sample code for javax.swing.text.html.HTMLDocument.Iterator.isValid() definition code for javax.swing.text.html.HTMLDocument.Iterator.isValid()

public abstract boolean isValid()
Indicates if the iterator is currently representing an occurrence of a tag. If false there are no more tags for this iterator.

Returns:
true if the iterator is currently representing an occurrence of a tag, otherwise returns false

getTag sample code for javax.swing.text.html.HTMLDocument.Iterator.getTag() definition code for javax.swing.text.html.HTMLDocument.Iterator.getTag()

public abstract HTML.Tag sample code for javax.swing.text.html.HTML.Tag definition code for javax.swing.text.html.HTML.Tag  getTag()
Type of tag this iterator represents.