|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gdk.Drawable
org.gnu.gdk.Window
org.gnome.gdk.Window
.
public class Window
A rectangular region on the screen. It's a low-level object, used to
implement high-level objects such as Widget
and
Window
on the GTK+ level. A Window
is
a toplevel window, the thing a user might think of as a "window" with a
titlebar and so on; a Window
may contain many Windows.
Constructor Summary | |
---|---|
Window(org.gnu.glib.Handle handle)
Deprecated. |
|
Window(Window parent,
WindowAttr attributes,
int attributesMask)
Deprecated. |
Method Summary | |
---|---|
void |
beginPaintRectangle(Rectangle rec)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
beginPaintRegion(Region region)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
clear()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
clearArea(int x,
int y,
int width,
int height,
boolean exposeEvent)
Deprecated. |
void |
deiconify()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
destroy()
Deprecated. |
void |
endPaint()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Window[] |
getChildren()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
EventMask |
getEvents()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Rectangle |
getFrameExtents()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
int |
getHeight()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
getKeyboardFocus()
Deprecated. |
Point |
getOrigin()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Window |
getParent()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Point |
getPointerLocation()
Deprecated. |
ModifierType |
getPointerModifierType()
Deprecated. |
Window |
getPointerWindow()
Deprecated. |
Point |
getPosition()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Point |
getRootOrigin()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Window |
getToplevel()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
static Window[] |
getTopLevelWindows()
Deprecated. |
static org.gnu.glib.Type |
getType()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
int |
getWidth()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Window |
getWindowAt(int x,
int y)
Deprecated. This method is incorrect and is deprecated in favor of getWindowAtPointer() . |
Window |
getWindowAtPointer()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
static Window |
getWindowFromHandle(org.gnu.glib.Handle hndl)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
WindowState |
getWindowState()
Deprecated. |
GrabStatus |
grabKeyboard(boolean ownerEvents,
int time)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
GrabStatus |
grabPointer(boolean ownerEvents,
EventMask eventMask,
Window confineTo,
Cursor cursor,
int time)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
hide()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
iconify()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
invalidateRect(Rectangle rect,
boolean invalidateChildren)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
invalidateRegion(Region region,
boolean invalidateChildren)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
boolean |
isViewable()
Deprecated. |
boolean |
isVisible()
Deprecated. |
void |
lower()
Deprecated. |
void |
maximize()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
mergeChildShapes()
Deprecated. |
void |
move(int x,
int y)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
moveAndResize(int x,
int y,
int width,
int height)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
boolean |
pointerIsGrabbed()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
raise()
Deprecated. |
void |
reparent(Window parent,
int x,
int y)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
resize(int width,
int height)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
scrollContent(int x,
int y)
Deprecated. |
void |
setBackground(Color color)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setBackground(Pixmap pixmap,
boolean parentRelative)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setBitmapMask(Bitmap mask,
int x,
int y)
Deprecated. |
void |
setChildMask(boolean masked)
Deprecated. |
void |
setCursor(Cursor cursor)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setEvents(EventMask mask)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setGeometryHints(Geometry geometry,
WindowHints hints)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setHint(WindowTypeHint hint)
Deprecated. |
void |
setIcon(Window icon,
Pixmap pixmap,
Bitmap mask)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setIconList(Pixbuf[] icons)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setIconName(java.lang.String name)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setModalHint(boolean modal)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setRegionMask(Region region,
int x,
int y)
Deprecated. |
void |
setRole(java.lang.String role)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
boolean |
setStaticGravities(boolean useStatic)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setTitle(java.lang.String title)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setTransientOf(Window parent)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
setUnmanaged(boolean unmanaged)
Deprecated. |
void |
show()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
showUnraised()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
stick()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
ungrabKeyboard(int time)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
ungrabPointer(int time)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
unmaximize()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
unstick()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
withdraw()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Methods inherited from class org.gnu.glib.GObject |
---|
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setProperty, setStringProperty, thawNotify |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Window(org.gnu.glib.Handle handle)
public Window(Window parent, WindowAttr attributes, int attributesMask)
Method Detail |
---|
public void destroy()
public Window getWindowAt(int x, int y)
getWindowAtPointer()
.
x
- X position of the window.y
- Y position of the window.
public Window getWindowAtPointer()
public void show()
window
to the top of the window stack (moves
the window to the front of the Z-order).
public void hide()
public void withdraw()
public void showUnraised()
GdkWindow
onscreen, but does not modify its
stacking order. In contrast, show()
will raise the window
to the top of the window stack.
public void move(int x, int y)
x
- new x position.y
- new y position.public void resize(int width, int height)
width
- the new window width.height
- the new window height.public void moveAndResize(int x, int y, int width, int height)
move()
and resize()
,
except that both operations are performed at once, avoiding strange
visual effects (ie the user may be able to see the window first move,
then resize, if you don't use moveAndResize()
).
x
- the new x position.y
- the new y position.width
- the new width.height
- the new height.public void reparent(Window parent, int x, int y)
parent
. The window being
reparented will be unmapped as a side effect.
parent
- the new parent to move window into.x
- X location inside the new parent.y
- Y location inside the new parent.public void clear()
window
to the background color or
background pixmap.
public void clearArea(int x, int y, int width, int height, boolean exposeEvent)
public void raise()
public void lower()
public void getKeyboardFocus()
public void setUnmanaged(boolean unmanaged)
public void scrollContent(int x, int y)
public void setBitmapMask(Bitmap mask, int x, int y)
public void setRegionMask(Region region, int x, int y)
public void setChildMask(boolean masked)
public void mergeChildShapes()
public boolean isVisible()
public boolean isViewable()
public WindowState getWindowState()
public void setHint(WindowTypeHint hint)
public static Window[] getTopLevelWindows()
public int getWidth()
getWidth
in class Drawable
public int getHeight()
getHeight
in class Drawable
public void setEvents(EventMask mask)
mask
- the new event mask.public EventMask getEvents()
setEvents(EventMask)
public boolean setStaticGravities(boolean useStatic)
useStatic
-
public void setModalHint(boolean modal)
modal
- public void setGeometryHints(Geometry geometry, WindowHints hints)
geometry
- hints
- public void beginPaintRectangle(Rectangle rec)
rec
- public void beginPaintRegion(Region region)
region
- public void endPaint()
public void invalidateRect(Rectangle rect, boolean invalidateChildren)
public void invalidateRegion(Region region, boolean invalidateChildren)
public void setTitle(java.lang.String title)
title
- public void setRole(java.lang.String role)
role
- public void setTransientOf(Window parent)
parent
- public void setBackground(Color color)
color
- public void setBackground(Pixmap pixmap, boolean parentRelative)
pixmap
- parentRelative
- public void setCursor(Cursor cursor)
cursor
- public Point getPosition()
public Point getOrigin()
public Point getRootOrigin()
public Rectangle getFrameExtents()
public Window getParent()
public Window getToplevel()
public Window[] getChildren()
public void setIconList(Pixbuf[] icons)
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. 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.
icons
- public void setIcon(Window icon, Pixmap pixmap, Bitmap mask)
The icon should be provided in whatever size it was naturally drawn; 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.
If you have your icon hand-drawn in multiple sizes, use setIconList(). Then the best size will be used.
icon
- pixmap
- mask
- public void setIconName(java.lang.String name)
IconTheme
for more details.
name
- public void iconify()
public void deiconify()
public void stick()
public void unstick()
public void maximize()
public void unmaximize()
public GrabStatus grabPointer(boolean ownerEvents, EventMask eventMask, Window confineTo, Cursor cursor, int time)
Pointer grabs are used for operations which need complete control over mouse events, even if the mouse leaves the application. For example in GTK+ it is used for Drag and Drop, for dragging the handle in the HPaned and VPaned widgets, and for resizing columns in CList widgets.
Note that if the event mask of an X window has selected both button press and button release events, then a button press event will cause an automatic pointer grab until the button is released. X does this automatically since most applications expect to receive button press and release events in pairs. It is equivalent to a pointer grab on the window with ownerEvents set to true.
ownerEvents
- if false then all pointer events are reported with respect to
window and are only reported if selected by event_mask. If
true then pointer events for this application are reported as
normal, but pointer events outside this application are
reported with respect to window and only if selected by
event_mask. In either mode, unreported events are discarded.eventMask
- specifies the event mask, which is used in accordance with
ownerEvents. Note that only pointer events (i.e. button and
motion events) may be selected.confineTo
- If non-null, the pointer will be confined to this window
during the grab. If the pointer is outside confineTo, it will
automatically be moved to the closest edge of confineTo and
enter and leave events will be generated as necessary.cursor
- the cursor to display while the grab is active. If this is
null then the normal cursors are used for window and its
descendants, and the cursor for window is used for all other
windows.time
- the timestamp of the event which led to this pointer grab.
This usually comes from a EventButton, though CURRENT_TIME can
be used if the time isn't known.public void ungrabPointer(int time)
time
- public boolean pointerIsGrabbed()
public GrabStatus grabKeyboard(boolean ownerEvents, int time)
ownerEvents
- if false then all keyboard events are reported with respect to
window. If true then keyboard events for this application are
reported as normal, but keyboard events outside this
application are reported with respect to window. Both key
press and key release events are always reported, independant
of the event mask set by the application.time
- public void ungrabKeyboard(int time)
time
- public static org.gnu.glib.Type getType()
public static Window getWindowFromHandle(org.gnu.glib.Handle hndl)
public Window getPointerWindow()
public Point getPointerLocation()
public ModifierType getPointerModifierType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |