|
org.netbeans.modules.editor.lib2/1 1.43.1 10 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.spi.editor.typinghooks.DeletedTextInterceptor.Context
public static final class DeletedTextInterceptor.Context
The context class providing information about the edited document, its editor pane and the offset where the delete key event occurred.
Method Summary | |
---|---|
JTextComponent |
getComponent()
Gets the editor component where the currently processed key typed event occurred. |
Document |
getDocument()
Gets the edited document. |
int |
getOffset()
Gets the removal offset. |
String |
getText()
Gets the text being removed. |
boolean |
isBackwardDelete()
Determines the type of the character removal action performed by a user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public JTextComponent getComponent()
Document
.public Document getDocument()
public int getOffset()
KeyEvent
happened). This is also the offset with text, which will be removed.
public boolean isBackwardDelete()
In other words one delete action removes characters backwards moving the caret towards the beginning if a document and the other action leaves the caret at the same position and removes characters towards the end of the document.
true
if the interceptor is called to handle the
backspace action. false
if the handled action is the
delete action.public String getText()
beforeRemove
method this
text is still present in the document, while in the other methods this
text has already been removed from the document. Nevertheless this method
always returns a copy of the text.
|
org.netbeans.modules.editor.lib2/1 1.43.1 10 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |