NativeSurface interface with windowing
information such as window-handle,
window-size and window-position.
All values of this interface are represented in window units, if not stated otherwise.
See NativeSurface.
getX() and getY(). insets, i.e. window decoration.
A window toolkit such as the AWT may either implement this interface
directly with one of its components, or provide and register an
implementation of NativeWindowFactory
which can create NativeWindow objects for its components.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public int | Returns: height of the client area in window unitsReturns the height of the client area excluding insets (window decorations) in window units. |
| public InsetsImmutable | Returns: insetsReturns the insets defined as the width and height of the window decoration on the left, right, top and bottom in window units. |
| public Point | getLocationOnScreen(Point
Optional point)Point storage.
If not null, null, it is translated about the resulting screen position
and returned.Returns the window's top-left client-area position in the screen. |
| public NativeSurface | getNativeSurface()
Redeclares com. NativeSurface of this NativeSurfaceHolder.
|
| public NativeWindow | |
| public int | Returns: width of the client area in window unitsReturns the width of the client area excluding insets (window decorations) in window units. |
| public long | |
| public int | getX()
Returns the x position of the top-left corner of the client area relative to it's parent in window units. |
| public int | getY()
Returns the current y position of the top-left corner of the client area relative to it's parent in window units. |
| public boolean |
| destroy | back to summary |
|---|---|
| public void destroy() Destroys this window incl. releasing all related resources. | |
| getHeight | back to summary |
|---|---|
| public int getHeight() Returns the height of the client area excluding insets (window decorations) in window units.
| |
| getInsets | back to summary |
|---|---|
| public InsetsImmutable getInsets() Returns the insets defined as the width and height of the window decoration on the left, right, top and bottom in window units. Insets are zero if the window is undecorated, including child windows.
Insets are available only after the native window has been created,
ie. the native window has been made visible. The top-level window size is
| |
| getLocationOnScreen | back to summary |
|---|---|
| public Point getLocationOnScreen(Point point) Returns the window's top-left client-area position in the screen.
If See Coordinate System. Since the position reflects the client area, it does not include the insets.
| |
| getNativeSurface | back to summary |
|---|---|
| public NativeSurface getNativeSurface() Redeclares com. Doc from com. Returns the associated
Returns this instance, which is-a
| |
| getParent | back to summary |
|---|---|
public NativeWindow getParent()
| |
| getWidth | back to summary |
|---|---|
| public int getWidth() Returns the width of the client area excluding insets (window decorations) in window units.
| |
| getWindowHandle | back to summary |
|---|---|
| public long getWindowHandle() Returns the window handle for this NativeWindow. The window handle shall reflect the platform one for all window related operations, e.g. open, close, resize.
On X11 this returns an entity of type Window. | |
| getX | back to summary |
|---|---|
| public int getX() Returns the x position of the top-left corner of the client area relative to it's parent in window units. If no parent exist (top-level window), this coordinate equals the screen coordinate. Since the position reflects the client area, it does not include the insets. See Coordinate System.
| |
| getY | back to summary |
|---|---|
| public int getY() Returns the current y position of the top-left corner of the client area relative to it's parent in window units. If no parent exist (top-level window), this coordinate equals the screen coordinate. Since the position reflects the client area, it does not include the insets. See Coordinate System.
| |
| hasFocus | back to summary |
|---|---|
| public boolean hasFocus() Returns true if this native window owns the focus, otherwise false. | |