Typo: inspect_jpegs, not inspect-jpegs in form
[privoxy.git] / src / java / org / privoxy / activityconsole / BlankIcon.java
1 /*********************************************************************
2  *
3  * File        :  $Source$
4  *
5  * Purpose     :  Painting details for rendering a blank icon.
6  *
7  * Copyright   :  Written by and Copyright (C) 2003 the SourceForge
8  *                Privoxy team. http://www.privoxy.org/
9  *
10  *                Based on the Internet Junkbuster originally written
11  *                by and Copyright (C) 1997 Anonymous Coders and
12  *                Junkbusters Corporation.  http://www.junkbusters.com
13  *
14  *                This program is free software; you can redistribute it
15  *                and/or modify it under the terms of the GNU General
16  *                Public License as published by the Free Software
17  *                Foundation; either version 2 of the License, or (at
18  *                your option) any later version.
19  *
20  *                This program is distributed in the hope that it will
21  *                be useful, but WITHOUT ANY WARRANTY; without even the
22  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
23  *                PARTICULAR PURPOSE.  See the GNU General Public
24  *                License for more details.
25  *
26  *                The GNU General Public License should be included with
27  *                this file.  If not, you can view it at
28  *                http://www.gnu.org/copyleft/gpl.html
29  *                or write to the Free Software Foundation, Inc., 59
30  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31  *
32  * Revisions   :
33  *    $Log$
34  *********************************************************************/
35
36 package org.privoxy.activityconsole;
37
38 import java.awt. *;
39 import javax.swing. *;
40
41 /** 
42  * Painting details for rendering a blank icon.
43  * @author Last Modified By: $Author$
44  * @version $Rev$-$Date$$State$
45  */
46 public class BlankIcon implements Icon
47 {
48
49   private static final String
50   COPYRIGHT = org.privoxy.activityconsole.Copyright.COPYRIGHT;
51
52   private Color fillColor;
53   private int size;
54
55   public BlankIcon()
56   {
57     this(null, 11);
58   }
59
60   public BlankIcon(Color color, int size)
61   {
62     fillColor = color;
63     this.size = size;    
64   }
65
66   public void paintIcon(Component c, Graphics g, int x, int y)
67   {
68     if (fillColor != null)
69     {
70       g.setColor(fillColor);
71       g.drawRect(x, y, size-1, size-1);
72     }
73   }
74
75   public int getIconWidth()
76   {
77     return size;
78   }
79
80   public int getIconHeight()
81   {
82     return size;
83   }
84 }