Article View: borland.public.jbuilder.java.api
Article #3097Re: 'application-modal' cursor?
From: Torsten Welches
Date: Sat, 02 May 1998 00:00
Date: Sat, 02 May 1998 00:00
39 lines
1819 bytes
1819 bytes
On Thu, 30 Apr 1998 15:26:57 -0700, Rich Wilkman
<rwilkman@corp.borland.com> wrote:
>You'll have to apply it on a component by component basis. If you do
>it on the Frame, only "empty space" on the Frame would get the
>message. If you're using BorderLayout and have all the space filled,
>it wouldn't work.
Rich,
thanks for your reply. I did what you suggested and wrote a method
like that:
private void setCursorAll(Container container, Cursor cursor) {
for (int i = 0; i < container.getComponentCount(); i++) {
if (container.getComponent(i) instanceof Container) {
//call us recursivly
setCursorAll((Container)container.getComponent(i), cursor);
}
container.getComponent(i).setCursor(cursor);
}
}
Setting everything to WAIT_CURSOR is easy - passing the frame as first
parameter. But I don't see a way back: re-setting all component's
cursor to their individual default.
There's just no Component.getDefaultCursor(), only
Cursor.getDefaultCursor() which e.g. doesn't fit for editfields
(default: TEXT_CURSOR).
Any ideas other than hardcoding all the possible component types with
their matching default cursors?
Thanks for your time!
Torsten
-------
please remove '.NO_SPAM' from e-mail adress to contact me outside the newsgroups
Technical Details
Message-ID:
<354a637d.975011@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3548b5f2.16008549@forums.borland.com> <3548FAB1.4FCED55E@corp.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,bc31dbc8cc333df X-Google-Attributes: gid1089d0,public From: torsten.welches@netcologne.de.NO_SPAM (Torsten Welches) Subject: Re: 'application-modal' cursor? Date: 1998/05/02 Message-ID: <354a637d.975011@forums.borland.com> X-Deja-AN: 349471894 References: <3548b5f2.16008549@forums.borland.com> <3548FAB1.4FCED55E@corp.borland.com> Organization: debis Systemhaus Newsgroups: borland.public.jbuilder.java.api