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. Position is specified by ITextPieceKeeper and offset.

Author:
Martin Kollar 17.11.2005

Constructor Summary
InsertTextRequest(ITextPieceKeeper source, String text, int offset)
          Constructor.
 
Method Summary
 int getOffset()
          Returns position in text piece where to insert text.
 String getSpecialization()
          TODO Kollar ocakavam navrhy na zmenu mena tejto metody, ale getAction sa mi zda byt metuce, lebo od getAction() by som cakal ze vrati nejaku akciu.
 String getText()
          Returns text to insert.
 
Methods inherited from class sk.uniba.euromath.editor.textEditor.requests.editTextRequests.EditTextRequest
getDestination, getSource, setDestination
 
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 source,
                         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)
source - 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
TODO Kollar ocakavam navrhy na zmenu mena tejto metody, ale getAction sa mi zda byt metuce, lebo od getAction() by som cakal ze vrati nejaku akciu. Ak suhlasis s menom tejto metody, staci ze zmazes toto TODO Return request specialization unique string.

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


Copyright © 2003-2006 null. All Rights Reserved.