Top Inners Fields Constructors Methods
com.sun.glass.ui

public abstract Class Window

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.glass.ui.gtk.GtkWindow, com.sun.glass.ui.ios.IosWindow, com.sun.glass.ui.mac.MacWindow, com.sun.glass.ui.monocle.MonocleWindow, com.sun.glass.ui.win.WinWindow
Imports
com.sun.glass.events.MouseEvent, .WindowEvent, com.sun.prism.impl.PrismSettings, java.lang.annotation.Native, java.util.Collections, .LinkedList, .List

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
Window.Level

Available window levels.

public static class
private static class
private class

Field Summary

Modifier and TypeField and Description
private float
public static final int
private volatile long
private volatile int
private Window.EventHandler
protected int
private Window.UndecoratedMoveResizeHelper
private final boolean
private volatile boolean
private volatile boolean
private volatile boolean
private final boolean
private volatile boolean
private volatile boolean
private int
public static final int
private int
private int
public static final int
private int
private int
public static final int
MODAL

Indicates that the window is modal which affects whether the window is minimizable.

public static final int
NORMAL

Normal window.

private float
private float
private final Window
protected float
protected float
public static final int
POPUP

A popup window.

private long
private float
private float
public static final int
RIGHT_TO_LEFT

Indicates that the window trim will draw from right to left.

protected Screen
private boolean
private int
private final int
private String
public static final int
public static final int
public static final int
UNIFIED

Indicates that a window will have a client area textured the same way as the platform decorations and will not have a border between decorations and the client area.

public static final int
public static final int
UTILITY

An utility window.

protected View
private static final LinkedList<Window>
protected int
protected int
x

protected int
y

Constructor Summary

AccessConstructor and Description
protected
Window(Window owner, Screen screen, int styleMask)

Method Summary

Modifier and TypeMethod and Description
protected abstract boolean
_close(long ptr)

protected abstract long
_createWindow(long ownerPtr, long screenPtr, int mask)

protected abstract void
_enterModal(long ptr)

protected abstract void
_enterModalWithWindow(long dialog, long window)

protected abstract void
_exitModal(long ptr)

protected abstract boolean
_grabFocus(long ptr)

protected abstract boolean
_maximize(long ptr, boolean maximize, boolean wasMaximized)

protected abstract boolean
_minimize(long ptr, boolean minimize)

protected abstract void
_releaseInput(long ptr)

protected abstract boolean
_requestFocus(long ptr, int event)

protected abstract void
_requestInput(long ptr, 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)

protected abstract void
_setAlpha(long ptr, float alpha)

protected abstract boolean
_setBackground(long ptr, float r, float g, float b)

protected abstract void
_setBounds(long ptr, int x, int y, boolean xSet, boolean ySet, int w, int h, int cw, int ch, float xGravity, float yGravity)

protected abstract void
_setCursor(long ptr, Cursor cursor)

protected abstract void
_setEnabled(long ptr, boolean enabled)

protected abstract void
_setFocusable(long ptr, boolean isFocusable)

protected abstract void
_setIcon(long ptr, Pixels pixels)

protected abstract void
_setLevel(long ptr, int level)

protected abstract boolean
_setMaximumSize(long ptr, int width, int height)

protected abstract boolean
_setMenubar(long ptr, long menubarPtr)

protected abstract boolean
_setMinimumSize(long ptr, int width, int height)

protected abstract boolean
_setResizable(long ptr, boolean resizable)

protected abstract boolean
_setTitle(long ptr, String title)

protected abstract boolean
_setView(long ptr, View view)

protected abstract boolean
_setVisible(long ptr, boolean visible)

protected abstract void
_toBack(long ptr)

protected abstract void
_toFront(long ptr)

protected abstract void
_ungrabFocus(long ptr)

protected abstract void
_updateViewSize(long ptr)

protected static void
add(Window window)

protected static void
addFirst(Window window)

private void
public void
public void
enterModal()

Enter modal state blocking everything except our window.

public void
enterModal(final Window window)

Enter modal state only blocking the given window.

public void
public float
public Window.EventHandler
public int
public int
public int
public int
public MenuBar
public int
public int
public long
getNativeHandle()

This method returns "higher-level" native window handle.

public long
getNativeWindow()

This method returns "lowest-level" native window handle (HWND on Windows, NSWindow on Mac, X11 Window handle on linux-gtk etc.)

public float
public float
public Window
public final float

Returns:

the horizontal platform scaling for screen locations
getPlatformScaleX
()

Return the horizontal scale used to communicate window locations, sizes, and event coordinates to/from the platform.

public final float

Returns:

the vertical platform scaling for screen locations
getPlatformScaleY
()

Return the vertical scale used to communicate window locations, sizes, and event coordinates to/from the platform.

public long

Returns:

the native pointer.
getRawHandle
()

return the "raw' pointer needed by subclasses to pass to native routines

public final float

Returns:

the horizontal scaling for rendering
getRenderScaleX
()

Return the horizontal scale used for rendering the back buffer.

public final float

Returns:

the vertical scaling for rendering
getRenderScaleY
()

Return the vertical scale used for rendering to the back buffer.

public Screen
public int
public String
public View
public int
public static synchronized List<Window>
public static List<Window>
public int
getX()

public int
getY()

public boolean

Returns:

true if the operation is successful
grabFocus
()

Grabs focus on this window.

pack-priv boolean

Returns:

true if the event is processed by the window, false if it has to be delivered to the app
handleMouseEvent
(int type, int button, int x, int y, int xAbs, int yAbs)

Mouse event handler for processing programmatical resize/move (for undecorated windows only).

protected void
handleWindowEvent(long time, int type)

public boolean
public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
maximize(final boolean maximize)

public boolean
minimize(final boolean minimize)

protected void
protected void
protected void
protected void
notifyFocus(int event)

protected void
protected void
pack-priv void
notifyFullscreen(boolean entered)

protected void
notifyLevelChanged(int level)

protected void
notifyMove(final int x, final int y)

protected void
protected void
protected void
notifyResize(final int type, final int width, final int height)

type values: - WindowEvent.RESIZE - WindowEvent.MINIMIZE - WindowEvent.MAXIMIZE - WindowEvent.RESTORE

protected void
notifyScaleChanged(float platformScaleX, float platformScaleY, float outputScaleX, float outputScaleY)

public void
releaseInput()

Native keyboard for text input is no longer necessary.

protected static void
remove(Window window)

public boolean

Returns:

true if the operation succeeded
requestFocus
(int
one of WindowEvent.FOCUS_LOST, FOCUS_GAINED, FOCUS_GAINED_FORWARD, FOCUS_GAINED_BACKWARD
event
)

Requests or resigns focus on this window.

public boolean
public void
requestInput(String
text to be shown in the native text input component
text
,
int
type of text input component @see com.sun.javafx.scene.control.behavior.TextInputTypes
type
,
double
width of JavaFX text input component
width
,
double
height of JavaFX text input component
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.

public void
setAlpha(final float
a value in the range [0..1f] (transparent..fully-opaque)
alpha
)

Sets the uniform translucency level for this window.

public boolean
setBackground(final float r, final float g, final float b)

Set the background of the window.

public void
setBounds(float
the new window horizontal position, ignored if xSet is set to false
x
,
float
the new window vertical position, ignored if ySet is set to false
y
,
boolean
indicates whether the x parameter is valid
xSet
,
boolean
indicates whether the y parameter is valid
ySet
,
float
the new window width, ignored if set to -1
w
,
float
the new window height, ignored if set to -1
h
,
float
the new window content width, ignored if set to -1
cw
,
float
the new window content height, ignored if set to -1
ch
,
float
the xGravity coefficient
xGravity
,
float
the yGravity coefficient
yGravity
)

Sets the window bounds to the specified values.

public void
setContentSize(int cw, int ch)

public void
setCursor(Cursor cursor)

Sets given cursor as the cursor for this window.

public void
setEnabled(boolean enabled)

Enables or disables the window.

public void
public void
setFocusable(final boolean isFocusable)

Sets whether this window is focusable.

public void
setIcon(final Pixels pixels)

public void
setLevel(final int
one of the constants from Window.Level
level
)

Set the level of this window in the z-order.

public void
setMaximumSize(int width, int height)

Sets the maximum size for this window.

public void
setMenuBar(final MenuBar menubar)

public void
setMinimumSize(int width, int height)

Sets the minimum size for this window.

public void
setPosition(int x, int y)

public void
setRenderScaleX(float renderScaleX)

public void
setRenderScaleY(float renderScaleY)

public boolean
setResizable(final boolean resizable)

protected void
setScreen(Screen screen)

public void
setShouldStartUndecoratedMove(boolean v)

Enables unconditional start of window move operation when mouse is dragged in the client area.

public void
setSize(int w, int h)

protected void
setState(int state)

public void
public void
setUndecoratedMoveRectangle(int size)

Sets "programmatical move" rectangle.

public void
setUndecoratedResizeRectangle(int size)

Sets "programmatical resize" rectangle.

public void
setView(final View view)

public void
setVisible(final boolean visible)

private boolean
public boolean
shouldStartUndecoratedMove(final int x, final int y)

The method called only for undecorated windows x, y: mouse coordinates (in View space).

public boolean
shouldStartUndecoratedResize(final int x, final int y)

The method called only for undecorated windows x, y: mouse coordinates (in View space).

private void
synthesizeViewMoveEvent()

Generates a ViewEvent.MOVE aka insets (might have) changed.

public void
toBack()

Send the window to the bottom of the stacking order.

public void
toFront()

Bring the window to front in the z-order.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
ungrabFocus()

Manually ungrabs focus grabbed on this window previously.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait