Couple of questions

View: New views
5 Messages — Rating Filter:   Alert me  

Couple of questions

by srinivasan_pavan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1:   Is there any class to provide filtering in a  tree perhaps using a MutableTreeNode. I looked at 1.7 where there seemed to be a screencast of treelist but i couldn't find any documentation on it.

2: How can i programatically sort or filter  on a list.






Re: Couple of questions

by Brian Merrill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

srinivasan_pavan wrote:
> 1:   Is there any class to provide filtering in a  tree perhaps using a
> MutableTreeNode. I looked at 1.7 where there seemed to be a screencast of
> treelist but i couldn't find any documentation on it.
>  
Use the "Latest Snapshot" jar from the front page when dealing with
TreeList.  The latest snapshot is stable.  More documentation for
TreeList can be found there.
> 2: How can i programatically sort or filter  on a list.
>
>  
TreeList is not your traditional tree implementation where you have to
deal with node abstractions to define hierarchy for your data.  The
"MutableTreeNode" is handled behind the scenes so to speak so you only
have to deal with your basic data type when working with the TreeList.  
TreeList is just another list in an EventList chain or pipeline.  Each
list in an EventList pipeline represents either a transformation or
aggregation of your basic data.  Thus you might have data of type Book.

BasicEventList<Book> --> FilterList<Book> (Matcher) --> SortedList
<Book>(Comparator) --> TreeList<Book>

If you then applied a filter to your filter list, say by author name,
for example, your treeList would then automagically show only the subset
of data based upon the filter criteria that was set on the filterlist
higher up in this pipelined chain.

So from the screencasts page, I would recommend at least watching the
BasicEventList, FilterList and SortedList screencasts and then the
TreeList screencast that you found.  Each build upon the basic concepts
of Glazed Lists and having spent a bit of time on those might make
jumping into TreeList a little bit easier.  Also you can search the
mailing list for James' "Mixed Type" treelist example under the subject
"TreeList Grouping Node".  And you can find another TreeList example
here:
http://publicobject.com/glazedlistsdeveloper/screencasts/treelist/TreeListExample.java


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Couple of questions

by srinivasan_pavan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Brian,

I tried looking into the latest source at
 https://glazedlists.dev.java.net/files/documents/1073/94615/glazedlists-source_java15.zip

but i couldn't find TreeList  inside it ..


Regards,
Pavan Kumar


Re: Couple of questions

by Brian Merrill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

srinivasan_pavan wrote:

> Hi Brian,
>
> I tried looking into the latest source at
>
> https://glazedlists.dev.java.net/files/documents/1073/94615/glazedlists-source_java15.zip
>
> but i couldn't find TreeList  inside it ..
>
>
> Regards,
> Pavan Kumar
>
>
>  
How closely did you look?  It's under the extensions folder.  If you
want html javadocs, you must build them yourself by running "ant docs"
at a command prompt from wherever you unpacked the source.  Also, be
sure to have a look at the "TreeTableSupport" documentation.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Couple of questions

by srinivasan_pavan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Brian,


 My mistake for having a look at the  source folder and ignoring the  extensions folder completely.
Thanks  for pointing it out !


Regards,
Pavan Kumar S
LightInTheBox - Buy quality products at wholesale price