xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max R. Andersen" <...@mail1.stofanet.dk>
Subject Re: Deferred nodes and a little bit of swing :)
Date Tue, 08 Feb 2000 09:00:14 GMT

> You can send it directly to andyc@apache.org. That way
> people on the list don't need to download the changes
> which they'll get from CVS later, anyway.

Ok - i'll do that :)

> > if (asinglenode instanceof DeferredNode) {
> >         <code that should expand it>
> > }
> I wouldn't suggest doing this. In fact, there should be
> no need for instanceof DeferredNode. Your program should
> not even care that the construction is being deferred.

I also thought that in the begining but the problem is
that IF the nodes are deferred then the hasChildNodes() method returns
false even if it should have children :(

So I make the instanceof test to tell the TreeModel that it is
that the node has children.

This test is ok in my situation because the node does not need to expand
the user expands the node in the JTree - I want lazy-expansion :)


View raw message