class WindowStage extends GlassStage
Modifier and Type | Field and Description |
---|---|
private static java.util.List<WindowStage> |
activeWindows |
private static java.security.Permission |
alwaysOnTopPermission |
private static GlassAppletWindow |
appletWindow |
private Window |
deadWindow |
private boolean |
fullScreenFromUserEvent |
private static java.security.Permission |
fullScreenPermission |
protected Stage |
fxStage |
private boolean |
inAllowedEventHandler |
private boolean |
isAlwaysOnTop |
private boolean |
isAppletStage |
private boolean |
isClosePostponed |
private boolean |
isInFullScreen |
private boolean |
isPopupStage |
private boolean |
isPrimaryStage |
private static java.util.Locale |
LOCALE |
private Modality |
modality |
private GlassStage |
owner |
protected Window |
platformWindow |
private static java.util.Map<Window,WindowStage> |
platformWindows |
private static java.util.ResourceBundle |
RESOURCES |
private boolean |
rtl |
private KeyCombination |
savedFullScreenExitKey |
private boolean |
securityDialog |
private StageStyle |
style |
private boolean |
transparent |
private OverlayWarning |
warning |
activeFSWindow, stageListener
defaultFullScreenExitKeycombo
Constructor and Description |
---|
WindowStage(Window peerWindow,
boolean securityDialog,
StageStyle stageStyle,
Modality modality,
TKStage owner) |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
addActiveWindow(WindowStage window) |
private void |
applyFullScreen() |
void |
close() |
void |
closePostponed() |
TKScene |
createTKScene(boolean depthBuffer,
boolean msaa,
java.security.AccessControlContext acc)
Creates a Scene peer that can be displayed in this Stage peer.
|
(package private) void |
exitFullScreen() |
(package private) static Image |
findBestImage(java.util.List icons,
int width,
int height) |
(package private) static WindowStage |
findWindowStage(Window platformWindow) |
(package private) void |
fullscreenChanged(boolean fs) |
(package private) static GlassAppletWindow |
getAppletWindow() |
protected GlassStage |
getOwner() |
(package private) Window |
getPlatformWindow() |
long |
getRawHandle()
Return a handle to the native platform window id.
|
float |
getRenderScale() |
KeyCombination |
getSavedFullScreenExitKey() |
(package private) StageStyle |
getStyle() |
float |
getUIScale() |
protected ViewScene |
getViewScene() |
(package private) OverlayWarning |
getWarning() |
boolean |
grabFocus()
Grabs focus on this window.
|
(package private) void |
handleFocusDisabled() |
private boolean |
hasPermission(java.security.Permission perm) |
WindowStage |
init(GlassSystemMenu sysmenu) |
private void |
initPlatformWindow() |
(package private) boolean |
isApplet() |
private boolean |
isInAllowedEventHandler() |
(package private) boolean |
isSecurityDialog() |
(package private) boolean |
isTrustedFullScreen() |
(package private) boolean |
isVisible() |
boolean |
needsUpdateWindow() |
void |
postponeClose() |
void |
releaseInput()
Native keyboard for text input is no longer necessary.
|
(package private) static void |
removeActiveWindow(WindowStage window) |
void |
requestFocus() |
void |
requestFocus(FocusCause cause) |
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.
|
protected void |
requestToFront() |
void |
setAlwaysOnTop(boolean alwaysOnTop) |
(package private) static void |
setAppletWindow(GlassAppletWindow aw) |
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 |
setFullScreen(boolean fullScreen) |
void |
setIconified(boolean iconified) |
void |
setIcons(java.util.List icons) |
void |
setInAllowedEventHandler(boolean inAllowedEventHandler) |
(package private) void |
setIsPopup() |
(package private) void |
setIsPrimary() |
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) |
(package private) void |
setPlatformWindowClosed() |
void |
setResizable(boolean resizable) |
void |
setRTL(boolean b) |
void |
setScene(TKScene scene)
Set the scene to be displayed in this stage
|
void |
setTitle(java.lang.String title) |
void |
setVisible(boolean visible)
Set if the stage is visible on screen
|
(package private) void |
setWarning(OverlayWarning newWarning) |
void |
toBack() |
void |
toFront() |
void |
ungrabFocus()
Manually ungrabs focus grabbed on this window previously.
|
getAccessControlContext, getScene, requestClosingAllWindows, setImportant, setSecurityContext, setTKStageListener, windowsSetEnabled
protected Window platformWindow
protected Stage fxStage
private StageStyle style
private GlassStage owner
private Modality modality
private final boolean securityDialog
private OverlayWarning warning
private boolean rtl
private boolean transparent
private boolean isPrimaryStage
private boolean isAppletStage
private boolean isPopupStage
private boolean isInFullScreen
private boolean isAlwaysOnTop
private boolean inAllowedEventHandler
private static java.util.List<WindowStage> activeWindows
private static java.util.Map<Window,WindowStage> platformWindows
private static GlassAppletWindow appletWindow
private static final java.util.Locale LOCALE
private static final java.util.ResourceBundle RESOURCES
private static final java.security.Permission fullScreenPermission
private static final java.security.Permission alwaysOnTopPermission
private boolean fullScreenFromUserEvent
private KeyCombination savedFullScreenExitKey
private boolean isClosePostponed
private Window deadWindow
public WindowStage(Window peerWindow, boolean securityDialog, StageStyle stageStyle, Modality modality, TKStage owner)
static void setAppletWindow(GlassAppletWindow aw)
static GlassAppletWindow getAppletWindow()
final void setIsPrimary()
final void setIsPopup()
final boolean isSecurityDialog()
public final WindowStage init(GlassSystemMenu sysmenu)
private void initPlatformWindow()
final Window getPlatformWindow()
static WindowStage findWindowStage(Window platformWindow)
protected GlassStage getOwner()
protected ViewScene getViewScene()
StageStyle getStyle()
public TKScene createTKScene(boolean depthBuffer, boolean msaa, java.security.AccessControlContext acc)
TKStage
public void setScene(TKScene scene)
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
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()
public float getRenderScale()
public void setMinimumSize(int minWidth, int minHeight)
public void setMaximumSize(int maxWidth, int maxHeight)
static Image findBestImage(java.util.List icons, int width, int height)
public void setIcons(java.util.List icons)
public void setTitle(java.lang.String title)
public void setVisible(boolean visible)
GlassStage
setVisible
in interface TKStage
setVisible
in class GlassStage
visible
- True if the stage should be visibleboolean isVisible()
isVisible
in class GlassStage
public void setOpacity(float opacity)
public boolean needsUpdateWindow()
public void setIconified(boolean iconified)
public void setMaximized(boolean maximized)
public void setAlwaysOnTop(boolean alwaysOnTop)
public void setResizable(boolean resizable)
boolean isTrustedFullScreen()
void exitFullScreen()
boolean isApplet()
private boolean hasPermission(java.security.Permission perm)
public final KeyCombination getSavedFullScreenExitKey()
private void applyFullScreen()
void setWarning(OverlayWarning newWarning)
OverlayWarning getWarning()
public void setFullScreen(boolean fullScreen)
void fullscreenChanged(boolean fs)
public void toBack()
public void toFront()
public void postponeClose()
public void closePostponed()
public void close()
close
in interface TKStage
close
in class GlassStage
void setPlatformWindowClosed()
static void addActiveWindow(WindowStage window)
static void removeActiveWindow(WindowStage window)
final void handleFocusDisabled()
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.true
if the operation is successfulpublic void ungrabFocus()
TKStage
TKStage.grabFocus()
public void requestFocus()
requestFocus
in interface TKStage
requestFocus
in class GlassStage
public void requestFocus(FocusCause cause)
requestFocus
in interface TKStage
requestFocus
in class GlassStage
protected void setPlatformEnabled(boolean enabled)
setPlatformEnabled
in class GlassStage
public void setEnabled(boolean enabled)
TKStage
public long getRawHandle()
TKStage
protected void requestToFront()
public void setInAllowedEventHandler(boolean inAllowedEventHandler)
private boolean isInAllowedEventHandler()
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
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
public void setRTL(boolean b)