🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #3100

Re: 'application-modal' cursor?

#3100
From: Rich Wilkman
Date: Mon, 04 May 1998 00:00
69 lines
2964 bytes
Torsten:

I guess I'd add a toggleCursor() mechanism to my components (or roll
my own containers and place it there).  Then you could just call that
method with an int parameter that simply means change to CursorX.

Or, you could add a defaultCuror property to the components yourself.

Or you could live with the cursor being wrong initially and use a
mouseEntered event on the text components to reset the cursor.

-Rich

Torsten Welches wrote:
> 
> 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

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <354DFB43.79A8D94F@corp.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3548b5f2.16008549@forums.borland.com> <3548FAB1.4FCED55E@corp.borland.com> <354a637d.975011@forums.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: Rich Wilkman <rwilkman@corp.borland.com>
Subject: Re: 'application-modal' cursor?
Date: 1998/05/04
Message-ID: <354DFB43.79A8D94F@corp.borland.com>
X-Deja-AN: 350164391
Content-Transfer-Encoding: 7bit
References: <3548b5f2.16008549@forums.borland.com> <3548FAB1.4FCED55E@corp.borland.com> <354a637d.975011@forums.borland.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.api