File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
app/src/processing/app/syntax Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 17
17
import javax .swing .text .*;
18
18
import javax .swing .undo .*;
19
19
import javax .swing .*;
20
+
20
21
import java .awt .datatransfer .*;
21
22
import java .awt .event .*;
22
23
import java .awt .*;
@@ -2025,7 +2026,19 @@ public void mouseDragged(MouseEvent evt)
2025
2026
select (getMarkPosition (),xyToOffset (evt .getX (),evt .getY ()));
2026
2027
}
2027
2028
2028
- public void mouseMoved (MouseEvent evt ) {}
2029
+ final Cursor normalCursor = new Cursor (Cursor .DEFAULT_CURSOR );
2030
+ final Cursor handCursor = new Cursor (Cursor .HAND_CURSOR );
2031
+
2032
+ public void mouseMoved (MouseEvent evt ) {
2033
+ int line = yToLine (evt .getY ());
2034
+ int offset = xToOffset (line , evt .getX ());
2035
+ boolean wantHandCursor = checkClickedURL (getLineText (line ), offset ) != null ;
2036
+ JComponent src = (JComponent ) evt .getSource ();
2037
+ if (wantHandCursor )
2038
+ src .setCursor (handCursor );
2039
+ else
2040
+ src .setCursor (normalCursor );
2041
+ }
2029
2042
}
2030
2043
2031
2044
class FocusHandler implements FocusListener
You can’t perform that action at this time.
0 commit comments