2
* Copyright (c) 2002 and later by MH Software-Entwicklung. All Rights Reserved.
4
* JTattoo is multiple licensed. If your are an open source developer you can use
5
* it under the terms and conditions of the GNU General Public License version 2.0
6
* or later as published by the Free Software Foundation.
10
* If you pay for a license you will become a registered user who could use the
11
* software under the terms and conditions of the GNU Lesser General Public License
12
* version 2.0 or later with classpath exception as published by the Free Software
16
* see: classpath-exception.txt
18
* Registered users could also use JTattoo under the terms and conditions of the
19
* Apache License, Version 2.0 as published by the Apache Software Foundation.
21
* see: APACHE-LICENSE-2.0.txt
24
package com.jtattoo.plaf.bernstein;
26
import com.jtattoo.plaf.*;
28
import javax.swing.Icon;
31
* @author Michael Hagen
33
public class BernsteinUtils {
35
private static final Icon BG_IMAGE = new LazyImageIcon("bernstein/icons/background.jpg");
36
private static final int IMAGE_WIDTH = BG_IMAGE.getIconWidth();
37
private static final int IMAGE_HEIGHT = BG_IMAGE.getIconHeight();
39
private BernsteinUtils() {
42
public static void fillComponent(Graphics g, Component c) {
43
if (AbstractLookAndFeel.getTheme().isBackgroundPatternOn()) {
45
int h = c.getHeight();
46
Point p = JTattooUtilities.getRelLocation(c);
51
BG_IMAGE.paintIcon(c, g, x, y);
57
g.setColor(c.getBackground());
58
g.fillRect(0, 0, c.getWidth(), c.getHeight());