public abstract class TextInputControlBehavior<T extends TextInputControl> extends BehaviorBase<T>
Modifier and Type | Field and Description |
---|---|
protected static List<KeyBinding> |
TEXT_INPUT_BINDINGS
Setup KeyBindings *
|
IS_TOUCH_SUPPORTED, TRAVERSAL_BINDINGS
Constructor and Description |
---|
TextInputControlBehavior(T textInputControl,
List<KeyBinding> bindings)
Create a new TextInputControlBehavior.
|
Modifier and Type | Method and Description |
---|---|
void |
callAction(String name)
Called to invoke the action associated with the given name.
|
protected void |
callActionForEvent(KeyEvent e)
Records the last KeyEvent we saw.
|
protected void |
cancelEdit(KeyEvent event) |
protected abstract void |
deleteChar(boolean previous)
Abstract methods *
|
protected abstract void |
deleteFromLineStart() |
protected void |
deleteNextWord() |
protected void |
deletePreviousWord() |
void |
dispose()
Disposal methods *
|
protected void |
fire(KeyEvent event) |
protected void |
forwardToParent(KeyEvent event) |
boolean |
isEditing() |
protected boolean |
isMixed() |
protected boolean |
isRTLText() |
protected void |
nextWord() |
protected void |
previousWord() |
protected abstract void |
replaceText(int start,
int end,
String txt) |
protected void |
scrollCharacterToVisible(int index) |
protected void |
selectNextWord() |
protected void |
selectPreviousWord() |
protected void |
selectWord() |
protected abstract void |
setCaretAnimating(boolean play) |
protected void |
setEditing(boolean b) |
contextMenuRequested, focusChanged, getControl, matchActionForEvent, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, traverse, traverseDown, traverseLeft, traverseNext, traversePrevious, traverseRight, traverseUp
protected static final List<KeyBinding> TEXT_INPUT_BINDINGS
public TextInputControlBehavior(T textInputControl, List<KeyBinding> bindings)
textInputControl
- cannot be nullpublic void dispose()
dispose
in class BehaviorBase<T extends TextInputControl>
protected abstract void deleteChar(boolean previous)
protected abstract void replaceText(int start, int end, String txt)
protected abstract void setCaretAnimating(boolean play)
protected abstract void deleteFromLineStart()
protected void scrollCharacterToVisible(int index)
protected void callActionForEvent(KeyEvent e)
callActionForEvent
in class BehaviorBase<T extends TextInputControl>
e
- public void callAction(String name)
BehaviorBase
When a KeyEvent is handled, it is first passed through callActionForEvent which resolves which "action" should be executed based on the key event. This action is indicated by name. This name is then passed to this function which is responsible for invoking the right function based on the name.
callAction
in class BehaviorBase<T extends TextInputControl>
protected boolean isMixed()
protected boolean isRTLText()
protected void deletePreviousWord()
protected void deleteNextWord()
protected void selectPreviousWord()
protected void selectNextWord()
protected void selectWord()
protected void previousWord()
protected void nextWord()
protected void fire(KeyEvent event)
protected void cancelEdit(KeyEvent event)
protected void forwardToParent(KeyEvent event)
protected void setEditing(boolean b)
public boolean isEditing()
Copyright © 2020. All rights reserved.