Skip to content

Commit 00a7b1a

Browse files
hansonrhansonr
authored andcommitted
tooltip ui must check component listening
1 parent 59b7f5c commit 00a7b1a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSToolTipUI.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package swingjs.plaf;
22

33
import java.awt.Insets;
4+
import java.beans.PropertyChangeEvent;
45

56
import javax.swing.JComponent;
67
import javax.swing.JToolTip;
@@ -19,12 +20,23 @@ public JSToolTipUI() {
1920

2021
protected JToolTip toolTip;
2122

23+
24+
@Override
25+
public void propertyChange(PropertyChangeEvent e) {
26+
String prop = e.getPropertyName();
27+
if (prop == "component") {
28+
return;
29+
}
30+
super.propertyChangedCUI(e, prop);
31+
}
32+
2233
@Override
2334
protected void getIconAndText() {
2435
icon = null;
2536
iconNode = null; // not an Abstract Button
2637
gap = 0;
27-
text = toolTip.getTipText();
38+
text = toolTip.getTipText();
39+
2840
}
2941

3042
@Override

0 commit comments

Comments
 (0)