use of org.apache.pivot.wtk.text.TextNode in project pivot by apache.
the class TextPaneSkinTextNodeView method toString.
@Override
public String toString() {
TextNode textNode = (TextNode) getNode();
String text = textNode.getText();
// Sometimes the length may not be correct yet (i.e., during layout) so check before using
String textSubString = "";
if (length < 0 || start + length > text.length()) {
textSubString = text.substring(start);
} else {
textSubString = text.substring(start, start + length);
}
return ClassUtils.simpleToString(this) + " start=" + start + ",length=" + length + " [" + textSubString + "]";
}
Aggregations