26 package org.nexusformat.nxvalidate;
28 import java.awt.Component;
29 import java.util.ResourceBundle;
30 import javax.swing.Icon;
31 import javax.swing.ImageIcon;
32 import javax.swing.JTree;
33 import javax.swing.plaf.basic.BasicTreeUI;
34 import javax.swing.tree.DefaultTreeCellRenderer;
45 private String badPath =
"";
46 private String goodPath =
"";
47 private String warnPath =
"";
48 private String rootPath =
"";
49 private String newPath =
"";
50 private String infoPath =
"";
51 private String infoGoodPath =
"";
52 private String infoBadPath =
"";
53 private String infoWarnPath =
"";
55 private ResourceBundle bundle = null;
56 private JTree tree = null;
62 String goodPath, String warnPath,
63 String newPath, String infoPath,
64 String infoGoodPath, String infoBadPath,
65 String infoWarnPath) {
66 this.badPath = badPath;
67 this.goodPath = goodPath;
68 this.warnPath = warnPath;
69 this.rootPath = rootPath;
70 this.newPath = newPath;
71 this.infoPath = infoPath;
72 this.infoGoodPath = infoGoodPath;
73 this.infoBadPath = infoBadPath;
74 this.infoWarnPath = infoWarnPath;
75 bundle = ResourceBundle.getBundle(
76 "org/nexusformat/nxvalidate/resources/nxvalidate");
89 super.getTreeCellRendererComponent(
94 boolean validated =
false;
127 else if (node.isRoot()){
157 if (tree.getUI() instanceof BasicTreeUI) {
171 if (tree.getUI() instanceof BasicTreeUI) {
178 String description) {
179 java.net.URL imgURL = getClass().getResource(path);
180 if (imgURL != null) {
181 return new ImageIcon(imgURL, description);
183 System.err.println(
"Couldn't find file: " + path);