The base class for Substance highlight painters is
Highlight painter is used to paint the highlights of renderer-based
UI components (such as trees, tables, lists), as well as highlights
of menu items. It can also be used to paint visuals of third-party
components (see skinning primer for
more information). This allows providing a consistent and pluggable
appearance to those components. In addition, it provides an external API
for applications that wish to skin custom components in a visually
The only painting method in
* Paints the highlight.
* @param graphics
* Graphics context.
* @param comp
* @param width
* @param height
* @param colorScheme
* The color scheme for painting the highlight.
public void paintHighlight(Graphics2D graphics, Component comp, int width,
int height, SubstanceColorScheme colorScheme);
parameters specify the rectangle to highlight (the highlight
painters are only used on rectangular areas), while the
colorScheme specifies the Substance
color scheme to be used to compute the highlight colors.
Specific implementations are encouraged to
maintain an internal cache of computed images, at least for
If you wish to use the highlight painter of the current skin to provide additional custom painting in your application, call:
SubstanceLookAndFeel.getCurrentSkin()to retrieve the current skin.
SubstanceSkin.getHighlightPainter()to retrieve the highlight painter of the current skin.
SubstanceHighlightPainter.paintHighlight()to paint the highlight background on the specific graphics context.