01: /**
02: * L2FProd.com Common Components 7.3 License.
03: *
04: * Copyright 2005-2007 L2FProd.com
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package com.l2fprod.common.swing.icons;
18:
19: import java.awt.Component;
20: import java.awt.Graphics;
21:
22: import javax.swing.Icon;
23:
24: /**
25: * An empty icon with arbitrary width and height.
26: */
27: public final class EmptyIcon implements Icon {
28:
29: private int width;
30: private int height;
31:
32: public EmptyIcon() {
33: this (0, 0);
34: }
35:
36: public EmptyIcon(int width, int height) {
37: this .width = width;
38: this .height = height;
39: }
40:
41: public int getIconHeight() {
42: return height;
43: }
44:
45: public int getIconWidth() {
46: return width;
47: }
48:
49: public void paintIcon(Component c, Graphics g, int x, int y) {
50: }
51:
52: }
|