コード例 #1
0
 @Override
 public void colorize(StyledDocument styledDocument, int offset, int length)
     throws BadLocationException {
   String text = styledDocument.getText(offset, length);
   SortedSet<SubText> findSoaps = soapFinder.findSoaps(text);
   for (SubText subText : findSoaps) {
     int fragmentStart = offset + subText.getStart();
     int fragmentEnd = offset + subText.getEnd();
     colorizeFragment(styledDocument, fragmentStart, fragmentEnd);
   }
 }
コード例 #2
0
 @Override
 public boolean colorizingNeeded(String message) {
   return soapFinder.findSoaps(message).size() > 0;
 }