org.jvnet.substance.title
Interface SubstanceHeaderPainter

All Superinterfaces:
SubstanceTitlePainter, SubstanceTrait
All Known Implementing Classes:
ArcHeaderPainter, BaseHeaderPainter, BrushedMetalHeaderPainter, ImageWrapperHeaderPainter, MarbleNoiseHeaderPainter, MatteHeaderPainter

public interface SubstanceHeaderPainter
extends SubstanceTitlePainter

Base interface for title painters that paint menubars and toolbars (in addition to painting the title panes).

Author:
kirillg

Method Summary
 SubstanceTitlePainter getSecondaryPainter()
          Returns the secondary painter which is used for painting areas that do not have the painting of title pane (currently used for menu items).
 boolean isPaintingContainer(java.awt.Container cont)
          Returns indication whether this painter is used to paint the background of the specified container.
 boolean isPaintingToolbarDropShadows()
          Returns indication whether this painter will cause drop shadows to appear on the top portion of the toolbars that are not painted by this painter (that is, this method is relevant only when #isPaintingContainer() returns false when called with JToolBar parameter).
 void paintExtraBackground(java.awt.Graphics2D graphics, java.awt.Container parent, java.awt.Component comp, int width, int height, SubstanceTheme theme, boolean hasDarkBorder)
          Paints background of non-title pane content (such as menubars and toolbars).
 
Methods inherited from interface org.jvnet.substance.title.SubstanceTitlePainter
getDisplayName, paintTitleBackground
 

Method Detail

paintExtraBackground

void paintExtraBackground(java.awt.Graphics2D graphics,
                          java.awt.Container parent,
                          java.awt.Component comp,
                          int width,
                          int height,
                          SubstanceTheme theme,
                          boolean hasDarkBorder)
Paints background of non-title pane content (such as menubars and toolbars).

Parameters:
graphics - Graphics context.
parent - Component parent.
comp - Component.
width - Area width to paint.
height - Area height to paint.
theme - Theme to use for painting.
hasDarkBorder - Indicates whether a border should be added to the resulting painting.

getSecondaryPainter

SubstanceTitlePainter getSecondaryPainter()
Returns the secondary painter which is used for painting areas that do not have the painting of title pane (currently used for menu items).

Returns:
The secondary painter.

isPaintingContainer

boolean isPaintingContainer(java.awt.Container cont)
Returns indication whether this painter is used to paint the background of the specified container.

Parameters:
cont - Container.
Returns:
true if this painter is used to paint the background of the specified container, false otherwise.

isPaintingToolbarDropShadows

boolean isPaintingToolbarDropShadows()
Returns indication whether this painter will cause drop shadows to appear on the top portion of the toolbars that are not painted by this painter (that is, this method is relevant only when #isPaintingContainer() returns false when called with JToolBar parameter).

Returns:
true if this painter will cause drop shadows to appear on the top portion of the toolbars that are not painted by this painter, false otherwise.