APIdia Launch Partner
Top Description Fields Constructors Methods
java.text

pack-priv Class CharacterIteratorFieldDelegate

extends Object
implements FieldDelegate
Class Inheritance
All Implemented Interfaces
java.text.Format.FieldDelegate
Imports
java.util.ArrayList

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

Modifier and TypeField and Description
private ArrayList<AttributedString>
attributedStrings

Array of AttributeStrings.

private int
size

Running count of the number of characters that have been encountered.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
formatted(Format.Field attr, Object value, int start, int end, Format.StringBuf buffer)

Implements java.text.Format.FieldDelegate.formatted.

Notified when a particular region of the String is formatted.

public void
formatted(int fieldID, Format.Field attr, Object value, int start, int end, Format.StringBuf buffer)

Implements java.text.Format.FieldDelegate.formatted.

Notified when a particular region of the String is formatted.

public AttributedCharacterIterator
getIterator(String
Result of formatting.
string
)

Returns an AttributedCharacterIterator that can be used to iterate over the resulting formatted String.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributedStringsback to summary
private ArrayList<AttributedString> attributedStrings

Array of AttributeStrings. Whenever 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.

sizeback to summary
private int size

Running count of the number of characters that have been encountered.

Constructor Detail

CharacterIteratorFieldDelegateback to summary
pack-priv CharacterIteratorFieldDelegate()

Method Detail

formattedback to summary
public void formatted(Format.Field attr, Object value, int start, int end, Format.StringBuf buffer)

Implements java.text.Format.FieldDelegate.formatted.

Doc from java.text.Format.FieldDelegate.formatted.

Notified when a particular region of the String is formatted. This method will be invoked if there is no corresponding integer field id matching attr.

formattedback to summary
public void formatted(int fieldID, Format.Field attr, Object value, int start, int end, Format.StringBuf buffer)

Implements java.text.Format.FieldDelegate.formatted.

Doc from java.text.Format.FieldDelegate.formatted.

Notified when a particular region of the String is formatted.

getIteratorback to summary
public AttributedCharacterIterator getIterator(String string)

Returns an AttributedCharacterIterator that can be used to iterate over the resulting formatted String.

Parameters
string:String

Result of formatting.