How do I get the text in a IconicNode label to wrap? “\n” does not work.
private void setTaskText() {
StringBuffer shownText = new StringBuffer(currentTask.getDescription());
shownText.append("\n[42](363){N,D}");
if (showCounts) {
shownText.append(" [ ");
shownText.append(currentTask.getItemCount());
shownText.append(" ]");
}
if (showMinutes) {
shownText.append(" ( ");
shownText.append(currentTask.getCurrentEstimatedWorkLoad().getTotalMinutes());
shownText.append(" )");
}
this.getLabel().setWrapping(true);
this.getLabel().setMultiline(true);
this.getLabel().setAlignment(Center);
this.getLabel().setText(shownText.toString());
this.update();
}
The append is just for testing but it still puts it on the same line. There are a whole bunch of issues with setting the wrap width such as if the appended text is longer than the name. Thanks.