sk.uniba.euromath.editor.textEditor.requests.caretRequests
Class MoveCaretRequest
java.lang.Object
org.eclipse.gef.Request
sk.uniba.euromath.editor.textEditor.requests.caretRequests.MoveCaretRequest
public class MoveCaretRequest
- extends org.eclipse.gef.Request
Used to move caret inside TextPieceKeeper or from one TextPieceKeeper to another
- Author:
- Martin Koll�r
20.11.2005
Methods inherited from class org.eclipse.gef.Request |
getExtendedData, getType, setExtendedData, setType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MoveCaretRequest
public MoveCaretRequest(String direction,
int count,
int keyCode,
TextEditPart oldPart,
TextEditPart newPart)
- Parameters:
direction
- in what direction we want to move Caret
(RequestConstants.LEFT[,RIGHT,UP,DOWN])count
- how many steps we want Caret to movekeyCode
- what KeyEvent.keyCode was pressedoldPart
- EditPart where the Caret was when we star the process of movingnewPart
- EditPart where the Caret will be moved
getCount
public int getCount()
- Returns:
- Returns the count.
setCount
public void setCount(int count)
- Parameters:
count
- The count to set.
getDirection
public String getDirection()
- Returns:
- Returns the direction - LEFT,RIGHT,UP,DOWN
getNewPart
public TextEditPart getNewPart()
- Returns:
- TextEditPart where Caret will be moved
setNewPart
public void setNewPart(TextEditPart newPart)
- Parameters:
newPart
- TextEditPart where the Caret will be moved
getOldPart
public TextEditPart getOldPart()
- Returns:
- TextEditPart where the Caret was active before moving
setOldPart
protected void setOldPart(TextEditPart oldPart)
getKeyCode
public int getKeyCode()
- Returns:
- KeyEvent.keyCode that was created when button pressed
Copyright © 2003-2006 null. All Rights Reserved.