Plugin colors

There are a number of colors used by the View that should also be used by plugins where possible. This helps promote a consistent color scheme throughout jEdit.

The main color properties are:

To use these colors in your plugin, use

jEdit.getColorProperty("view.whatever", default_color)

For example, the QuickNotepad example should have lines like this:

        textarea.setBackground(jEdit.getColorProperty("view.bgColor", Color.WHITE));
        textarea.setForeground(jEdit.getColorProperty("view.fgColor", Color.BLACK));
        

This sets the foreground and background colors of QuickNotepad to be the same as those in the View.

There are other color properties that may be useful, depending on what your plugin displays.

Gutter colors:

Status bar colors:

Structure highlight colors:

Style colors. Use GUIUtilities.parseStyle for these.

For example, here is a setting for a fold line color:

         view.style.foldLine.0=color\:\#000000 bgColor\:\#f5deb8 style\:b
         

Passing the value to GUIUtilities.parseStyle will return a SyntaxStyle object, which you can query for background color, foreground color, and font.