[2333] in java-interest
Scrolled Window
daemon@ATHENA.MIT.EDU (Ken Lee)
Fri Sep 29 10:22:17 1995
Date: Thu, 28 Sep 1995 16:48:41 -0700
From: Ken Lee <kenl@nafohq.hp.com>
To: java-interest@java@sun.com
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