public static final class CamelCaseInterceptor.MutableContext extends Object
Modifier and Type | Method and Description |
---|---|
JTextComponent |
getComponent()
Gets the editor component where the currently processed key typed event
occurred.
|
Document |
getDocument()
Gets the edited document.
|
int |
getOffset()
Gets the offset.
|
boolean |
isBackward()
Determines the type of the direction performed by a user.
|
void |
setNextWordOffset(int nextWordOffset)
Sets the new offset after remove or jump.
|
public JTextComponent getComponent()
Document
.public Document getDocument()
public int getOffset()
KeyEvent
happened). This is also the offset with text, which will be removed or jumped.public boolean isBackward()
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 void setNextWordOffset(int nextWordOffset)
nextWordOffset
- == -1 if default implementation should process otherwise nextWordOffset is used to jump/delete