sk.uniba.euromath.editor.textEditor.requests.editTextRequests
Class InsertTextRequest

java.lang.Object
  extended by org.eclipse.gef.Request
      extended by sk.uniba.euromath.editor.textEditor.requests.editTextRequests.EditTextRequest
          extended by sk.uniba.euromath.editor.textEditor.requests.editTextRequests.InsertTextRequest
All Implemented Interfaces:
IRequestSpecialization

public class InsertTextRequest
extends EditTextRequest
implements IRequestSpecialization

Request to insert text at specified position and to move caret to right position. Position is specified by ITextPieceKeeper and offset.

Author:
Martin Kollar 17.11.2005

Constructor Summary
InsertTextRequest(ITextPieceKeeper keeper, String text, int offset)
          Constructor.
 
Method Summary
 int getOffset()
          Returns position in text piece where to insert text.
 String getSpecialization()
          Returns request specialization - unique string.
 String getText()
          Returns text to insert.
 
Methods inherited from class sk.uniba.euromath.editor.textEditor.requests.editTextRequests.EditTextRequest
getSource
 
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

InsertTextRequest

public InsertTextRequest(ITextPieceKeeper keeper,
                         String text,
                         int offset)
Constructor.

Parameters:
text - to insert
offset - offset in text piece(ITextPieceKeeper's text) from where text should be deleted, must be valid (in range of text piece)
keeper - ITextPieceKeeper where to insert text
Method Detail

getOffset

public int getOffset()
Returns position in text piece where to insert text.

Returns:
offset in text piece (ITextPieceKeeper's text)

getText

public String getText()
Returns text to insert.

Returns:
Returns the text.

getSpecialization

public String getSpecialization()
Description copied from interface: IRequestSpecialization
Returns request specialization - unique string.

Specified by:
getSpecialization in interface IRequestSpecialization
Returns:
request specialization string


Copyright © 2003-2006 null. All Rights Reserved.