|
@@ -74,9 +74,12 @@ public class WrapEditorKit extends StyledEditorKit implements MouseListener,
|
74
|
74
|
return;
|
75
|
75
|
}
|
76
|
76
|
if (!editorPane.isEditable()) {
|
77
|
|
- Object target = characterElementAt(e).getAttributes().getAttribute(
|
78
|
|
- IRCTextAttribute.HYPERLINK);
|
79
|
|
- if (target != null) {
|
|
77
|
+ if (characterElementAt(e).getAttributes().getAttribute(
|
|
78
|
+ IRCTextAttribute.HYPERLINK) != null
|
|
79
|
+ || characterElementAt(e).getAttributes().getAttribute(
|
|
80
|
+ IRCTextAttribute.CHANNEL) != null
|
|
81
|
+ || characterElementAt(e).getAttributes().getAttribute(
|
|
82
|
+ IRCTextAttribute.NICKNAME) != null) {
|
80
|
83
|
editorPane.setCursor(HAND_CURSOR);
|
81
|
84
|
return;
|
82
|
85
|
}
|
|
@@ -102,6 +105,20 @@ public class WrapEditorKit extends StyledEditorKit implements MouseListener,
|
102
|
105
|
HyperlinkEvent.EventType.ACTIVATED, null,
|
103
|
106
|
(String) target));
|
104
|
107
|
}
|
|
108
|
+ target = characterElementAt(e).getAttributes().getAttribute(
|
|
109
|
+ IRCTextAttribute.CHANNEL);
|
|
110
|
+ if (target != null) {
|
|
111
|
+ editorPane.fireHyperlinkUpdate(new HyperlinkEvent(editorPane,
|
|
112
|
+ HyperlinkEvent.EventType.ACTIVATED, null,
|
|
113
|
+ (String) target));
|
|
114
|
+ }
|
|
115
|
+ target = characterElementAt(e).getAttributes().getAttribute(
|
|
116
|
+ IRCTextAttribute.NICKNAME);
|
|
117
|
+ if (target != null) {
|
|
118
|
+ editorPane.fireHyperlinkUpdate(new HyperlinkEvent(editorPane,
|
|
119
|
+ HyperlinkEvent.EventType.ACTIVATED, null,
|
|
120
|
+ (String) target));
|
|
121
|
+ }
|
105
|
122
|
}
|
106
|
123
|
}
|
107
|
124
|
|