[2561] in java-interest

home help back first fref pref prev next nref lref last post

Re: Scrolled Window

daemon@ATHENA.MIT.EDU (Ken Lee)
Wed Oct 4 16:02:30 1995

Date: Wed, 4 Oct 1995 10:28:25 -0700
From: Ken Lee <kenl@i47usfs1.nafohq.hp.com>
To: java-interest@java.sun.com
Cc: kenl@i47usfs1.nafohq.hp.com


A week ago, I posted the question, attached at the end of this mail, 
regarding scrolled window and didn't get any response.   In Alpha2, 
there was Window.scrollWindow, which was used by HotJava.  
So, my questions are:

1. Would this method be back in the next JDK beta?
2. If not, how could one implement similar behavior?


> Has anyone implemented a ScrolledWindow similar to the one
> in Motif using pre-beta API?

> The Motif ScrolledWindow, internally, used two scrollbars and
> a "clip" window. The user supplied a "work" window to it.  
> When the scrollbars are adjusted, the "work" window is adjusted 
> accordingly, and makes itself visible through the "clip" window.

> One naive way to make the work window region visible in the
> clip window would be:

> 1. make work window a child of clip window 
> 	i.e. clipWindow.add(workWindow)
> 2. reshape the work window whenever there is a scrolling event
>    i.e. // vertical scrolling
> 	workWindow.reshape(workWindow.location().x,
>                            newVerticalValue,
>                            clipWindow.size().width,
>                            clipWindow.size().height);
>         // horizontal scrolling
>         workWindow.reshape(newHorizontalValue,
>                            workWindow.location().y,
>                            clipWindow.size().width,
>                            clipWindow.size().height);

> This probably would work, but it does a lot of repainting.
> Any ideas on doing smarter clipping?

> Thank you.


Kenneth Lee
Central Station, Inc
/* I don't work for Hewlett Packard and I don't speak for the company */



-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post