Bug 23887 - JProgressBar does not draw text vertically
Summary: JProgressBar does not draw text vertically
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: 0.18
: P2 normal
Target Milestone: ---
Assignee: Thomas Fitzsimmons
URL:
Keywords:
Depends on: 20630
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-14 20:31 UTC by Lillian Angel
Modified: 2007-04-12 21:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-01-15 19:54:20


Attachments
vertical text not drawn (938 bytes, text/plain)
2005-09-14 20:33 UTC, Lillian Angel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lillian Angel 2005-09-14 20:32:00 UTC
It draws the horizontal text fine, but the vertical text is not painted at all.
Comment 1 Lillian Angel 2005-09-14 20:33:09 UTC
Created attachment 9733 [details]
vertical text not drawn
Comment 2 Roman Kennke 2006-05-03 10:52:10 UTC
My latest work with TTF fonts and AbstractGraphics2D might help here. The fonts need hinting though to provide acceptable results.
Comment 3 Lillian Angel 2006-05-03 18:22:20 UTC
Still does not paint vertically
Comment 4 Sven de Marothy 2006-05-22 09:25:35 UTC
Well, this is no biggie to implement with Graphics2D, no font rendering particulars needed, just a matter of setting the transform to [0 1; 1 0]. 

Anyway, maybe we should get rid of that return statement in BasicProgressBarUI and render it horizontally. Horizontal text is still better than none for the time being.
Comment 5 Lillian Angel 2006-05-31 18:55:37 UTC
I have implemented BasicProgressBarUI to paint the text vertically, but it doesnt seem to happen. It is a Graphics2d bug  now, not JProgressBar
Comment 6 cvs-commit@developer.classpath.org 2007-04-12 20:28:08 UTC
Subject: Bug 23887

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Changes by:	Francis Kung <fkung>	07/04/12 19:27:47

Modified files:
	javax/swing/plaf/basic: BasicProgressBarUI.java 
	gnu/java/awt/peer/gtk: FreetypeGlyphVector.java 
	.              : ChangeLog 

Log message:
	2007-04-12  Francis Kung  <fkung@redhat.com>
	
		PR 23887
		* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
		(getGlyphLogicalBounds): Fix number of coordinates in transform call.
		(performDefaultLayout): Respect transformation in font attributes.
		* javax/swing/plaf/basic/BasicProgressBarUI.java
		(getStringPlacement): Handle vertical orientations.
		(paintString): Space vertical text properly.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/plaf/basic/BasicProgressBarUI.java?cvsroot=classpath&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java?cvsroot=classpath&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9240&r2=1.9241



Comment 7 cvs-commit@developer.classpath.org 2007-04-12 21:18:27 UTC
Subject: Bug 23887

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Changes by:	Francis Kung <fkung>	07/04/12 20:18:10

Modified files:
	gnu/java/awt/peer/gtk: FreetypeGlyphVector.java 
	                       CairoGraphics2D.java 
	.              : ChangeLog 

Log message:
	2007-04-12  Francis Kung  <fkung@redhat.com>
	
		PR 23887
		* gnu/java/awt/peer/gtk/CairoGraphics2D.java
		(drawGlyphVector): Check for transforms before using optimized path.
		* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
		(FreetypeGlyphVector(FreetypeGlyphVector)): Initialize glyphTransforms array
		to null and check for nulls in copied array.
		(hasTransforms): New method.
		(performDefaultLayout): Check for identity transform.
		(setGlyphTransform): Check for equality before making changes.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java?cvsroot=classpath&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java?cvsroot=classpath&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9241&r2=1.9242



Comment 8 Francis Kung 2007-04-12 21:22:15 UTC
Fixed.