Package org.fife.ui.rsyntaxtextarea
Class SelectRegionLinkGeneratorResult
- java.lang.Object
-
- org.fife.ui.rsyntaxtextarea.SelectRegionLinkGeneratorResult
-
- All Implemented Interfaces:
LinkGeneratorResult
public class SelectRegionLinkGeneratorResult extends java.lang.Object implements 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:
LinkGenerator
-
-
Field Summary
Fields Modifier and Type Field Description private intselEndprivate intselStartprivate intsourceOffsetprivate RSyntaxTextAreatextArea
-
Constructor Summary
Constructors Constructor Description SelectRegionLinkGeneratorResult(RSyntaxTextArea textArea, int sourceOffset, int selStart, int selEnd)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.swing.event.HyperlinkEventexecute()Selects the text in the text area.intgetSourceOffset()Returns the starting offset of the link specified by the parentLinkGenerator.
-
-
-
Field Detail
-
textArea
private RSyntaxTextArea textArea
-
sourceOffset
private int sourceOffset
-
selStart
private int selStart
-
selEnd
private int selEnd
-
-
Constructor Detail
-
SelectRegionLinkGeneratorResult
public SelectRegionLinkGeneratorResult(RSyntaxTextArea textArea, int sourceOffset, int selStart, int selEnd)
-
-
Method Detail
-
execute
public javax.swing.event.HyperlinkEvent execute()
Selects the text in the text area.- Specified by:
executein interfaceLinkGeneratorResult- Returns:
- The hyperlink event to broadcast from the text area, or
nullif the action's behavior occurs in this method directly. If a hyperlink event is returned, it should have typeHyperlinkEvent.EventType#ACTIVATEDto denote the fact that the link was clicked.
-
getSourceOffset
public int getSourceOffset()
Description copied from interface:LinkGeneratorResultReturns the starting offset of the link specified by the parentLinkGenerator.- Specified by:
getSourceOffsetin interfaceLinkGeneratorResult- Returns:
- The offset.
-
-