Package org.fife.ui.rsyntaxtextarea
Interface LinkGenerator
-
public interface LinkGenerator
Generates hyperlinks in a document. If one of these is installed on anRSyntaxTextArea
it is queried when the mouse is moved and hyperlinks are enabled. If the user is not hovering over a "real" hyperlink (e.g. "http://www.google.com"), the link generator is asked if a text region at the mouse position should be considered a hyperlink. If so, a result object is returned, describing exactly what region of text is the link, and where it goes to.This interface is typically used by applications providing advanced support for programming languages, such as IDEs. For example, an implementation of this class could identify the token under the mouse position as a "variable," and the hyperlink returned would select the variable's declaration in the document.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LinkGeneratorResult
isLinkAtOffset(RSyntaxTextArea textArea, int offs)
If a region of text under the mouse position should be considered a hyperlink, a result object is returned.
-
-
-
Method Detail
-
isLinkAtOffset
LinkGeneratorResult isLinkAtOffset(RSyntaxTextArea textArea, int offs)
If a region of text under the mouse position should be considered a hyperlink, a result object is returned. This object describes what region of text is the link, and what action to perform if the link is clicked.- Parameters:
textArea
- The text component.offs
- The offset in the document under the mouse position.- Returns:
- The link information, or
null
if no link is at the specified offset.
-
-