Package org.fife.ui.rsyntaxtextarea
Class SelectRegionLinkGeneratorResult
java.lang.Object
org.fife.ui.rsyntaxtextarea.SelectRegionLinkGeneratorResult
- All Implemented Interfaces:
LinkGeneratorResult
A link generator result that selects a region of text in the text area.
This will typically be used by IDE-style applications, to provide support
for "linking" the use of a variable in a document to its declaration.
- Version:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSelectRegionLinkGeneratorResult
(RSyntaxTextArea textArea, int sourceOffset, int selStart, int selEnd) -
Method Summary
Modifier and TypeMethodDescriptionexecute()
Selects the text in the text area.int
Returns the starting offset of the link specified by the parentLinkGenerator
.
-
Field Details
-
textArea
-
sourceOffset
private int sourceOffset -
selStart
private int selStart -
selEnd
private int selEnd
-
-
Constructor Details
-
SelectRegionLinkGeneratorResult
public SelectRegionLinkGeneratorResult(RSyntaxTextArea textArea, int sourceOffset, int selStart, int selEnd)
-
-
Method Details
-
execute
Selects the text in the text area.- Specified by:
execute
in interfaceLinkGeneratorResult
- 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
public int getSourceOffset()Description copied from interface:LinkGeneratorResult
Returns the starting offset of the link specified by the parentLinkGenerator
.- Specified by:
getSourceOffset
in interfaceLinkGeneratorResult
- Returns:
- The offset.
-