1
2
3
4
5
6
7 package com.vikash.firsttool.ProfileImpl;
8
9 import javax.swing.tree.*;
10 import org.jgraph.graph.DefaultGraphCell;
11 import org.jgraph.graph.GraphConstants;
12
13
14 /***
15 *
16 * @author studajb
17 */
18 public class IconGraphCell extends DefaultGraphCell{
19
20 /*** Creates a new instance of IconGraphCell */
21 public IconGraphCell() {
22 this(null);
23 }
24
25 public IconGraphCell(Object object) {
26 super(object);
27 }
28
29
30
31 public String toString() {
32 if (userObject == null) {
33 Object[] labels=GraphConstants.getExtraLabels(this.getAttributes());
34 Object cellname=String.valueOf(labels[0]);
35
36
37
38
39
40
41 return ("New"+cellname.toString());
42
43
44 }
45 else {
46 return userObject.toString();
47 }
48
49 }
50 }