de.matthiasmann.twl.renderer
Interface AttributedString

All Superinterfaces:
AnimationState, java.lang.CharSequence
All Known Implementing Classes:
StringAttributes

public interface AttributedString
extends java.lang.CharSequence, AnimationState

An attribute string which also works as an iterator.


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.matthiasmann.twl.renderer.AnimationState
AnimationState.StateKey
 
Method Summary
 int advance()
          Moves the current position forward to the next segment.
 int getPosition()
          Returns the current position of the attribute iterator
 void setPosition(int pos)
          Changes the current position.
 
Methods inherited from interface java.lang.CharSequence
charAt, length, subSequence, toString
 
Methods inherited from interface de.matthiasmann.twl.renderer.AnimationState
getAnimationState, getAnimationTime, getShouldAnimateState
 

Method Detail

getPosition

int getPosition()
Returns the current position of the attribute iterator

Returns:
the current position

setPosition

void setPosition(int pos)
Changes the current position.

Parameters:
pos - the new position
Throws:
java.lang.IllegalArgumentException - when pos is < 0 or > length()

advance

int advance()
Moves the current position forward to the next segment.

Returns:
the new position