|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.text.CharacterIteratorFieldDelegate
CharacterIteratorFieldDelegate combines the notifications from a Format
into a resulting AttributedCharacterIterator
. The resulting
AttributedCharacterIterator
can be retrieved by way of
the getIterator
method.
Field Summary | |
private ArrayList |
attributedStrings
Array of AttributeStrings. |
private int |
size
Running count of the number of characters that have been encountered. |
Constructor Summary | |
(package private) |
CharacterIteratorFieldDelegate()
|
Method Summary | |
void |
formatted(Format.Field attr,
Object value,
int start,
int end,
StringBuffer buffer)
Notified when a particular region of the String is formatted. |
void |
formatted(int fieldID,
Format.Field attr,
Object value,
int start,
int end,
StringBuffer buffer)
Notified when a particular region of the String is formatted. |
AttributedCharacterIterator |
getIterator(String string)
Returns an AttributedCharacterIterator that can be used
to iterate over the resulting formatted String. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ArrayList attributedStrings
formatted
is invoked
for a region > size, a new instance of AttributedString is added to
attributedStrings. Subsequent invocations of formatted
for existing regions result in invoking addAttribute on the existing
AttributedStrings.
private int size
Constructor Detail |
CharacterIteratorFieldDelegate()
Method Detail |
public void formatted(Format.Field attr, Object value, int start, int end, StringBuffer buffer)
Format.FieldDelegate
attr
.
formatted
in interface Format.FieldDelegate
attr
- Identifies the field matchedvalue
- Value associated with the fieldstart
- Beginning location of the field, will be >= 0end
- End of the field, will be >= start and <= buffer.length()buffer
- Contains current formatted value, receiver should
NOT modify it.public void formatted(int fieldID, Format.Field attr, Object value, int start, int end, StringBuffer buffer)
Format.FieldDelegate
formatted
in interface Format.FieldDelegate
fieldID
- Identifies the field by integerattr
- Identifies the field matchedvalue
- Value associated with the fieldstart
- Beginning location of the field, will be >= 0end
- End of the field, will be >= start and <= buffer.length()buffer
- Contains current formatted value, receiver should
NOT modify it.public AttributedCharacterIterator getIterator(String string)
AttributedCharacterIterator
that can be used
to iterate over the resulting formatted String.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |