Convenience method for getSelectedText orElse getCurrentTextLine
.
The peer swing component which can be added to the parent swing container.
The text on the current line, or None
if the document is empty or unavailable.
The currently selected text, or None
if no selection has been made.