Great idea.
-------------
John
-----Original Message-----
From: csj...@li...
[mailto:csj...@li...] On Behalf Of Toby
Donaldson
Sent: Saturday, July 09, 2005 12:28 PM
To: csj...@li...
Subject: [csjava-developer] notes on harriet release
I've been looking at the original feature list for the harriet
release, and it needs to be changed and firmed up given what has
actually been implemented in the casey version.
I think the main change in harriet should be a fundamental re-
structuring of TheMatrix. Right now, TheMatrix combines the behaviour
of a BufferedImage and a JFrame into one class. This is simple and
convenient for beginners, but it makes it awkward to do more advanced
things, such as adding your own buttons to the frame, or put the
image in some other frame in a window.
The current way around this is to use TheMatrix.getImage() to get a
reference to the BufferedImage, and then use the plain BufferedImage
as needed. This works, but the problem is that the extracted
BufferedImage lacks all the nice extra features that TheMatrix
implements for it (e.g. making copies, multiple set/get methods,
saving/loading, etc.).
So the "obvious" solution (which in fact has taken me some time to
realize as obvious) is to create a new class that extends
BufferedImage, and implements all the nifty extra methods we want for
BufferedImage. Then, we create special JFrame-derived methods for
displaying these images.
While we should be able to keep the original calling behaviour of
TheMatrix, this new design will allow calling code like this:
FancyBufferedImage im = new FancyBufferedImage("pic.jpeg");
// ... process the pixels of im without displaying it ...
show.asPlainFrame(im);
We can make as many "show" methods as we like (maybe with better names).
Any comments?
Toby
--
Dr. Toby Donaldson
School of Computing Science
Simon Fraser University (Surrey)
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar
happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by
HP,
AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
csjava-developer mailing list
csj...@li...
https://lists.sourceforge.net/lists/listinfo/csjava-developer
|