java::text::AttributedCharacterIterator Class Reference

Inheritance diagram for java::text::AttributedCharacterIterator:

Inheritance graph
java::text::CharacterIteratorjava::lang::Interfacejava::lang::Object
[legend]
Collaboration diagram for java::text::AttributedCharacterIterator:

Collaboration graph
java::text::CharacterIteratorjava::lang::Interfacejava::lang::Object
[legend]

List of all members.


Detailed Description

An AttributedCharacterIterator allows iteration through both text and related attribute information.

An attribute is a key/value pair, identified by the key. No two attributes on a given character can have the same key.

The values for an attribute are immutable, or must not be mutated by clients or storage. They are always passed by reference, and not cloned.

A run with respect to an attribute is a maximum text range for which:

A run with respect to a set of attributes is a maximum text range for which this condition is met for each member attribute.

The returned indexes are limited to the range of the iterator.

The returned attribute information is limited to runs that contain the current character.

Attribute keys are instances of AttributedCharacterIterator.Attribute and its subclasses, such as java.awt.font.TextAttribute.

See also:
AttributedCharacterIterator.Attribute

java.awt.font.TextAttribute

AttributedString

Annotation

Since:
1.2

Public Member Functions

virtual jint getRunStart ()=0
 Returns the index of the first character of the run with respect to all attributes containing the current character.
virtual jint getRunStart (const Attribute &attribute)=0
 Returns the index of the first character of the run with respect to the given attribute containing the current character.
virtual jint getRunStart (const Set &attributes)=0
 Returns the index of the first character of the run with respect to the given attributes containing the current character.
virtual jint getRunLimit ()=0
 Returns the index of the first character following the run with respect to all attributes containing the current character.
virtual jint getRunLimit (const Attribute &attribute)=0
 Returns the index of the first character following the run with respect to the given attribute containing the current character.
virtual jint getRunLimit (const Set &attributes)=0
 Returns the index of the first character following the run with respect to the given attributes containing the current character.
virtual Ref< MapgetAttributes ()=0
 Returns a map with the attributes defined on the current character.
virtual ObjectRef getAttribute (const Attribute &attribute)=0
 Returns the value of the named attribute for the current character.
virtual Ref< SetgetAllAttributeKeys ()=0
 Returns the keys of all attributes defined on the iterator's text range.

Classes

class  Attribute
 Defines attribute keys that are used to identify text attributes. More...

Member Function Documentation

virtual jint java::text::AttributedCharacterIterator::getRunStart (  )  [pure virtual]

Returns the index of the first character of the run with respect to all attributes containing the current character.

virtual jint java::text::AttributedCharacterIterator::getRunStart ( const Attribute attribute  )  [pure virtual]

Returns the index of the first character of the run with respect to the given attribute containing the current character.

virtual jint java::text::AttributedCharacterIterator::getRunStart ( const Set attributes  )  [pure virtual]

Returns the index of the first character of the run with respect to the given attributes containing the current character.

virtual jint java::text::AttributedCharacterIterator::getRunLimit (  )  [pure virtual]

Returns the index of the first character following the run with respect to all attributes containing the current character.

virtual jint java::text::AttributedCharacterIterator::getRunLimit ( const Attribute attribute  )  [pure virtual]

Returns the index of the first character following the run with respect to the given attribute containing the current character.

virtual jint java::text::AttributedCharacterIterator::getRunLimit ( const Set attributes  )  [pure virtual]

Returns the index of the first character following the run with respect to the given attributes containing the current character.

virtual Ref<Map> java::text::AttributedCharacterIterator::getAttributes (  )  [pure virtual]

Returns a map with the attributes defined on the current character.

virtual ObjectRef java::text::AttributedCharacterIterator::getAttribute ( const Attribute attribute  )  [pure virtual]

Returns the value of the named attribute for the current character.

Returns null if the attribute is not defined.

Parameters:
attribute the key of the attribute whose value is requested.

virtual Ref<Set> java::text::AttributedCharacterIterator::getAllAttributeKeys (  )  [pure virtual]

Returns the keys of all attributes defined on the iterator's text range.

The set is empty if no attributes are defined.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:45 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3