|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gnu.glib.GObject | +--org.gnu.gdk.Drawable | +--org.gnu.gdk.Window
TODO: wrap many methods. implement new methods like getTitle, getDimension, ... using attributes field. Look through the window events model.
Constructor Summary | |
Window(int handle)
|
|
Window(Window parent,
WindowAttr attributes,
int attributesMask)
|
Method Summary | |
void |
clear()
Clears an entire window to the background color or background pixmap. |
void |
clearArea(int x,
int y,
int width,
int height)
|
void |
destroy()
|
void |
drawLine(GC gcontext,
int x1,
int y1,
int x2,
int y2)
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawPoint(GC gcontext,
int x,
int y)
Drawing Functions |
void |
drawPoint(int x,
int y)
|
int |
getHeight()
Retrieve the current height of the Window. |
void |
getKeyboardFocus()
|
static Window[] |
getTopLevelWindows()
|
int |
getWidth()
Retrieve the current width of the Window. |
Window |
getWindowAt(int x,
int y)
Obtains the window underneath the mouse pointer, returning the location of that window in win_x, win_y. |
WindowState |
getWindowState()
|
void |
hide()
For toplevel windows, withdraws them, so they will no longer be known to the window manager; for all windows, unmaps them, so they won't be displayed. |
boolean |
isViewable()
|
boolean |
isVisible()
|
void |
lower()
|
void |
move(int x,
int y)
Repositions a window relative to its parent window. |
void |
moveAndResize(int x,
int y,
int width,
int height)
Equivalent to calling move() and resize() ,
except that both operations are performed at once, avoiding strange visual effects
(i.e. |
void |
raise()
|
void |
reparent(Window parent,
int x,
int y)
Reparents window into the given parent . |
void |
resize(int width,
int height)
Resizes window; for toplevel windows, asks the window manager to resize the window. |
void |
scrollContent(int x,
int y)
|
void |
setBitmapMask(Bitmap mask,
int x,
int y)
|
void |
setChildMask(boolean masked)
|
void |
setHint(WindowTypeHint hint)
|
void |
setRegionMask(Region region,
int x,
int y)
|
void |
setUnmanaged(boolean unmanaged)
|
void |
show()
Raises the window to the top of the window stack (moves the window to the front of the Z-order). |
void |
showUnraised()
Shows a GdkWindow onscreen, but does not modify its stacking order. |
void |
withdraw()
Withdraws a window (unmaps it and asks the window manager to forget about it). |
Methods inherited from class org.gnu.gdk.Drawable |
getClipRegion, getColormap, getDepth, getImage, getSize, getVisibleRegion, getVisual, setColormap |
Methods inherited from class org.gnu.glib.GObject |
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Window(int handle)
public Window(Window parent, WindowAttr attributes, int attributesMask)
Method Detail |
public void destroy()
public Window getWindowAt(int x, int y)
x
- X position of the window.y
- Y position of the window.
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
(i.e. 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)
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 boolean isVisible()
public boolean isViewable()
public WindowState getWindowState()
public void setHint(WindowTypeHint hint)
public void drawPoint(GC gcontext, int x, int y)
public void drawPoint(int x, int y)
public void drawLine(GC gcontext, int x1, int y1, int x2, int y2)
public void drawLine(int x1, int y1, int x2, int y2)
public static Window[] getTopLevelWindows()
public int getWidth()
public int getHeight()
|
Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |