String (@Nullable Border value) { if (value == null) { return "null"; } StringBuilder sb = new StringBuilder(); sb.append(UiInspectorUtil.getClassName(value)); Color color = getBorderColor(value); if (color != null) sb.append(" color=").append(color); if (value instanceof LineBorder) { if (((LineBorder)value).getRoundedCorners()) sb.append(" roundedCorners=true"); } if (value instanceof TitledBorder) { sb.append(" title='").append(((TitledBorder)value).getTitle()).append("'"); } if (value instanceof CompoundBorder) { sb.append(" inside={").append(getTextDescription(((CompoundBorder)value).getInsideBorder())).append("}"); sb.append(" outside={").append(getTextDescription(((CompoundBorder)value).getOutsideBorder())).append("}"); } if (value instanceof EmptyBorder) { Insets insets = ((EmptyBorder)value).getBorderInsets(); sb.append(" insets={top=").append(insets.top) .append(" left=").append(insets.left) .append(" bottom=").append(insets.bottom) .append(" right=").append(insets.right) .append("}"); } if (value instanceof NamedBorder namedBorder) { sb.append(" '").append(namedBorder.getName()).append("' ").append(getTextDescription(namedBorder.getOriginal())); } if (value instanceof UIResource) sb.append(" UIResource"); sb.append(" (").append(getToStringValue(value)).append(")"); return sb.toString(); }