Class AttributedStringBuilder
java.lang.Object
games.stendhal.client.gui.textformat.AttributedStringBuilder
- All Implemented Interfaces:
AttributedTextSink<TextAttributeSet>
A builder for AtttributedStrings, that works quite similarly to StringBuilder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
append(String s, TextAttributeSet attrs)
Append a string with attributes.Get the built AttributedString.toString()
-
Constructor Details
-
AttributedStringBuilder
public AttributedStringBuilder()
-
-
Method Details
-
toString
-
append
Append a string with attributes.- Specified by:
append
in interfaceAttributedTextSink<TextAttributeSet>
- Parameters:
s
- stringattrs
- attributes to be used for the appended part
-
toAttributedString
Get the built AttributedString.- Returns:
- AttributedString with the appended parts and attributes that have been defined for those at the time of appending
-