public class FXTraverseOnTypePolicy extends AbstractFXInteractionPolicy implements IFXOnTypePolicy
FXTraverseOnTypePolicy implements focus traversal via keyboard
input.| Constructor and Description |
|---|
FXTraverseOnTypePolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected IContentPart<javafx.scene.Node,? extends javafx.scene.Node> |
findInnerMostContentPart(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
Returns the inner most
IContentPart child within the part
hierarchy of the given IContentPart. |
protected IContentPart<javafx.scene.Node,? extends javafx.scene.Node> |
findNextContentPart(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> current)
Determines the next
IContentPart to which keyboard focus is
assigned, depending on the currently focused IContentPart. |
protected IContentPart<javafx.scene.Node,? extends javafx.scene.Node> |
findPreviousContentPart(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> current)
Determines the previous
IContentPart to which keyboard focus is
assigned, depending on the currently focused IContentPart. |
void |
pressed(javafx.scene.input.KeyEvent event)
This callback method is invoked when the user presses a key while the
host has keyboard focus.
|
void |
released(javafx.scene.input.KeyEvent event)
This callback method is invoked when the user releases a key while the
host has keyboard focus.
|
void |
typed(javafx.scene.input.KeyEvent event)
This callback method is invoked when the user types a unicode key while
the host has keyboard focus.
|
void |
unfocus()
This callback method is invoked when the viewer loses its focus while a
key press/release gesture is running.
|
isRegistered, isRegisteredForHostcommit, init, restoreRefreshVisuals, rollback, storeAndDisableRefreshVisualsgetAdaptable, getHost, setAdaptableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAdaptable, setAdaptableprotected IContentPart<javafx.scene.Node,? extends javafx.scene.Node> findInnerMostContentPart(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> part)
IContentPart child within the part
hierarchy of the given IContentPart. If the given
IContentPart does not have any IContentPart children,
then the given IContentPart is returned.part - The IContentPart for which to determine the inner most
IContentPart child.IContentPart child within the part
hierarchy of the given IContentPart.protected IContentPart<javafx.scene.Node,? extends javafx.scene.Node> findNextContentPart(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> current)
IContentPart to which keyboard focus is
assigned, depending on the currently focused IContentPart.
The first content part child of the given focus part is returned as the next part if a content part child is available.
The next content part sibling of the given focus part is returned as the next part if a content part sibling is available. When one sibling list ends, the search continues with the parent's siblings until it reaches the root of the hierarchy.
If the next content part cannot be determined, null is
returned.
current - The currently focused IContentPart.IContentPart to which keyboard focus is
assigned, or null if no subsequent
IContentPart could be determined.protected IContentPart<javafx.scene.Node,? extends javafx.scene.Node> findPreviousContentPart(IContentPart<javafx.scene.Node,? extends javafx.scene.Node> current)
IContentPart to which keyboard focus is
assigned, depending on the currently focused IContentPart.
At first, the previous content part sibling of the given focus part is determined. If a siblings list ends, the search continues with the parent's siblings.
The inner most content part child of the previous content part sibling is
returned as the previous content part, or null if no
previous content part sibling could be found.
current - The currently focused IContentPart.IContentPart to which keyboard focus is
assigned, or null if no previous
IContentPart could be determined.public void pressed(javafx.scene.input.KeyEvent event)
IFXOnTypePolicypressed in interface IFXOnTypePolicyevent - The original KeyEvent.public void released(javafx.scene.input.KeyEvent event)
IFXOnTypePolicyreleased in interface IFXOnTypePolicyevent - The original KeyEvent.public void typed(javafx.scene.input.KeyEvent event)
IFXOnTypePolicytyped in interface IFXOnTypePolicyevent - The original KeyEvent.public void unfocus()
IFXOnTypePolicyunfocus in interface IFXOnTypePolicyCopyright (c) 2014 itemis AG and others. All rights reserved.