Package org.fife.ui.rsyntaxtextarea
Class TokenIterator
java.lang.Object
org.fife.ui.rsyntaxtextarea.TokenIterator
Allows you to iterate through all paintable tokens in an
RSyntaxDocument
.- Version:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
boolean
hasNext()
Returns whether any more paintable tokens are in the document.private void
next()
Returns the next paintable token in the document.void
remove()
Always throwsUnsupportedOperationException
, asToken
removal is not supported.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
doc
-
curLine
private int curLine -
token
-
-
Constructor Details
-
TokenIterator
TokenIterator(RSyntaxDocument doc) Constructor.- Parameters:
doc
- The document whose tokens we should iterate over.
-
-
Method Details
-
getLineCount
private int getLineCount() -
hasNext
public boolean hasNext()Returns whether any more paintable tokens are in the document. -
loadTokenListForCurLine
private void loadTokenListForCurLine() -
next
Returns the next paintable token in the document. -
remove
public void remove()Always throwsUnsupportedOperationException
, asToken
removal is not supported.- Specified by:
remove
in interfaceIterator<Token>
- Throws:
UnsupportedOperationException
- always.
-