コード例 #1
0
 public void advance() {
   if (mySegmentIterator.atEnd()) {
     myRangeIterator.advance();
     TextAttributes textAttributes = myRangeIterator.getTextAttributes();
     myCurrentFontStyle = textAttributes == null ? Font.PLAIN : textAttributes.getFontType();
     myCurrentForegroundColor =
         textAttributes == null ? null : textAttributes.getForegroundColor();
     myCurrentBackgroundColor =
         textAttributes == null ? null : textAttributes.getBackgroundColor();
     mySegmentIterator.reset(
         myRangeIterator.getRangeStart(), myRangeIterator.getRangeEnd(), myCurrentFontStyle);
   }
   mySegmentIterator.advance();
 }
コード例 #2
0
 public boolean atEnd() {
   return myRangeIterator.atEnd() && mySegmentIterator.atEnd();
 }