Editor - Highlighting the Active Line

Author: Rudolf Bock
Version: 1.02

Dates: March 14th, 2005


If the user set the cursor to a line in the code Editor, this will be highlighted by a colored stripe in the background. This highlighting goes thru the whole line - through the whole editor window, even on code folding.
In principle, the highlight color should be visible by user on as much more as possible monitors and at the same time it shouldn't tire the eyes, when he is working for a long time.
On the other hand, there are some users, who are not prefer line highlighting or want a different color-scheme for their workspace.

Another input formed by the NetBeans itself. NetBeans is a multi-platform IDE, which can be used in various environments. It is not only about using Windows, Linux, Solaris or MacOS. Each platform has different capabilities for handling with the displayed output. There are listed only few aspects:

  • OS capabilities - Gamma correction, White point balancing, how color profiles are implemented, handling with monitors (feedback with the monitor hardware - drivers)
  • Graphic card capabilities - how these works with current monitors, support for more than one display, resolution/color depth, analog/digital outputs...
  • Displays - today users using too much types of monitors: dot-mask CRTs, stripe mask CRTs, professional LCDs, cheap modern LCDs (e.g. relative fast-response displays with dithering compensation), laptop LCDs with narrow viewing angle...
  • Personal setting - is the working space calibrated (computer, graphic card, monitors)? How user compensate the ambient light? etc

The default color-scheme of the IDE must reflect these options, it must predict as much as possible aspects so, that the user can make a positive experience when he started it for the first time.

Environment limitations

This chapter will give a basic insight into this problematic. It covers input values like monitor characteristic and default OS capabilities. This will set out our play-space for choosing default colors.

Default Gamma correction (lower Gamma features with a wider color scale but higher Gamma values produces better contrast)

  • pre-XP Windows using mostly 2.2 (frequently can't get feedback with the monitor without a proper driver)
  • Windows XP using vendor-depend settings between 2.2 and 2.4 (user isn't able change the behavior of the system without a specialized software)
  • Macintosh default Gamma is 1.8, but on factory pre-installed MacOS X is the default Gamma correction different for consumer Macs (2.0) and for professional hardware (1.8). User can correct the color-management using system preferences.
  • Linux generally not coming with built-in color-management at the system level, but there are few third-party implementations for using standardized ICC profiles

White point balancing (lower values causes more red - higher values more blue shades)

  • CRTs with dot-mask mostly working with white point around 7500 K (warm white color with yellow touch)
  • CRTs with stripe-mask (e.g. Trinitron or Diamotron tubes) mostly using values above 8000 K (cold white with light-blue touch)
  • LCD monitors more depending on the used lamp and dithering compensation. Native white point for LCDs is mostly above 9300 K

Combination of the parameters listed above get an another importance, when the user plays with the saturation and contrast settings or when he use a monitor switch (signal level - input/output impedance). The difference can be even more than 30 percent for the same RGB values (the most affected channels are R and G).
This influencing the whole GUI - not only background colors, but also icons, syntax coloring etc.

The default highlight color

NetBeans Editor support not only Java code, but it is used also for editing CSS definitions, HTML code, ordinary Plain text files, JSPs, XML files, DTDs and Properties files.
For each of this code types IDE is offering possibility set options like text color, size, line numbering etc. Now another two options should be added. The first one is "Highlight Active Line", which allow user enable or disable line highlighting (enabled by default for all listed file types). The second option is the highlight color, this is set to the same default value for all types as well.

The default highlight color is chosen so, to agree with the lightest text color without negative influence of the contrast and saturation level of the displayed text (e.g. comments). This default RGB value is optimized for using CRT displays and LCD monitors with or without color correction as well. On MacOS with LCD this color will be displayed as light-gray with a little beige touch, on Mac with CRTs as light-gray with pink shading. On Windows machines without color management tool installed user will see a decent light blue line. On Windows with balanced screen it will look as a light-gray line with a cyan touch.

Unfortunately, using this feature on some LCDs, user can have problems recognize the selected text. Therefore the default color for text selection must be changed as well.

The new selection is more darker and in conclusion with the inverted (white) text readable also with comments and displays with higher resolution (typically above 96 ppi).

Project Features

About this Project

Usersguide was started in November 2009, is owned by kganfield, and has 64 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm