src/java.desktop/share/classes/sun/font/Decoration.java

Print this page
rev 10520 : 8055723[client]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>


 414                 Area ulArea = new Area(ul);
 415                 if (area == null) {
 416                     area = ulArea;
 417                 }
 418                 else {
 419                     area.add(ulArea);
 420                 }
 421             }
 422 
 423             // area won't be null here, since at least one underline exists.
 424             area.add(new Area(label.handleGetOutline(x, y)));
 425 
 426             return new GeneralPath(area);
 427         }
 428 
 429 
 430         public String toString() {
 431             StringBuilder sb = new StringBuilder();
 432             sb.append(super.toString());
 433             sb.append("[");
 434             if (fgPaint != null) sb.append("fgPaint: " + fgPaint);
 435             if (bgPaint != null) sb.append(" bgPaint: " + bgPaint);
 436             if (swapColors) sb.append(" swapColors: true");
 437             if (strikethrough) sb.append(" strikethrough: true");
 438             if (stdUnderline != null) sb.append(" stdUnderline: " + stdUnderline);
 439             if (imUnderline != null) sb.append(" imUnderline: " + imUnderline);
 440             sb.append("]");
 441             return sb.toString();
 442         }
 443     }
 444 }


 414                 Area ulArea = new Area(ul);
 415                 if (area == null) {
 416                     area = ulArea;
 417                 }
 418                 else {
 419                     area.add(ulArea);
 420                 }
 421             }
 422 
 423             // area won't be null here, since at least one underline exists.
 424             area.add(new Area(label.handleGetOutline(x, y)));
 425 
 426             return new GeneralPath(area);
 427         }
 428 
 429 
 430         public String toString() {
 431             StringBuilder sb = new StringBuilder();
 432             sb.append(super.toString());
 433             sb.append("[");
 434             if (fgPaint != null) sb.append("fgPaint: ").append(fgPaint);
 435             if (bgPaint != null) sb.append(" bgPaint: ").append(bgPaint);
 436             if (swapColors) sb.append(" swapColors: true");
 437             if (strikethrough) sb.append(" strikethrough: true");
 438             if (stdUnderline != null) sb.append(" stdUnderline: ").append(stdUnderline);
 439             if (imUnderline != null) sb.append(" imUnderline: ").append(imUnderline);
 440             sb.append("]");
 441             return sb.toString();
 442         }
 443     }
 444 }