Top Description Inners Fields Constructors Methods
com.sun.javafx.scene.control.behavior

public abstract Class TextInputControlBehavior<T extends TextInputControl>

extends BehaviorBase<T extends TextInputControl>
Class Inheritance
Known Direct Subclasses
com.sun.javafx.scene.control.behavior.TextAreaBehavior, com.sun.javafx.scene.control.behavior.TextFieldBehavior
Imports
com.sun.javafx.PlatformUtil, com.sun.javafx.application.PlatformImpl, com.sun.javafx.scene.control.Properties, com.sun.javafx.scene.control.skin.FXVK, javafx.event.ActionEvent, .Event, .EventHandler, javafx.scene.control.skin.TextInputControlSkin, javafx.application.ConditionalFeature, javafx.beans.InvalidationListener, javafx.collections.ObservableList, javafx.geometry.NodeOrientation, javafx.scene.control.ContextMenu, .IndexRange, .MenuItem, .PasswordField, .SeparatorMenuItem, .TextInputControl, javafx.scene.input.ContextMenuEvent, .Clipboard, .KeyCode, .KeyEvent, .MouseEvent, com.sun.javafx.scene.control.inputmap.InputMap, .InputMap.Mapping, .KeyBinding, java.text.Bidi, java.util.function.Predicate

All of the "button" types (CheckBox, RadioButton, ToggleButton, and Button) and also maybe some other types like hyperlinks operate on the "armed" selection strategy, just like JButton. This behavior class encapsulates that logic in a way that can be reused and extended by each of the individual class behaviors.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private Bidi
protected ContextMenu
private final MenuItem
private final MenuItem
private final MenuItem
public static final String
private boolean
private final InputMap<T>
private Boolean
private final MenuItem
private final MenuItem
private Boolean
private final MenuItem
private final MenuItem
private final MenuItem
pack-priv static final boolean
SHOW_HANDLES

Specifies whether we ought to show handles.

pack-priv final T
private InvalidationListener
private final MenuItem

Constructor Summary

AccessConstructor and Description
public
TextInputControlBehavior(T c)

* Constructors * *

Method Summary

Modifier and TypeMethod and Description
protected void
addKeyPadMappings(InputMap<T> map)

Bind keypad arrow keys to the same as the regular arrow keys.

protected void
protected abstract void
public void
cut()

private void
defaultKeyTyped(KeyEvent
not null
event
)

The default handler for a key typed event, which is called when none of the other key bindings match.

protected abstract void
deleteChar(boolean previous)

Abstract methods *

protected abstract void
private void
protected void
private void
protected void
public void
public void
protected void
fire(KeyEvent event)

private Bidi
public InputMap<T>
pack-priv Bidi
private void
public boolean
protected boolean
protected boolean
protected InputMap.KeyMapping
keyMapping(final KeyCode keyCode, final EventHandler<KeyEvent> eventHandler)

protected InputMap.KeyMapping
keyMapping(KeyBinding keyBinding, final EventHandler<KeyEvent> eventHandler)

protected InputMap.KeyMapping
private void
protected abstract void
protected abstract void
protected abstract void
private void
nextCharacterVisually(boolean moveRight)

protected void
public void
protected void
protected void
public void
redo()

protected abstract void
replaceText(int start, int end, String txt)

private void
protected void
protected void
protected void
protected void
protected void
private void
private void
public void
protected void
private void
private void
protected void
protected abstract void
setCaretAnimating(boolean play)

protected void
setEditing(boolean b)

public void
undo()

Inherited from com.sun.javafx.scene.control.behavior.BehaviorBase:
addDefaultChildMapaddDefaultMappingaddDefaultMappingaddDefaultMappingcreateInputMapgetNodeisRTLremoveMappingrtlrtl

Field Detail

bidiback to summary
private Bidi bidi
contextMenuback to summary
protected ContextMenu contextMenu
copyMIback to summary
private final MenuItem copyMI
cutMIback to summary
private final MenuItem cutMI
deleteMIback to summary
private final MenuItem deleteMI
DISABLE_FORWARD_TO_PARENTback to summary
public static final String DISABLE_FORWARD_TO_PARENT
editingback to summary
private boolean editing
inputMapback to summary
private final InputMap<T> inputMap
mixedback to summary
private Boolean mixed
pasteMIback to summary
private final MenuItem pasteMI
redoMIback to summary
private final MenuItem redoMI
rtlTextback to summary
private Boolean rtlText
selectAllMIback to summary
private final MenuItem selectAllMI
selectWordMIback to summary
private final MenuItem selectWordMI
separatorMIback to summary
private final MenuItem separatorMI
SHOW_HANDLESback to summary
pack-priv static final boolean SHOW_HANDLES

Specifies whether we ought to show handles. We should do it on touch platforms

textInputControlback to summary
pack-priv final T textInputControl

Fields *

textListenerback to summary
private InvalidationListener textListener
undoMIback to summary
private final MenuItem undoMI

Constructor Detail

TextInputControlBehaviorback to summary
public TextInputControlBehavior(T c)

* Constructors * *

Method Detail

addKeyPadMappingsback to summary
protected void addKeyPadMappings(InputMap<T> map)

Bind keypad arrow keys to the same as the regular arrow keys.

cancelEditback to summary
protected void cancelEdit(KeyEvent event)
contextMenuRequestedback to summary
protected abstract void contextMenuRequested(ContextMenuEvent e)
cutback to summary
public void cut()
defaultKeyTypedback to summary
private void defaultKeyTyped(KeyEvent event)

The default handler for a key typed event, which is called when none of the other key bindings match. This is the method which handles basic text entry.

Parameters
event:KeyEvent

not null

deleteCharback to summary
protected abstract void deleteChar(boolean previous)

Abstract methods *

deleteFromLineStartback to summary
protected abstract void deleteFromLineStart()
deleteNextCharback to summary
private void deleteNextChar()
deleteNextWordback to summary
protected void deleteNextWord()
deletePreviousCharback to summary
private void deletePreviousChar()
deletePreviousWordback to summary
protected void deletePreviousWord()
deleteSelectionback to summary
public void deleteSelection()
disposeback to summary
public void dispose()

Overrides com.sun.javafx.scene.control.behavior.BehaviorBase.dispose.

Disposal methods *

Annotations
@Override
fireback to summary
protected void fire(KeyEvent event)
getBidiback to summary
private Bidi getBidi()
getInputMapback to summary
public InputMap<T> getInputMap()

Implements abstract com.sun.javafx.scene.control.behavior.BehaviorBase.getInputMap.

Annotations
@Override
getRawBidiback to summary
pack-priv Bidi getRawBidi()
invalidateBidiback to summary
private void invalidateBidi()
isEditingback to summary
public boolean isEditing()
isMixedback to summary
protected boolean isMixed()
isRTLTextback to summary
protected boolean isRTLText()
keyMappingback to summary
protected InputMap.KeyMapping keyMapping(final KeyCode keyCode, final EventHandler<KeyEvent> eventHandler)
keyMappingback to summary
protected InputMap.KeyMapping keyMapping(KeyBinding keyBinding, final EventHandler<KeyEvent> eventHandler)
keyMappingback to summary
protected InputMap.KeyMapping keyMapping(KeyBinding k, final EventHandler<KeyEvent> h, Predicate<KeyEvent> interceptor)
leftWordback to summary
private void leftWord()
mouseDraggedback to summary
protected abstract void mouseDragged(MouseEvent e)
mousePressedback to summary
protected abstract void mousePressed(MouseEvent e)
mouseReleasedback to summary
protected abstract void mouseReleased(MouseEvent e)
nextCharacterVisuallyback to summary
private void nextCharacterVisually(boolean moveRight)
nextWordback to summary
protected void nextWord()
pasteback to summary
public void paste()
populateContextMenuback to summary
protected void populateContextMenu()
previousWordback to summary
protected void previousWord()
redoback to summary
public void redo()
replaceTextback to summary
protected abstract void replaceText(int start, int end, String txt)
rightWordback to summary
private void rightWord()
selectAllback to summary
protected void selectAll()
selectEndback to summary
protected void selectEnd()
selectEndExtendback to summary
protected void selectEndExtend()
selectHomeback to summary
protected void selectHome()
selectHomeExtendback to summary
protected void selectHomeExtend()
selectLeftback to summary
private void selectLeft()
selectLeftWordback to summary
private void selectLeftWord()
selectNextWordback to summary
public void selectNextWord()
selectPreviousWordback to summary
protected void selectPreviousWord()
selectRightback to summary
private void selectRight()
selectRightWordback to summary
private void selectRightWord()
selectWordback to summary
protected void selectWord()
setCaretAnimatingback to summary
protected abstract void setCaretAnimating(boolean play)
setEditingback to summary
protected void setEditing(boolean b)
undoback to summary
public void undo()
com.sun.javafx.scene.control.behavior back to summary

private Class TextInputControlBehavior.ContextMenuItem

extends MenuItem
Class Inheritance

Field Summary

Inherited from javafx.scene.control.MenuItem:
MENU_VALIDATION_EVENT

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from javafx.scene.control.MenuItem:
acceleratorPropertyaddEventFilteraddEventHandlerbuildEventDispatchChaindisablePropertyfiregetAcceleratorgetCssMetaDatagetGraphicgetIdgetOnActiongetOnMenuValidationgetParentMenugetParentPopupgetPropertiesgetPseudoClassStatesgetStylegetStyleableNodegetStyleableParentgetStyleClassgetTextgetTypeSelectorgetUserDatagraphicPropertyidPropertyisDisableisMnemonicParsingisVisiblemnemonicParsingPropertyonActionPropertyonMenuValidationPropertyparentMenuPropertyparentPopupPropertyremoveEventFilterremoveEventHandlersetAcceleratorsetDisablesetGraphicsetIdsetMnemonicParsingsetOnActionsetOnMenuValidationsetParentMenusetParentPopupsetStylesetTextsetUserDatasetVisiblestylePropertytextPropertytoStringvisibleProperty

Constructor Detail

ContextMenuItemback to summary
pack-priv ContextMenuItem(final String action, EventHandler<ActionEvent> onAction)