public String getSelectedText()
	{
		if (!selectingText)
			return "";

		int start = Math.min(selectionCursor.index, cursor.index);
		int end = Math.max(selectionCursor.index, cursor.index);

		return this.text.substring(start, end);
	}
public String getSelectedText ( ) { if ( ! selectingText ) return "" ; int start = Math . min ( selectionCursor . index , cursor . index ) ; int end = Math . max ( selectionCursor . index , cursor . index ) ; return this . text . substring ( start , end ) ; }
Gets the currently selected text.

@return the text selected.