/** * Before your call this method, you need call {link@ #parseToVoidStyledTextConfusion(String)} to make sure the text * will not contain confusion "\" or "{" * * @param label the styledLabel to be set with the text * @param text the styled text */ public static void setStyledText(StyledLabel label, char[] text) { setStyledText(label, text, null); }
public StyledLabel configure(StyledLabel label, String style) { StyledLabelBuilder.setStyledText(label, style, this); return label; }
/** * Before your call this method, you need call {link@ #parseToVoidStyledTextConfusion(String)} to make sure the text * will not contain confusion "\" or "{" * * @param label the styledLabel to be set with the text * @param text the styled text */ public static void setStyledText(StyledLabel label, String text) { setStyledText(label, text.toCharArray()); }
private static void setStyledText(StyledLabel label, String text, StyledLabelBuilder builder) { setStyledText(label, text.toCharArray(), builder); }
public static StyledLabel createStyledLabel(String text) { StyledLabel label = new StyledLabel(); setStyledText(label, text); return label; }
@Override public void setTipText(String tipText) { super.setTipText(tipText != null ? "" : null); StyledLabelBuilder.setStyledText(label, tipText != null ? tipText : ""); revalidate(); } }