org.nakedobjects.plugins.dnd.viewer.view.text
Class TextSelection

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.view.text.TextSelection

public class TextSelection
extends java.lang.Object


Constructor Summary
TextSelection(TextContent content)
           
 
Method Summary
 void extendTo(CursorPosition pos)
           
 void extendTo(Location at)
          extends the selection so the end point is the same as the cursor.
 CursorPosition from()
           
 boolean hasSelection()
          returns true is a selection exists - if the start and end locations are not the same
 void resetTo(CursorPosition pos)
          clears the selection so nothing is selected.
 void selectSentence()
           
 void selectWord()
          set the selection to be for the word marked by the current cursor
 CursorPosition to()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextSelection

public TextSelection(TextContent content)
Method Detail

extendTo

public void extendTo(CursorPosition pos)

extendTo

public void extendTo(Location at)
extends the selection so the end point is the same as the cursor.


from

public CursorPosition from()

hasSelection

public boolean hasSelection()
returns true is a selection exists - if the start and end locations are not the same


resetTo

public void resetTo(CursorPosition pos)
clears the selection so nothing is selected. The start and end points are set to the same values as the cursor.


selectSentence

public void selectSentence()

selectWord

public void selectWord()
set the selection to be for the word marked by the current cursor


to

public CursorPosition to()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.