final class EmbeddedStage extends GlassStage implements EmbeddedStageInterface
Modifier and Type | Field and Description |
---|---|
private HostInterface |
host |
activeFSWindow, stageListener
defaultFullScreenExitKeycombo
Constructor and Description |
---|
EmbeddedStage(HostInterface host) |
Modifier and Type | Method and Description |
---|---|
TKScene |
createTKScene(boolean depthBuffer,
boolean msaa,
java.security.AccessControlContext acc)
Creates a Scene peer that can be displayed in this Stage peer.
|
void |
focusUngrab() |
long |
getRawHandle()
Return a handle to the native platform window id.
|
float |
getRenderScale() |
float |
getUIScale() |
boolean |
grabFocus()
Grabs focus on this window.
|
private void |
notifyStageListener(java.lang.Runnable r) |
private void |
notifyStageListenerLater(java.lang.Runnable r) |
void |
releaseInput()
Native keyboard for text input is no longer necessary.
|
void |
requestFocus() |
void |
requestInput(java.lang.String text,
int type,
double width,
double height,
double Mxx,
double Mxy,
double Mxz,
double Mxt,
double Myx,
double Myy,
double Myz,
double Myt,
double Mzx,
double Mzy,
double Mzz,
double Mzt)
Requests text input in form of native keyboard for text component
contained by this Window.
|
void |
setAlwaysOnTop(boolean alwaysOnTop) |
void |
setBounds(float x,
float y,
boolean xSet,
boolean ySet,
float w,
float h,
float cw,
float ch,
float xGravity,
float yGravity)
Sets the window bounds to the specified values.
|
void |
setEnabled(boolean enabled)
Whether mouse/keyboard events should be sent to this window.
|
void |
setFocused(boolean focused,
int focusCause) |
void |
setFullScreen(boolean fullScreen) |
void |
setIconified(boolean iconified) |
void |
setIcons(java.util.List icons) |
void |
setLocation(int x,
int y) |
void |
setMaximized(boolean maximized) |
void |
setMaximumSize(int maxWidth,
int maxHeight) |
void |
setMinimumSize(int minWidth,
int minHeight) |
void |
setOpacity(float opacity) |
protected void |
setPlatformEnabled(boolean enabled) |
void |
setResizable(boolean resizable) |
void |
setRTL(boolean b) |
void |
setScene(TKScene scene)
Set the scene to be displayed in this stage
|
void |
setSize(int width,
int height) |
void |
setTitle(java.lang.String title) |
void |
setVisible(boolean visible)
Set if the stage is visible on screen
|
void |
toBack() |
void |
toFront() |
void |
ungrabFocus()
Manually ungrabs focus grabbed on this window previously.
|
close, getAccessControlContext, getScene, isVisible, requestClosingAllWindows, requestFocus, setImportant, setSecurityContext, setTKStageListener, windowsSetEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
closePostponed, postponeClose
private HostInterface host
public EmbeddedStage(HostInterface host)
public TKScene createTKScene(boolean depthBuffer, boolean msaa, java.security.AccessControlContext acc)
TKStage
createTKScene
in interface TKStage
public void setScene(TKScene scene)
TKStage
setScene
in interface TKStage
setScene
in class GlassStage
scene
- The peer of the scene to be displayedpublic void setBounds(float x, float y, boolean xSet, boolean ySet, float w, float h, float cw, float ch, float xGravity, float yGravity)
TKStage
x -= xGravity * deltaW
y -= yGravity * deltaH
setBounds
in interface TKStage
x
- the new window horizontal position, ignored if xSet is set to
falsey
- the new window vertical position, ignored if ySet is set to
falsexSet
- indicates whether the x parameter is validySet
- indicates whether the y parameter is validw
- the new window width, ignored if set to -1h
- the new window height, ignored if set to -1cw
- the new window content width, ignored if set to -1ch
- the new window content height, ignored if set to -1xGravity
- the xGravity coefficientyGravity
- the yGravity coefficientpublic float getUIScale()
getUIScale
in interface TKStage
public float getRenderScale()
getRenderScale
in interface TKStage
public void setMinimumSize(int minWidth, int minHeight)
setMinimumSize
in interface TKStage
public void setMaximumSize(int maxWidth, int maxHeight)
setMaximumSize
in interface TKStage
protected void setPlatformEnabled(boolean enabled)
setPlatformEnabled
in class GlassStage
public void setVisible(boolean visible)
GlassStage
setVisible
in interface TKStage
setVisible
in class GlassStage
visible
- True if the stage should be visiblepublic void setOpacity(float opacity)
setOpacity
in interface TKStage
public void setIconified(boolean iconified)
setIconified
in interface TKStage
public void setMaximized(boolean maximized)
setMaximized
in interface TKStage
public void setAlwaysOnTop(boolean alwaysOnTop)
setAlwaysOnTop
in interface TKStage
public void setResizable(boolean resizable)
setResizable
in interface TKStage
public void setFullScreen(boolean fullScreen)
setFullScreen
in interface TKStage
public void requestFocus()
requestFocus
in interface TKStage
requestFocus
in class GlassStage
public boolean grabFocus()
TKStage
#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 TKStage.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.public void ungrabFocus()
TKStage
ungrabFocus
in interface TKStage
TKStage.grabFocus()
private void notifyStageListener(java.lang.Runnable r)
private void notifyStageListenerLater(java.lang.Runnable r)
public void setLocation(int x, int y)
setLocation
in interface EmbeddedStageInterface
public void setSize(int width, int height)
setSize
in interface EmbeddedStageInterface
public void setFocused(boolean focused, int focusCause)
setFocused
in interface EmbeddedStageInterface
public void focusUngrab()
focusUngrab
in interface EmbeddedStageInterface
public void requestInput(java.lang.String text, int type, double width, double height, double Mxx, double Mxy, double Mxz, double Mxt, double Myx, double Myy, double Myz, double Myt, double Mzx, double Mzy, double Mzz, double Mzt)
TKStage
requestInput
in interface TKStage
text
- text to be shown in the native text input componenttype
- type of text input component @see com.sun.javafx.scene.control.behavior.TextInputTypeswidth
- width of JavaFX text input componentheight
- height of JavaFX text input componentpublic void releaseInput()
TKStage
releaseInput
in interface TKStage
public void setEnabled(boolean enabled)
TKStage
setEnabled
in interface TKStage
public long getRawHandle()
TKStage
getRawHandle
in interface TKStage