This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: kawa -w now Swing-based
- From: Per Bothner <per at bothner dot com>
- To: kawa at sourceware dot org
- Date: Sun, 09 Sep 2007 00:20:50 -0700
- Subject: Re: kawa -w now Swing-based
- References: <46E37F13.1020904@bothner.com>
I've added support for "printing" objects that
implement either gnu.kawa.model.Paintable or
gnu.kawa.model.Viewable. These are essentially
"painted" into a new embedded JPanel.
For example:
#|kawa:1|# (require 'swing-gui)
#|kawa:2|# (define p3 (polygon 0+0i 0+80i 150+20i))
#|kawa:3|# (vector (draw p3) (fill p3))
(Using list instead of vector is less interesting.
This is an instance of "double-dispatch" doing the
wrong thing.)
You can try cutting-and-pasting some of the expressions in:
testsuite/gui-test.scm.
--
--Per Bothner
per@bothner.com http://per.bothner.com/