/** * Set the behavior of the current editing component to display raw text when the client hovers * over the text. * * <p>Tooltips do not inherit display characteristics, such as color and styles, from the message * component on which they are applied. * * @param lines The lines of text which will be displayed to the client upon hovering. * @return This builder instance. */ public FancyMessage tooltip(final String... lines) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < lines.length; i++) { builder.append(lines[i]); if (i != lines.length - 1) { builder.append('\n'); } } tooltip(builder.toString()); return this; }
/** * Set the behavior of the current editing component to display raw text when the client hovers * over the text. * * <p>Tooltips do not inherit display characteristics, such as color and styles, from the message * component on which they are applied. * * @param lines The lines of text which will be displayed to the client upon hovering. The * iteration order of this object will be the order in which the lines of the tooltip are * created. * @return This builder instance. */ public FancyMessage tooltip(final Iterable<String> lines) { tooltip(ArrayWrapper.toArray(lines, String.class)); return this; }