public class FXFocusBehavior extends AbstractBehavior<javafx.scene.Node>
FXFocusBehavior
can be registered on an IVisualPart
to
transfer the focus information from the FocusModel
to the part's
visualization. It will assign keyboard focus to the visualization if the part
is focused, and it will display focus feedback around the visualization to
indicate that the part has focus.active, adaptable
IAdaptable.Bound.Impl<T extends IAdaptable>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FOCUS_FEEDBACK_PART_FACTORY
The adapter role for the "focus"
IFeedbackPartFactory . |
ACTIVE_PROPERTY
Constructor and Description |
---|
FXFocusBehavior() |
Modifier and Type | Method and Description |
---|---|
protected void |
addViewerFocusedFeedback()
Adds viewer focused feedback.
|
protected void |
applyFocusToVisual()
Transfers the keyboard focus to JavaFX, i.e. calls
Node.requestFocus() on the visual of the focus part, or on the
root visual if no part is focused. |
protected void |
doActivate()
Post
AbstractBehavior.activate() hook that may be overwritten to e.g. register
listeners. |
protected void |
doDeactivate()
Pre
AbstractBehavior.deactivate() hook that may be overwritten to e.g. unregister
listeners. |
protected IFeedbackPartFactory<javafx.scene.Node> |
getFeedbackPartFactory()
Returns the
IFeedbackPartFactory for selection feedback. |
protected FocusModel<javafx.scene.Node> |
getFocusModel()
Returns the
FocusModel at which this FXFocusBehavior is
registered for changes. |
protected void |
refreshFocusFeedback()
Refreshes focus feedback, i.e. adds or removes feedback.
|
protected void |
removeViewerFocusedFeedback()
Removes viewer focused feedback.
|
activate, activeProperty, adaptableProperty, addFeedback, addHandles, deactivate, getAdaptable, getFeedbackParts, getHandleParts, getHost, isActive, removeFeedback, removeHandles, setAdaptable, switchAdaptableScopes, updateHandles
public static final java.lang.String FOCUS_FEEDBACK_PART_FACTORY
IFeedbackPartFactory
.protected void addViewerFocusedFeedback()
protected void applyFocusToVisual()
Node.requestFocus()
on the visual of the focus part, or on the
root visual if no part is focused.protected void doActivate()
AbstractBehavior
AbstractBehavior.activate()
hook that may be overwritten to e.g. register
listeners.doActivate
in class AbstractBehavior<javafx.scene.Node>
protected void doDeactivate()
AbstractBehavior
AbstractBehavior.deactivate()
hook that may be overwritten to e.g. unregister
listeners.doDeactivate
in class AbstractBehavior<javafx.scene.Node>
protected IFeedbackPartFactory<javafx.scene.Node> getFeedbackPartFactory()
IFeedbackPartFactory
for selection feedback.IFeedbackPartFactory
for selection feedback.protected FocusModel<javafx.scene.Node> getFocusModel()
FocusModel
at which this FXFocusBehavior
is
registered for changes.FocusModel
at which this FXFocusBehavior
is
registered for changes.protected void refreshFocusFeedback()
protected void removeViewerFocusedFeedback()
Copyright (c) 2014 itemis AG and others. All rights reserved.