|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.plugins.dnd.viewer.view.text.CursorPosition
public class CursorPosition
Represents the position of a line cursor within a TextContent. The character position for a line extends from zero to text.length + 1. Where 0 means the cursor is to the left of the first character, and 1 is to right of the first character and to the left of the second character.
| Constructor Summary | |
|---|---|
CursorPosition(TextContent content,
CursorPosition pos)
|
|
CursorPosition(TextContent content,
int line,
int afterCharacter)
|
|
| Method Summary | |
|---|---|
void |
asFor(CursorPosition pos)
|
void |
bottom()
Move the cursor to the bottom-right of the field |
void |
cursorAt(Location atLocation)
|
void |
end()
Move the cursor to the end of the line |
int |
getCharacter()
|
int |
getLine()
|
void |
home()
Move the cursor to the left end of the field |
boolean |
isBefore(CursorPosition positionToCompare)
|
void |
left()
Movet the cursor left by one character. |
void |
lineDown()
Move down one line. |
void |
lineUp()
Move up one line. |
void |
pageDown()
Move down one page. |
void |
pageUp()
Move cursor up by a page |
void |
right()
Move the cursor right by one character. |
void |
right(int characters)
Move the cursor right by one character. |
boolean |
samePosition(CursorPosition positionToCompare)
|
void |
top()
Move the cursor to the top-left of the field |
java.lang.String |
toString()
|
void |
wordLeft()
Move the cursor left to the beginning of the previous word. |
void |
wordRight()
Move the cursor right to the end of the current word. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CursorPosition(TextContent content,
CursorPosition pos)
public CursorPosition(TextContent content,
int line,
int afterCharacter)
| Method Detail |
|---|
public void asFor(CursorPosition pos)
public void bottom()
public void cursorAt(Location atLocation)
public void end()
public int getCharacter()
public int getLine()
public void home()
public void left()
public void lineDown()
public void lineUp()
public void pageDown()
public void pageUp()
public void right()
public void right(int characters)
public void top()
public java.lang.String toString()
toString in class java.lang.Objectpublic void wordLeft()
public void wordRight()
public boolean samePosition(CursorPosition positionToCompare)
public boolean isBefore(CursorPosition positionToCompare)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||