Package org.fife.ui.rsyntaxtextarea
Interface LinkGeneratorResult
- All Known Implementing Classes:
SelectRegionLinkGeneratorResult
public interface LinkGeneratorResult
A result object from a
LinkGenerator
. Implementations of this class
specify what action to execute when the user clicks on the "link" specified
by the LinkGenerator
. Typically, this will do something like
select another region of text in the document (the declaration of the
variable at the mouse position), or open another file in the parent
application, etc.- Version:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionexecute()
Executes the action associated with this object.int
Returns the starting offset of the link specified by the parentLinkGenerator
.
-
Method Details
-
execute
HyperlinkEvent execute()Executes the action associated with this object. This method is called when the user clicks on the hyperlinked range of text in the editor.If the result is a URL to open, a standard hyperlink event can be returned. Alternatively,
null
can be returned and the action performed in this method itself.- Returns:
- The hyperlink event to broadcast from the text area, or
null
if the action's behavior occurs in this method directly. If a hyperlink event is returned, it should have typeHyperlinkEvent.EventType#ACTIVATED
to denote the fact that the link was clicked.
-
getSourceOffset
int getSourceOffset()Returns the starting offset of the link specified by the parentLinkGenerator
.- Returns:
- The offset.
-