|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.gef.Request sk.uniba.euromath.editor.textEditor.requests.editTextRequests.EditTextRequest sk.uniba.euromath.editor.textEditor.requests.editTextRequests.DeleteTextRequest
public final class DeleteTextRequest
Request to delete text from specified position of specified size. Position is specified by ITextPieceKeeper and offset. Size specifies deletion direction and length of text to delete. So effect is deletion of text from offset(include offset character) in ITextPieceKeeper to offset + size.
Nested Class Summary | |
---|---|
class |
DeleteTextRequest.DeleteInfo
For structure purpose only. |
Constructor Summary | |
---|---|
DeleteTextRequest(ITextPieceKeeper source,
int offset,
int size)
Constructor. |
|
DeleteTextRequest(ITextPieceKeeper source,
int offset,
int size,
List<DeleteTextRequest.DeleteInfo> structuredDeleteInfo)
Constructor. |
Method Summary | |
---|---|
int |
getOffset()
Returns position in text piece from where text should be deleted. |
int |
getSize()
Returns size - length of text to delete(absolute value of size) + deletion direction(signum of size). |
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. |
List<DeleteTextRequest.DeleteInfo> |
getStructuredDeleteInfo()
Returns holded structured delete info. |
void |
setOffset(int offset)
|
void |
setSize(int size)
|
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 |
---|
public DeleteTextRequest(ITextPieceKeeper source, int offset, int size)
source
- ITextPieceKeeper where was the deletion calledoffset
- offset in text piece(ITextPieceKeeper's text) from where text
should be deleted, must be valid (in range of text piece).
Character at this offset position is also deleted.size
- length of text to delete(absolute value of size) + deletion
direction(signum of size). Negative values are used to delete
text before offset and positive to delete text after offset.
Size can have any integer value(not bounded by text piece),
but text of that size must exist (bounded by text of whole
document), otherwise exception is thrown in process of
execution. NOT ZERO.public DeleteTextRequest(ITextPieceKeeper source, int offset, int size, List<DeleteTextRequest.DeleteInfo> structuredDeleteInfo)
source
- ITextPieceKeeper where was the deletion calledoffset
- offset in text piece(ITextPieceKeeper's text) from where text
should be deleted, must be valid (in range of text piece).
Character at this offset position is also deleted.size
- length of text to delete(absolute value of size) + deletion
direction(signum of size). Negative values are used to delete
text before offset and positive to delete text after offset.
Size can have any integer value(not bounded by text piece),
but text of that size must exist (bounded by text of whole
document), otherwise exception is thrown in process of
execution. NOT ZERO.structuredDeleteInfo
- Holds additional description what else should be deleted, but
in different format. Can be empty, but in taht case
should be used another contructor. Is used when transforming
standard DeteleTextRequest to structured DeteleTextRequest for
easy command creation and execution. DeleteInfo has big
difference in length vs size.Method Detail |
---|
public int getSize()
DeleteTextRequest(ITextPieceKeeper, int, int)
public int getOffset()
public List<DeleteTextRequest.DeleteInfo> getStructuredDeleteInfo()
public String getSpecialization()
IRequestSpecialization
getSpecialization
in interface IRequestSpecialization
public void setOffset(int offset)
offset
- the offset to setpublic void setSize(int size)
size
- the size to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |