|
||||||||||
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 (including).
Constructor Summary | |
---|---|
DeleteTextRequest(ITextPieceKeeper source,
int offset,
int length,
Direction direction)
Constructor. |
Method Summary | |
---|---|
Direction |
getDirection()
|
int |
getLength()
Returns length of text to delete. |
int |
getOffset()
Returns position in text piece from where text should be deleted. |
String |
getSpecialization()
Returns request specialization - unique string. |
void |
setLength(int length)
|
void |
setOffset(int offset)
|
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 |
---|
public DeleteTextRequest(ITextPieceKeeper source, int offset, int length, Direction direction)
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)
Length can have any positive value(not bounded by
text piece), but text at that length must exists (bounded
by text of whole document), otherwise exception
is thrown in process of execution. NOT ZERO.direction
- of deletion, one of Direction.Left
,
Direction.Right
Method Detail |
---|
public int getLength()
public int getOffset()
public Direction getDirection()
public String getSpecialization()
IRequestSpecialization
getSpecialization
in interface IRequestSpecialization
public void setOffset(int offset)
offset
- the offset to setpublic void setLength(int length)
length
- the length to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |