org.gnu.gtk
public class Window extends Bin
Deprecated: This class is part of the java-gnome 2.x family of libraries,
which, due to their inefficiency and complexity, are no longer
being maintained and have been abandoned by the java-gnome
project. This class may in the future have an equivalent in
java-gnome 4.0, try looking for
org.gnome.gtk.Window
.
You should be aware that there is a considerably different API
in the new library: the architecture is completely different
and most notably internals are no longer exposed to public view.
Constructor Summary | |
---|---|
Window()
Constructs a top-level Window. | |
Window(WindowType windowType)
Construct a new Window object.
| |
Window(Handle handle)
Create a new Window with a handle to a native resource returned from a
call to the native libraries.
|
Method Summary | |
---|---|
void | addAccelGroup(AccelGroup accelGroup)
Associate accesGroup with the window.
|
void | deiconify()
Asks to deiconify the specified Window. |
void | destroy()
Destroys a window and releases its native resources. |
void | fullscreen() |
boolean | getAcceptFocus() |
static Pixbuf[] | getDefaultIconList()
Gets the icons set by setDefaultIconList .
|
boolean | getFocusOnMap()
Gets the value set by Window.
|
Widget | getFocusWidget()
Retrieves the current focused Widget within the window.
|
Gravity | getGravity()
Gets the value set by setGravity() .
|
Pixbuf | getIcon()
Returns the icon representing the Window. |
Pixbuf[] | getIconList()
Retrieves the list of icons set by setIconList(). |
String | getIconName()
Returns the name of the themed icon for the window.
|
Point | getPosition()
Retuns the current position of the window.
|
Screen | getScreen()
Returns the GdkScreen associated with this window. |
Requisition | getSize()
Returns the current size of a Window. |
boolean | getSkipPagerHint()
Returns whether the window should appear in the pager. |
boolean | getSkipTaskbarHint()
Returns whether this window should appear in the task bar. |
String | getTitle()
Returns the title for the Window object
|
Window | getTransientParent()
Fetches the transient parent of this window.
|
static Type | getType()
Retrieve the runtime type used by the GLib library. |
static Window | getWindow(Handle handle)
Create a new Window with a handle to a native resource returned from a
call to the native libraries.
|
boolean | hasToplevelFocus()
Returns whether the input focus is within this Window. |
void | iconify()
Asks to iconify the Window. |
boolean | isActive()
Returns whether the window is part of the current active toplevel. |
boolean | isDestroyed()
Returns true if destroy has previously been called on this object. |
static Window[] | listToplevelWindows()
Returns a list of all existing toplevel windows.
|
void | maximize()
Asks to maximize the Window so it becomes full-screen. |
void | move(int x, int y)
Ask the window manager to move the Window to a given location. |
void | present()
Presents a window to the user. |
void | removeAccelGroup(AccelGroup accelGroup)
Reverses the effect of addAccelGroup .
|
void | resize(int width, int height)
Resizes the Window as if the user had done so, obeying the geometry
constraints.
|
void | setAcceptFocus(boolean acceptFocus)
Windows may set a hint asking the desktop environment not to receive the
input focus. |
static void | setAutoStartupNotification(boolean setting) |
void | setDecorated(boolean setting)
By default Windows are decorated by a titlebar, resize controls, etc.
|
static void | setDefaultIcon(Pixbuf icon) |
static boolean | setDefaultIconFromFile(String filename)
Sets an icon to be used as fallback for windows that haven't had
setIconList() called on them from a file on disk.
|
static void | setDefaultIconList(Pixbuf[] icons)
Sets up the icon representing a Window. |
void | setDefaultIconName(String name)
Sets an icon to be used as fallback for windows that haven't had
setIconList called on them from a named themed icon.
|
void | setDefaultSize(int width, int height)
Sets the default size for a Window. |
void | setDefaultWidget(Widget defaultWidget)
The default widget is the widget that is activated when the user presses
the Enter key. |
void | setFocusOnMap(boolean setting)
Windows may set a hint asking the desktop environment not to receive the
input focus when the window is mapped. |
void | setFocusWidget(Widget focus)
If focus is not the current focus widget and is focusable,
set it as the focus widget for the window.
|
void | setGeometryHints(Widget geometryWidget, Geometry geometry, WindowHints geomMask)
This method sets up hints about how a Window can be resized by the user.
|
void | setGravity(Gravity gravity)
Window gravity defines the meaning of coordinates passed to
move() .
|
void | setIcon(Pixbuf icon)
Sets up the icon representing a Window. |
boolean | setIconFromFile(String filename)
Sets the icon for this window.
|
void | setIconList(Pixbuf[] icons)
Sets up the icon representing a GtkWindow. |
void | setIconName(String name)
Sets the icon for the window from a named themed icon. |
void | setKeepAbove(boolean setting) |
void | setKeepBelow(boolean setting) |
void | setModal(boolean modal)
Sets a window modal or non-modal.
|
void | setPosition(WindowPosition position)
Sets a position constraint for this window. |
void | setResizable(boolean resizable)
Sets whether the user can resize the window. |
void | setScreen(Screen screen)
Sets the Screen where the window is displayed; if the window is already
mapped, it will be unmapped, and then remapped on the new screen.
|
void | setSkipPagerHint(boolean skipHint)
Set to true to keep the window from appearing in the pager.
|
void | setSkipTaskbarHint(boolean skipHint)
Set to true to keep this window from appearing in the task bar.
|
void | setTitle(String title)
Set the title for this Window object
|
void | setTransientParent(Window parent)
Dialog windows should be set transient for the main application window
they were spawned from. |
void | stick()
Asks to stick the window. |
void | unfullscreen() |
void | unmaximize()
Asks to unmaximize the Window so it becomes it normal size. |
void | unstick()
Asks to unstick the window. |
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Constructs a top-level Window. This is the same as callingnew Window(WindowType.TOPLEVEL)
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Construct a new Window object.Parameters: windowType The type of window to create
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Create a new Window with a handle to a native resource returned from a call to the native libraries.Parameters: handle The handle that represents a pointer to a native resource.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
AssociateaccesGroup
with the window.
Parameters: accelGroup The AccelGroup to associate with this window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Asks to deiconify the specified Window.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Destroys a window and releases its native resources. When a window is destroyed, it will break any references it holds to other objects and it will be removed from the list of toplevels. It is safe to call this method multiple times (the native resources will only be released once). However, no other methods on a window should be called after destroy is called. An ObjectDestroyedException is thrown if this takes place.See Also: ObjectDestroyedException
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the icons set bysetDefaultIconList
.
Returns: the list of icons
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the value set by Window.Returns: TRUE if window should receive the input focus when mapped.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieves the current focused Widget within the window.Returns: The Widget that has focus.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the value set bysetGravity()
.
Returns: The Gravity for the Window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the icon representing the Window.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieves the list of icons set by setIconList(). The list is copied, but the reference count on each member won't be incremented.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the name of the themed icon for the window.Returns: The icon name or NULL if the window has no themed icon.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retuns the current position of the window.Returns: The position of the window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the GdkScreen associated with this window.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the current size of a Window. If the window is not onscreen, it returns the size that will be suggested to the window manager for the initial window size.Returns: The size of the Window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns whether the window should appear in the pager.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns whether this window should appear in the task bar.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns the title for the Window objectReturns: A string containing the title.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Fetches the transient parent of this window.Returns: The transient parent for this window, or null if no transient parent has been set.
See Also: setTransientParent
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Retrieve the runtime type used by the GLib library.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Create a new Window with a handle to a native resource returned from a call to the native libraries.Parameters: handle The handle that represents a pointer to a native resource.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns whether the input focus is within this Window. For real toplevel windows, this is identical toisActive()
, but for
embedded windows, like Plug, the results will differ.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Asks to iconify the Window. Note that you shouldn't assume the Window is iconified afterward because other entities could deiconify it again or there may not be a window manager in which case iconification is not possible.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns whether the window is part of the current active toplevel. (That is, the toplevel window receiving keystrokes.) The return value is TRUE if the window is active toplevel itself, but also if it is, say, a Plug embedded in the active toplevel. You might use this method if you wanted to draw a widget differently in an active window from a widget in an inactive window.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns true if destroy has previously been called on this object.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Returns a list of all existing toplevel windows.Returns: the array containing the windows
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Asks to maximize the Window so it becomes full-screen.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Ask the window manager to move the Window to a given location. Window managers are free to ignore this request. Most window managers ignore the request for the initial window position but honor the request after the window has been shown.Parameters: x The x coordinate for the move. y The y coordinate for the move.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Presents a window to the user. This may mean raising the window in the stack order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on the user's platform, window manager, and preferences. If the Window is hidden it will also call
show
as well.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Reverses the effect ofaddAccelGroup
.
Parameters: accelGroup The AccelGroup to disassociate with this window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Resizes the Window as if the user had done so, obeying the geometry constraints.Parameters: width The width for the resized Window. height The height for the resized Window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Windows may set a hint asking the desktop environment not to receive the input focus. This won't necessarily be honoured, but if you're building a quick utility window then you might want to set this property.Parameters: acceptFocus true to set this hint.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
By default Windows are decorated by a titlebar, resize controls, etc. Some window managers allow you to disable these decorations, creating a borderless Window. This method allows you to change the decorated setting for the Window.Parameters: setting Determines if the Window should be decorated.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets an icon to be used as fallback for windows that haven't had setIconList() called on them from a file on disk.Parameters: filename the path to the icon
Returns: true
if it was successfully set,
false
otherwise.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets up the icon representing a Window. The icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. This method allows you to pass in the same icon in several hand-drawn sizes. The list should contain the natural sizes your icon is available in; that is, don't scale the image before passing it to GTK+. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling. Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them. Note that this method sets the icon for all windows in your application in one go.Parameters: icons the list of icons to use.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets an icon to be used as fallback for windows that haven't hadsetIconList
called on them from a named themed icon.
See Also: setIconName
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the default size for a Window. If a Window's natural size is larger than the default, the default will be ignored.Parameters: width The width to set for the default size. height the height to set for the default size.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
The default widget is the widget that is activated when the user presses the Enter key. This method will set defaultWidget to the default widget for the Window.Parameters: defaultWidget The widget that should become the default widget.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped. This function sets this hint.Parameters: setting TRUE to let this window receive input focus on map.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Iffocus
is not the current focus widget and is focusable,
set it as the focus widget for the window.
Parameters: focus The widget to receive focus for the Window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
This method sets up hints about how a Window can be resized by the user. You can set a minimum and maximum size, allowable resize increments, aspect ratios and more.Parameters: geometryWidget The Widget the geometry hints will be applied to. geometry The geometry information. geomMask Mask indicating which fields should be paid attention to.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Window gravity defines the meaning of coordinates passed tomove()
.
Parameters: gravity The window gravity.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets up the icon representing a Window. The icon is used when the Window is minimized.Parameters: icon The Icon to use for this Window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the icon for this window.Parameters: filename the full path to the icon
Returns: true
if the icon was successfully set,
false
otherwise.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets up the icon representing a GtkWindow. The icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window frame, or display it in other contexts. setIconList allows you to pass in the same icon in several hand-drawn sizes. The list should contain the natural sizes your icon is available in; that is, don't scale the image before passing it. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality. By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling. Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and larger images (64x64, 128x128) if you have them.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the icon for the window from a named themed icon. See the docs for IconTheme for more details.Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.
Parameters: name The name of the themed icon.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a window modal or non-modal.Parameters: modal Indicates whether the window should be modal or not.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets a position constraint for this window. If the old or new constraint is CENTER_ALWAYS, this will also cause the window to be repositioned to satisfy the new constraint.Parameters: position A position constraint.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets whether the user can resize the window. Windows are user resizable by default.Parameters: resizable Determines if the window can be resized.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets the Screen where the window is displayed; if the window is already mapped, it will be unmapped, and then remapped on the new screen.Parameters: screen the new screen.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Set to true to keep the window from appearing in the pager.Parameters: skipHint
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Set to true to keep this window from appearing in the task bar.Parameters: skipHint
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Set the title for this Window objectParameters: title A string containing the title for this Window
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to, for example, keep the dialog on top of the main window, or center the dialog over the main window. On Windows, this method will put the child window on top of the parent, the same way the window manager would have done in X.Parameters: parent Transient parent window.
Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Asks to stick the window. This means that the window appear on all user desktops. Note that you shouldn't assume that the Window is definitely stuck after calling this method. Other entities could unstick the Window or the window manager may not support this feature.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Asks to unmaximize the Window so it becomes it normal size.Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Asks to unstick the window.