Hierarchical Tree View [KINDA LONG...]

Ali Chamas alichamas at yahoo.com
Thu Dec 2 00:12:48 UTC 1999


--0-1649760492-944093568=:378
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


Hi Stewart,

--- Stewart MacLean <stewart.maclean at nzhis.govt.nz>
wrote:
> Hi Ali,
> 
> I have found this view very useful in VisualWorks in
> the
> form of the WorkspaceOrganizer. I have ported it to
> VisualAge and was intending to port it to Squeak as
> soon
> as I got up to speed with Morphic.
> 
> However there is no point in reinventing the wheel
> so I was
> wondering how your TreeView was comming on and
> whether it was
> close to release?

Here's a breakdown of my TreeGold project, it's kind
of long, but i hope it might be some help for your
project, or just to know what i'm working on (plus a
GIF screen snap):

[MODEL] The tree started with a simple <TreeNode>
class whose instances linked together forming a
hierarchical data tree. Each node had a tag, type, and
data attribute which meant you could do deep recursive
searches of individual tags, or node family types.
Each node could also hold any object within it's data
collection (so you could create your structure, and
then "clip" objects to nodes of your tree).

This data tree was supported by a <TreeParser> class
which could break the tree down into text format
(although now in Smalltalk, it would be binary to
support the objects held in the data attribute), and
then create a new tree from a read source.

[VIEW] Then came the <TreeView> class which would
compute the view in a virtual canvas (only in a
geometric sense of spacial and graphical association),
which meant that it could be drawn to screen, or
printed. When drawing to screen, an view origin, and
clipping rect were used.

[CONTROLLER] In the grand MVC tradition, there was
also a <TreeController> to handle interactivity, and
user feedback to the view.

Some general features were:
* Each node held a "show children" boolean which
related to the TreeView computing the view, and for
shallow node recursive searches.
* The TreeView would hold bitmap association with
particular node tags or types so that a family of
nodes would be drawn with "this" graphic, and another
family would be drawn with "that" graphic, plus "this"
particular node would draw with "that" graphic.
* The tree computes the stems of the tree as well,
which is also configurable graphically.
* The view is spaced dynamically, so that if you were
using large icons for one node type, and small for
another, the view would be spaced neatly (same for the
collapse/expand icons size).
* The tag of the node was drawn next to the node in
the view.
* The view supported row padding so that you create
space between node rows (the stems still reached).

I myself have been getting up to speed with Morphic,
and plan to do this project using true Morphic
components so that you could bring up a halo on any
visual component. It shouldn't be too long now (...),
there are so many things i want to do with Squeak, so
little hours, especially when your day job is
programming...:\

Sorry for the lengthy mail, but your interest was
welcomed!

I'll post it here as soon as it's ready.

Cheers,
Ali.
__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one place.
Yahoo! Shopping: http://shopping.yahoo.com
--0-1649760492-944093568=:378
Content-Type: text/plain; name="treeSnap.zip"
 ; x-mac-type="705A4950"
 ; x-mac-creator="705A4950"
Content-Disposition: attachment; filename="treeSnap.zip"
Content-Transfer-Encoding: imap_stub

0,1912,2,82696,0,

--0-1649760492-944093568=:378--





More information about the Squeak-dev mailing list