org.gnu.pango
Class AttrIterator

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.MemStruct
          extended by org.gnu.pango.AttrIterator

public class AttrIterator
extends MemStruct

The AttrIterator object is used to represent an iterator through a List. A new iterator is created with pango_attr_list_get_iterator(). Once the iterator is created, it can be advanced through the style changes in the text using pango_attr_iterator_next(). At each style change, the range of the current style segment and the attributes currently in effect can be queried. todo: is this needed?


Constructor Summary
AttrIterator(AttrIterator iter)
          Create a copy of the provided iterator.
AttrIterator(org.gnu.glib.Handle handle)
           
 
Method Summary
 Attribute get(AttrType type)
          Find the current attribute of a particular type at the iterator location.
 int getRangeEnd()
          Return the end of the current segment range.
 int getRangeStart()
          Return the beginning of the current segment range.
 boolean next()
          Advance the iterator until the next change of style.
 
Methods inherited from class org.gnu.glib.MemStruct
getMemStructFromHandle
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttrIterator

public AttrIterator(org.gnu.glib.Handle handle)

AttrIterator

public AttrIterator(AttrIterator iter)
Create a copy of the provided iterator.

Parameters:
iter -
Method Detail

next

public boolean next()
Advance the iterator until the next change of style.

Returns:
false if the iterator is at the end of the list.

getRangeStart

public int getRangeStart()
Return the beginning of the current segment range.


getRangeEnd

public int getRangeEnd()
Return the end of the current segment range.


get

public Attribute get(AttrType type)
Find the current attribute of a particular type at the iterator location. When multiple attributes of the same type overlap, the attribute whose range starts closest to the current location is used.