|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.freedesktop.bindings.Pointer
org.gnome.glib.Boxed
org.gnome.gdk.Cursor
public final class Cursor
That which indicateth where your mouse is pointing!
A Cursor object must be bound to a underlying Window before [changing it]
will actually cause what the user sees to change; see
setCursor()
on the Window here in
org.gnome.gdk
.
Quite frequently you want to change the Cursor for the entire application (in a manner reminiscent of modal behaviour). This is trickier than it should be, but you've got a couple possibilities. You can either
[org.gnome.gtk]
Windows being displayed by your application and then call
getWindow().setCursor(BLAH)
on each of them, or you can
getToplevels()
on
[org.gnome.gdk]
Window and then similarly just call
setCursor(BLAH)
as you iterate over the returned set.
Almost inevitably the Cursor your want is BUSY
which is
the spinning "busy" pointer. You can revert to "normal" by setting
NORMAL
directly (which is the default cursor you
spend most of your time looking at), or by passing null
to
setCursor()
.
Note that different theme engines (let alone different Linux vendors) tend to screw with the default pointer icons set quite a bit, so you may find that pointers appear very different for users on different distributions.
Our implementation of Cursor assumes you want to manipulate
GdkCursors
on the "default" GdkDisplay
. Where
else would you be working?
Field Summary | |
---|---|
static Cursor |
BUSY
The spinning cursor showing that the application is busy (and unable to be responsive to user input). |
static Cursor |
LINK
A pointer indicating that a hyperlink can be clicked and followed. |
static Cursor |
NORMAL
The normal left-hand pointer. |
static Cursor |
TEXT
The vertical bar pointer used in text entry Widgets such as Entry and TextView. |
static Cursor |
WORKING
A pointer that also has a busy spinner. |
Constructor Summary | |
---|---|
Cursor(CursorType type)
Create a new Cursor with the specified CursorType. |
Method Summary |
---|
Methods inherited from class org.freedesktop.bindings.Pointer |
---|
toString |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Cursor BUSY
This is type WATCH
.
public static final Cursor LINK
This is type HAND2
.
public static final Cursor NORMAL
This is a type LEFT_PTR
.
public static final Cursor TEXT
This is type XTERM
.
public static final Cursor WORKING
This is "left_ptr_watch"
from the cursor theme.
Constructor Detail |
---|
public Cursor(CursorType type)
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |