01: /*
02: This library is free software; you can redistribute it and/or
03: modify it under the terms of the GNU General Public
04: License as published by the Free Software Foundation; either
05: version 2 of the license, or (at your option) any later version.
06: */
07:
08: package org.gjt.jclasslib.util;
09:
10: import javax.swing.*;
11: import java.awt.*;
12:
13: /**
14: Transparent icon with no content.
15:
16: @author <a href="mailto:jclasslib@ej-technologies.com">Ingo Kegel</a>
17: @version $Revision: 1.1 $ $Date: 2003/08/18 07:46:43 $
18: */
19: public class EmptyIcon implements Icon {
20:
21: private int width;
22: private int height;
23:
24: /**
25: * Constructor.
26: * @param width the width of the icon.
27: * @param height the height of the icon.
28: */
29: public EmptyIcon(int width, int height) {
30: this .width = width;
31: this .height = height;
32: }
33:
34: public void paintIcon(Component c, Graphics g, int x, int y) {
35: }
36:
37: public int getIconWidth() {
38: return width;
39: }
40:
41: public int getIconHeight() {
42: return height;
43: }
44: }
|