public class ColorCodeBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH |
| Constructor and Description |
|---|
ColorCodeBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static String |
asColorCodes(StyledFragment fragment)
Convert the given styled fragment into color codes.
|
String[] |
build(StyledFragment message)
Convert a message into color-coded text.
|
static String |
getAdditive(StyleSet resetTo,
StyleSet resetFrom)
Get the additional color codes needed to set the given style when the current
style is the other given one.
|
static String |
getCode(StyleSet style)
Get the formatting and color codes.
|
static String |
getFormattingCode(StyleSet style)
Get the formatting codes.
|
protected String |
transform(String word)
Callback for transforming a word, such as a URL.
|
public static final int GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH
public String[] build(StyledFragment message)
message - the messagepublic static String getFormattingCode(StyleSet style)
style - the stylepublic static String getCode(StyleSet style)
style - the stylepublic static String getAdditive(StyleSet resetTo, StyleSet resetFrom)
resetTo - the style to reset toresetFrom - the style to reset fromprotected String transform(String word)
word - the wordpublic static String asColorCodes(StyledFragment fragment)
fragment - the fragmentCopyright © 2010-2014. All Rights Reserved.