Bug 26675 - custom selected text color does not work for JTextArea
Summary: custom selected text color does not work for JTextArea
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: 0.90
: P3 normal
Target Milestone: 0.91
Assignee: Robert Schuster
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-14 12:47 UTC by Robert Schuster
Modified: 2006-03-17 15:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-03-14 12:48:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Schuster 2006-03-14 12:47:54 UTC
The JTextArea seems to ignore the color for selected text. One can see that in the TextArea section of the Swing demo: The bottom right JTextArea on the "custom-color" tab should paint white text with a black selection.
Comment 1 Robert Schuster 2006-03-14 12:48:19 UTC
This is my playground. :)
Comment 2 cvs-commit@developer.classpath.org 2006-03-17 15:34:15 UTC
Subject: Bug 26675

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Branch: 	
Changes by:	Robert Schuster <rschuster@savannah.gnu.org>	06/03/17 15:29:33

Modified files:
	.              : ChangeLog 
	javax/swing/text: PlainView.java Utilities.java 

Log message:
	This fixes PR #26675.
	
	2006-03-17  Robert Schuster  <robertschuster@fsfe.org>
	
	* javax/swing/text/PlainView.java:
	(drawLine): Rewritten.
	(drawSelectedText): Corrected last argument for
	Utilities.drawTabbedText() call.
	(paint): Store start and end of selection in object variables,
	store constant values of for-loop in local variables.
	* javax/swing/text/Utilities.java:
	(drawTabbedText): Add 'pixelWidth' to the return value, store
	constant value of for-loop in local variable.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6777&tr2=1.6778&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/PlainView.java.diff?tr1=1.38&tr2=1.39&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/Utilities.java.diff?tr1=1.25&tr2=1.26&r1=text&r2=text



Comment 3 Robert Schuster 2006-03-17 15:37:43 UTC
Fixed!