01: package org.jvnet.substance.flexdock;
02:
03: import java.awt.Graphics;
04: import java.awt.Insets;
05:
06: import javax.swing.JComponent;
07:
08: import org.flexdock.plaf.resources.paint.DefaultPainter;
09: import org.jvnet.substance.SubstanceImageCreator;
10: import org.jvnet.substance.SubstanceLookAndFeel;
11: import org.jvnet.substance.color.ColorScheme;
12:
13: public class SubstancePainter extends DefaultPainter {
14: @Override
15: public void paint(Graphics g, int width, int height,
16: boolean active, JComponent titlebar) {
17: ColorScheme colorScheme = active ? SubstanceLookAndFeel
18: .getActiveColorScheme() : SubstanceLookAndFeel
19: .getDefaultColorScheme();
20: Insets insets = titlebar.getInsets();
21: SubstanceImageCreator.paintRectangularBackground(g,
22: insets.left + 1, insets.top + 1, width - insets.left
23: - insets.right - 2, height - insets.top
24: - insets.bottom - 2, colorScheme, 1.0f, false);
25: }
26: }
|