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

public Class TwoLevelFocusBehavior

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.javafx.scene.control.behavior.TwoLevelFocusComboBehavior, com.sun.javafx.scene.control.behavior.TwoLevelFocusListBehavior, com.sun.javafx.scene.control.behavior.TwoLevelFocusPopupBehavior
Imports
com.sun.javafx.scene.NodeHelper, com.sun.javafx.scene.traversal.TraversalMethod, javafx.css.PseudoClass, javafx.scene.Node, .Scene, javafx.scene.control.Control, .PopupControl, javafx.scene.input.KeyEvent, .MouseEvent, javafx.beans.value.ChangeListener, javafx.event.Event, .EventDispatcher, .EventHandler

A two level focus handler allows a Control to behave as if it has three focus states : - not focused - focused with internal focus - focused with external focus In external focus mode it intercepts focus and traversal events and prevents the Controls acting upon them, or trapping focus. In internal focus mode most events go to the Control, except for events that are defined to exit the mode.

Field Summary

Modifier and TypeField and Description
private static final PseudoClass
private boolean
pack-priv final ChangeListener<Boolean>
focusListener

When a node gets focus, put it in external-focus mode.

private static final PseudoClass
private final EventHandler<KeyEvent>
private final EventHandler<MouseEvent>
pack-priv EventDispatcher
pack-priv final EventDispatcher
preemptiveEventDispatcher

Don't allow the Node to handle a key event if it is in externalFocus mode.

pack-priv final EventDispatcher
pack-priv Node
pack-priv PopupControl

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Invoked by the behavior when it is disposed, so that any listeners installed by the TwoLevelFocusBehavior can also be uninstalled

public boolean
private Event
public void
setExternalFocus(boolean value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EXTERNAL_PSEUDOCLASS_STATEback to summary
private static final PseudoClass EXTERNAL_PSEUDOCLASS_STATE
externalFocusback to summary
private boolean externalFocus
focusListenerback to summary
pack-priv final ChangeListener<Boolean> focusListener

When a node gets focus, put it in external-focus mode.

INTERNAL_PSEUDOCLASS_STATEback to summary
private static final PseudoClass INTERNAL_PSEUDOCLASS_STATE
keyEventListenerback to summary
private final EventHandler<KeyEvent> keyEventListener
mouseEventListenerback to summary
private final EventHandler<MouseEvent> mouseEventListener
origEventDispatcherback to summary
pack-priv EventDispatcher origEventDispatcher
preemptiveEventDispatcherback to summary
pack-priv final EventDispatcher preemptiveEventDispatcher

Don't allow the Node to handle a key event if it is in externalFocus mode. the only keyboard actions allowed are the navigation keys......

tlfEventDispatcherback to summary
pack-priv final EventDispatcher tlfEventDispatcher
tlNodeback to summary
pack-priv Node tlNode
tlPopupback to summary
pack-priv PopupControl tlPopup

Constructor Detail

TwoLevelFocusBehaviorback to summary
public TwoLevelFocusBehavior()
TwoLevelFocusBehaviorback to summary
public TwoLevelFocusBehavior(Node node)

Method Detail

disposeback to summary
public void dispose()

Invoked by the behavior when it is disposed, so that any listeners installed by the TwoLevelFocusBehavior can also be uninstalled

isExternalFocusback to summary
public boolean isExternalFocus()
postDispatchTidyupback to summary
private Event postDispatchTidyup(Event event)
setExternalFocusback to summary
public void setExternalFocus(boolean value)