mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Merge remote-tracking branch 'cmaglie/new-extension' into new-extension
This commit is contained in:
commit
eff37540db
@ -17,6 +17,7 @@ import javax.swing.event.*;
|
||||
import javax.swing.text.*;
|
||||
import javax.swing.undo.*;
|
||||
import javax.swing.*;
|
||||
|
||||
import java.awt.datatransfer.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.*;
|
||||
@ -2025,7 +2026,19 @@ public class JEditTextArea extends JComponent
|
||||
select(getMarkPosition(),xyToOffset(evt.getX(),evt.getY()));
|
||||
}
|
||||
|
||||
public void mouseMoved(MouseEvent evt) {}
|
||||
final Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);
|
||||
final Cursor handCursor = new Cursor(Cursor.HAND_CURSOR);
|
||||
|
||||
public void mouseMoved(MouseEvent evt) {
|
||||
int line = yToLine(evt.getY());
|
||||
int offset = xToOffset(line, evt.getX());
|
||||
boolean wantHandCursor = checkClickedURL(getLineText(line), offset) != null;
|
||||
JComponent src = (JComponent) evt.getSource();
|
||||
if (wantHandCursor)
|
||||
src.setCursor(handCursor);
|
||||
else
|
||||
src.setCursor(normalCursor);
|
||||
}
|
||||
}
|
||||
|
||||
class FocusHandler implements FocusListener
|
||||
|
Loading…
Reference in New Issue
Block a user