JDK-8100542 : Add support for drawing selected text in alternate color to Text class
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2011-07-27
  • Updated: 2015-06-16
  • Resolved: 2011-10-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
fx2.0.2Resolved
Related Reports
Relates :  
Description
The current UX spec requires that selected text in a text input control be rendered in a different color than non-selected text (see RT-15355). Adding support for rendering the selected text in a different color to the Text class would be the simplest way to resolve this issue.

Comments
Greg verified that fixing RT-16386 resolves this issue. Thus closing as dup. Fixed issue in 2.0.2 graphics runtime changeset: 14768:ac8a5a9c05bf
25-10-2011

Linking a very similar bug, which has recently been resolved.
25-10-2011

I was thinking that the API might allow a caller to specify a range and a paint to use to draw the selected text foreground but not necessarily the selection background. The background could still be handled by TextField or TextArea. But I am open to other suggestions as well.
27-07-2011

The issue is that when you select text in many apps its not just the colour of the background that changes, often the colour of the text itself changes either to a program specified colour, or automatically, to contrast with the background highlight. This isn't possible in the text node because the highlight is painted by the TextBox and it can't paint the text itself. A Rich Text node would solve this but so would a simpler internal mechanism so that the Text node directly supports highlighting/selection, but even that's more than a few lines of code
27-07-2011