Bug 29644 - jircii text overlaps on itself
Summary: jircii text overlaps on itself
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: unspecified
: P3 critical
Target Milestone: 0.93
Assignee: Roman Kennke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-30 10:29 UTC by David Walluck
Modified: 2007-01-07 21:20 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-10-30 10:35:11


Attachments
Screenshot of overlapping text in main window and statusbar (2.96 KB, image/png)
2006-10-30 10:30 UTC, David Walluck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Walluck 2006-10-30 10:29:23 UTC
FreeSwingTestApps lists

# Last edit: 2006-08-13 RomanKennke
# Tested against Classpath version: unknown
# How to build: Not tested yet.

Currently, I have tried jircii b40. The text overlaps on itself in both the text window and statusbar, so it is not really useable. Also, the about box causes the client to hang. I am not sure if this is the same issue or not.

Compilation basically works. There are some text encoding issues with the AboutWindow.java (about box) that cause javac (ecj) and especially javadoc (gjdoc) to fail. I have reported this upstream.
Comment 1 David Walluck 2006-10-30 10:30:27 UTC
Created attachment 12510 [details]
Screenshot of overlapping text in main window and statusbar
Comment 2 Roman Kennke 2006-10-30 10:35:11 UTC
I see similar effects in BeanShell. I'll fix this before 0.93.
Comment 3 cvs-commit@developer.classpath.org 2006-11-02 11:03:01 UTC
Subject: Bug 29644

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Changes by:	Roman Kennke <rabbit78>	06/11/02 11:02:29

Modified files:
	gnu/java/awt/peer/x: XFontPeer.java XFontPeer2.java 
	java/awt       : Font.java 
	.              : ChangeLog 
	gnu/java/awt/peer/gtk: FreetypeGlyphVector.java 
	                       GdkFontMetrics.java GdkFontPeer.java 
	                       GtkWindowPeer.java 
	gnu/java/awt/peer/qt: QtFontPeer.java 

Log message:
	2006-11-02  Roman Kennke  <kennke@aicas.com>
	
		PR 29644
		* gnu/java/awt/peer/ClasspathFontPeer.java
		(getStringBounds): Removed abstract method. This is replaced
		in java.awt.Font to use a TextLayout.
		* gnu/java/awt/peer/gtk/GtkWindowPeer.java
		(GtkWindowPeer): Set a font on the window object.
		* gnu/java/awt/peer/gtk/FreetypeGlyphVector.java
		(FreetypeGlyphVector(Font,String,FontRenderContext,int)):
		Changed to take char,int,int instead of String. Filter
		control characters.
		(FreetypeGlyphVector(Font,String,FontRenderContext)):
		Create char array out of string.
		(getLogicalBounds): Don't translate bounds. They already are
		translated.
		* gnu/java/awt/peer/gtk/GdkFontMetrics.java
		(stringWidth): Filter out control characters.
		* gnu/java/awt/peer/gtk/GdkFontPeer.java
		(getStringBounds): Removed unneeded method.
		(layoutGlyphVector): Pass char array directly to FreetypeGlyphVector
		constructor.
		* gnu/java/awt/peer/qt/QtFontPeer.java
		(getStringBounds): Removed unneeded method.
		* gnu/java/awt/peer/x/XFontPeer.java
		(getStringBounds): Removed unneeded method.
		* gnu/java/awt/peer/x/XFontPeer2.java
		(getStringBounds): Removed unneeded method.
		* java/awt/Font.java
		(getStringBounds(char[],int,int,FontRenderContext)):
		Use TextLayout to determine the bounds.
		(getStringBounds(CharacterIterator,int,int,FontRenderContext)):
		Delegate to the char[] version of this method.
		(getStringBounds(String,FontRenderContext)):
		Delegate to the char[] version of this method.
		(getStringBounds(String,int,int,FontRenderContext)):
		Delegate to the String version of this method.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XFontPeer.java?cvsroot=classpath&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/x/XFontPeer2.java?cvsroot=classpath&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/Font.java?cvsroot=classpath&r1=1.37&r2=1.38
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.8744&r2=1.8745
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java?cvsroot=classpath&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GdkFontMetrics.java?cvsroot=classpath&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java?cvsroot=classpath&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/gtk/GtkWindowPeer.java?cvsroot=classpath&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/awt/peer/qt/QtFontPeer.java?cvsroot=classpath&r1=1.4&r2=1.5



Comment 4 cvs-commit@developer.classpath.org 2006-11-02 11:20:39 UTC
Subject: Bug 29644

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Changes by:	Roman Kennke <rabbit78>	06/11/02 11:20:22

Modified files:
	javax/swing/text: FlowView.java GlyphView.java Utilities.java 
	.              : ChangeLog 

Log message:
	2006-11-02  Roman Kennke  <kennke@aicas.com>
	
		PR 29644
		* javax/swing/text/FlowView.java
		(FlowStrategy.changedUpdate): Reversed condition. This caused
		wrong layout and bad performance.
		(FlowStrategy.insertUpdate): Reversed condition. This caused
		wrong layout and bad performance.
		(FlowStrategy.removeUpdate): Reversed condition. This caused
		wrong layout and bad performance.
		(LogicalView): Changed to be a subclass of CompositeView.
		(LogicalView()): Only take one Element argument.
		(LogicalView.childAllocation): New method for implementing
		the abstract CompositeView method.
		(LogicalView.forwardUpdateToView): Overridden for correct
		reparenting.
		(getMinimumSpan): Overridden to handle line breaking correctly.
		(getPreferredSpan): Implemented to handle line breaking correctly.
		(getViewAtPoint): New method for implementing
		the abstract CompositeView method.
		(getViewIndexAtPosition): Overridden to handle leaf elements
		correctly.
		(isAfter): New method for implementing
		the abstract CompositeView method.
		(isBefore): New method for implementing
		the abstract CompositeView method.
		(loadChildren): Overridden to handle leaf elements
		correctly.
		(paint): New method for implementing
		the abstract CompositeView method.
		(calculateMinorAxisRequirements): Use preferredSpan in calculation.
		(loadChildren): Initialize flow layout by sending a synthetic
		insertUpdate() to the layout strategy.
		* javax/swing/text/GlyphView.java
		(DefaultGlyphPainter.getBoundedPosition): Fall back to Toolkit's
		font metrics if component is not available. Add initial offset
		to result.
		(breakView): Be more clever when breaking the view.
		(getBreakLocation): New helper method to determine a good
		break location.
		(getBreakWeight): Be more clever when breaking the view.
		(getTabbedSpan): Make sure we have a painter. Use view's
		start and end offset rather than the element's.
		* javax/swing/text/Utilities.java
		(drawTabbedText): Avoid useless add and sub with the y offset.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/FlowView.java?cvsroot=classpath&r1=1.17&r2=1.18
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/GlyphView.java?cvsroot=classpath&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/text/Utilities.java?cvsroot=classpath&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.8745&r2=1.8746



Comment 5 Roman Kennke 2006-11-02 11:31:22 UTC
After some fixes it both jIRCii and BeanShell work for me. Can you please re-check?
Comment 6 Roman Kennke 2007-01-07 21:20:22 UTC
Closing this one. I can't see a problem anymore.