File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/main/java/com/airsaid/localization/ui Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 22
33import com .intellij .icons .AllIcons ;
44import com .intellij .ui .components .labels .LinkLabel ;
5+ import jdk .javadoc .internal .doclets .toolkit .util .DocLink ;
56
67import java .awt .event .MouseAdapter ;
78import java .awt .event .MouseEvent ;
89
910/**
11+ * Fixed the problem that sometimes click does not respond.
12+ *
1013 * @author airsaid
1114 */
1215public class FixedLinkLabel extends LinkLabel <Object > {
16+ private boolean isDoClick = false ;
17+
1318 public FixedLinkLabel () {
1419 super ("" , AllIcons .Ide .Link );
1520 addMouseListener (new MouseAdapter () {
@@ -19,6 +24,19 @@ public void mouseReleased(MouseEvent e) {
1924 doClick ();
2025 }
2126 }
27+
28+ @ Override
29+ public void mouseExited (MouseEvent e ) {
30+ isDoClick = false ;
31+ }
2232 });
2333 }
34+
35+ @ Override
36+ public void doClick () {
37+ if (!isDoClick ) {
38+ isDoClick = true ;
39+ super .doClick ();
40+ }
41+ }
2442}
You can’t perform that action at this time.
0 commit comments