sk.uniba.euromath.editor.textEditor.requests.caretRequests
Class MoveCaretRequest

java.lang.Object
  extended by org.eclipse.gef.Request
      extended by 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

Constructor Summary
MoveCaretRequest(String direction, int count, int keyCode, TextEditPart oldPart, TextEditPart newPart)
           
 
Method Summary
 int getCount()
           
 String getDirection()
           
 int getKeyCode()
           
 TextEditPart getNewPart()
           
 TextEditPart getOldPart()
           
 void setCount(int count)
           
 void setNewPart(TextEditPart newPart)
           
protected  void setOldPart(TextEditPart oldPart)
           
 
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
 

Constructor Detail

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 move
keyCode - what KeyEvent.keyCode was pressed
oldPart - EditPart where the Caret was when we star the process of moving
newPart - EditPart where the Caret will be moved
Method Detail

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.