CVSROOT: /cvsroot/classpath Module name: classpath Changes by: Lillian Angel <langel> 06/06/08 14:27:44
Modified files: . : ChangeLog javax/swing/plaf/basic: BasicProgressBarUI.java Log message: 2006-06-08 Lillian Angel <[EMAIL PROTECTED]> * javax/swing/plaf/basic/BasicProgressBarUI.java (paintString): Fixed to paint string at the correct location. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.7717&r2=1.7718 http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java?cvsroot=classpath&r1=1.16&r2=1.17 Patches: Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.7717 retrieving revision 1.7718 diff -u -b -r1.7717 -r1.7718 --- ChangeLog 8 Jun 2006 14:00:54 -0000 1.7717 +++ ChangeLog 8 Jun 2006 14:27:43 -0000 1.7718 @@ -1,3 +1,8 @@ +2006-06-08 Lillian Angel <[EMAIL PROTECTED]> + + * javax/swing/plaf/basic/BasicProgressBarUI.java + (paintString): Fixed to paint string at the correct location. + 2006-06-08 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/plaf/basic/BasicTreeUI.java Index: javax/swing/plaf/basic/BasicProgressBarUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -b -r1.16 -r1.17 --- javax/swing/plaf/basic/BasicProgressBarUI.java 31 May 2006 18:57:20 -0000 1.16 +++ javax/swing/plaf/basic/BasicProgressBarUI.java 8 Jun 2006 14:27:44 -0000 1.17 @@ -734,6 +734,7 @@ height - b.top - b.bottom); Color savedColor = g.getColor(); Shape savedClip = g.getClip(); + FontMetrics fm = g.getFontMetrics(progressBar.getFont()); if (progressBar.getOrientation() == JProgressBar.VERTICAL) { @@ -743,10 +744,10 @@ g.setColor(getSelectionForeground()); g.setClip(0, 0, full + b.left, height); - g.drawString(str, placement.x, placement.y); + g.drawString(str, placement.x, placement.y + fm.getAscent()); g.setColor(getSelectionBackground()); g.setClip(full + b.left, 0, width - full, height); - g.drawString(str, placement.x, placement.y); + g.drawString(str, placement.x, placement.y + fm.getAscent()); g.setClip(savedClip); g.setColor(savedColor); }