/** * * @return the string to be painted */ public String getString(){ if (str == null) return ""; AttributedCharacterIterator it = str.getIterator(); StringBuilder buf = new StringBuilder(); for (char c = it.first(); c != CharacterIterator.DONE; c = it.next()) { buf.append(c); } return buf.toString(); }
ch = it.next()) { if (it.getAttribute(DateFormat.Field.MILLISECOND) != null) { if (!doneMillis) {
while (iterator.getIndex() < end) { buffer.append(iterator.current()); iterator.next();
for (int i = iterator.getBeginIndex(); i < iterator.getEndIndex(); i++) { buffer.append(iterator.current()); iterator.next();
@Override public void drawString(AttributedCharacterIterator iterator, float x, float y) { StringBuffer build = new StringBuffer(); char c; while ((c = iterator.next()) != iterator.DONE) { build.append(c); } this.string = build.toString(); this.x = x; this.y = y; }
@Override public void drawString(AttributedCharacterIterator iterator, int x, int y) { StringBuffer build = new StringBuffer(); char c; while ((c = iterator.next()) != iterator.DONE) { build.append(c); } this.string = build.toString(); this.x = x; this.y = y; }
while ((ch = newLineCheck.next()) != CharacterIterator.DONE) { if (ch == '\n') { break;
/** * Increments the iterator's index by one and returns the character at * the new index. */ public char next() { return reorderedACI.next(); }
/** * Increments the iterator's index by one and returns the character at * the new index. */ public char next() { return reorderedACI.next(); }
@Override public void drawString(AttributedCharacterIterator iterator, int x, int y) { StringBuffer build = new StringBuffer(); char c; while( (c = iterator.next()) != iterator.DONE ){ build.append( c ); } this.string = build.toString(); this.x = x; this.y = y; }
@Override public void drawString(AttributedCharacterIterator iterator, float x, float y) { StringBuffer build = new StringBuffer(); char c; while( (c = iterator.next()) != iterator.DONE ){ build.append( c ); } this.string = build.toString(); this.x = x; this.y = y; }
private static String uncommittedChars(@Nullable AttributedCharacterIterator text) { if (text == null) { return null; } StringBuilder sb = new StringBuilder(); for (char c = text.first(); c != CharacterIterator.DONE; c = text.next()) { if (c >= 0x20 && c != 0x7F) { // Hack just like in javax.swing.text.DefaultEditorKit.DefaultKeyTypedAction sb.append(c); } } return sb.toString(); }
private void computePlainString() { StringBuilder sb = new StringBuilder(); char ch; AttributedCharacterIterator iterator = paragraphText.getIterator(); while((ch = iterator.current()) != AttributedCharacterIterator.DONE) { sb.append(ch); iterator.next(); } plainText = sb.toString(); }
private void computePlainString() { StringBuilder sb = new StringBuilder(); char ch; AttributedCharacterIterator iterator = paragraphText.getIterator(); while((ch = iterator.current()) != AttributedCharacterIterator.DONE) { sb.append(ch); iterator.next(); } plainText = sb.toString(); }
private void computePlainString() { StringBuilder sb = new StringBuilder(); char ch; AttributedCharacterIterator iterator = paragraphText.getIterator(); while((ch = iterator.current()) != AttributedCharacterIterator.DONE) { sb.append(ch); iterator.next(); } plainText = sb.toString(); }
@Override public void drawString(AttributedCharacterIterator iterator, float x, float y) { // TODO Draw styled text StringBuilder buf = new StringBuilder(); for (char c = iterator.first(); c != AttributedCharacterIterator.DONE; c = iterator.next()) { buf.append(c); } drawString(buf.toString(), x, y); }
private void put(AttributedCharacterIterator iterator) { if (iterator == null) { put((String) null); } else { StringBuilder sb = new StringBuilder(); for (char c = iterator.first(); c != CharacterIterator.DONE; c = iterator.next()) { sb.append(c); } put(sb.toString()); } }
/** * Increments the iterator's index by one, returning the next character. * @return the character at the new index. * <br><b>Specified by:</b> java.text.CharacterIterator. */ public char next() { if (getIndex() < end-1 ) { return aci.next(); } else { return setIndex(end); } }
/** * Increments the iterator's index by one, returning the next character. * @return the character at the new index. * <br><b>Specified by:</b> java.text.CharacterIterator. */ public char next() { if (getIndex() < end-1 ) { return aci.next(); } else { return setIndex(end); } }