Bonjour je cherche a faire apparaitre un tooltip sur un treeNode


voici la class dont j'ai supprimer le code non utilie.

J'ai mis une méthode getToolTipText qui retourne le text a mettre dans la bulle.
Mais rien y fait ca ne marche pas.

Quelqu'un peut m'aider????

Merci d'avance


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
public class OutputPropertyTableTreeNode extends TreeNode implements ITableTreeNode {
 
    private static Image warningImg = JFaceUtilities.createImage("icons/obj16/warning.gif");
 
    private static Image errorImg = JFaceUtilities.createImage("icons/obj16/hprio_tsk.gif");
 
    private String toolTipMsg;
 
    private String toolTipMsgType;
 
    private final OutputProperty property;
 
    private ExtSimulatorIOEditorPart part;
 
    private int sizeGridFromEdo;
 
    public OutputPropertyTableTreeNode(OutputProperty p, ExtSimulatorIOEditorPart part) {
        property = p;
        this.part = part;
    }
 
    public Image getColumnImage(Object element, int index) {
 
                    if (propertyName.equals("*")) {
                        toolTipMsgType = "Warning";
                        toolTipMsg = "  Properties really resolved by run depend on\n"
                                + "  configuration files of simulator.\n\n"
                                + "  Perhaps some study properties are not defined in \n"
                                + "  these files & won't be calculed by simulator run. ";
                        return warningImg;
 
                }
            }
 
        return null;
    }
 
    public String getColumnText(Object element, int index) {
        String s = "";
        switch (index) {
            case 0:
                s = property.getObjectType();
                break;
            case 1:
                s = property.getObjectName();
                break;
            case 2:
                s = property.getPropertyName();
                break;
            case 3:
                s = property.getAssociatedObjectName();
                break;
            case 4:
                s = property.getAssociatedPropertyLabel();
                break;
            default:
                break;
        }
        return s;
    }
 
    public Image getImage() {
        return null;
    }
 
    public String getLabel() {
        return null;
    }
 
    @Override
    public Object getAdapter(Class adapter) {
        if (adapter == OutputProperty.class) {
            return property;
        }
        return super.getAdapter(adapter);
    }
 
    @Override
    public String getToolTipText() {
        return toolTipMsg;
    }
 
 
 
 
 
 
...
}