01: /**
02: * Created on Dec 12, 2004
03: *
04: * @author karthikeyanr
05: *
06: */package wizard.ui;
07:
08: import java.awt.*;
09:
10: import javax.swing.JTree;
11: import javax.swing.tree.TreeNode;
12:
13: import wizard.helper.ResourceBundleManager;
14:
15: public class NavigationTree extends JTree {
16: Image image;
17:
18: public NavigationTree(TreeNode root) {
19: super (root);
20: image = ResourceBundleManager.getInstance().getImage(
21: "navigation.bgimg");
22: }
23:
24: public void paint(Graphics g) {
25: if (image != null) {
26: Dimension d = getSize();
27: for (int x = 0; x < d.width; x += image.getWidth(this ))
28: for (int y = 0; y < d.height; y += image
29: .getHeight(this))
30: g.drawImage(image, x, y, null, null);
31: }
32: super.paint(g);
33: }
34: }
|