private class JFXPanel.HostContainer extends java.lang.Object implements HostInterface
Modifier | Constructor and Description |
---|---|
private |
HostContainer() |
Modifier and Type | Method and Description |
---|---|
private java.awt.Cursor |
getPlatformCursor(CursorFrame cursorFrame) |
boolean |
grabFocus()
Grabs focus on this window.
|
void |
repaint() |
boolean |
requestFocus() |
void |
setCursor(CursorFrame cursorFrame) |
void |
setEmbeddedScene(EmbeddedSceneInterface embeddedScene) |
void |
setEmbeddedStage(EmbeddedStageInterface embeddedStage) |
void |
setEnabled(boolean enabled) |
void |
setPreferredSize(int width,
int height) |
boolean |
traverseFocusOut(boolean forward) |
void |
ungrabFocus()
Manually ungrabs focus grabbed on this window previously.
|
public void setEmbeddedStage(EmbeddedStageInterface embeddedStage)
setEmbeddedStage
in interface HostInterface
public void setEmbeddedScene(EmbeddedSceneInterface embeddedScene)
setEmbeddedScene
in interface HostInterface
public boolean requestFocus()
requestFocus
in interface HostInterface
public boolean traverseFocusOut(boolean forward)
traverseFocusOut
in interface HostInterface
public void setPreferredSize(int width, int height)
setPreferredSize
in interface HostInterface
public void repaint()
repaint
in interface HostInterface
public void setEnabled(boolean enabled)
setEnabled
in interface HostInterface
public void setCursor(CursorFrame cursorFrame)
setCursor
in interface HostInterface
private java.awt.Cursor getPlatformCursor(CursorFrame cursorFrame)
public boolean grabFocus()
HostInterface
#setFocusable
). Clicking a focusable owned
window will reset the grab due to a focus transfer.
The click that occurs in another window and causes resetting of the grab
may or may not be delivered to that other window depending on the native
OS behavior.
If any of the application's windows already holds the grab, it is reset
prior to grabbing the focus for this window. The method may be called
multiple times for one window. Subsequent calls do not affect the grab
status unless it is reset between the calls, in which case the focus
is grabbed again.
Note that grabbing the focus on an application window may prevent
delivering certain events to other applications until the grab is reset.
Therefore, if the application has finished showing popup windows based
on a user action (e.g. clicking a menu item), and doesn't require the
grab any more, it should call the HostInterface.ungrabFocus()
method. The
FOCUS_UNGRAB event signals that the grab has been reset.
A user event handler associated with a menu item must be invoked after
resetting the grab. Otherwise, if a developer debugs the application and
has installed a breakpoint in the event handler, the debugger may become
unoperable due to events blocking for other applications on some
platforms.grabFocus
in interface HostInterface
true
if the operation is successfulpublic void ungrabFocus()
HostInterface
ungrabFocus
in interface HostInterface
HostInterface.grabFocus()