« Return to Thread: Sorting TreeList

Re: Sorting TreeList

by kikonen :: Rate this Message:

Reply to Author | View in Thread

Sorting TreeList appears to be slighly tricky,

After some trial and error:

http://kari.dy.fi/src/sample/foldertree.zip
(for compile needs
http://kari.dy.fi/tigtag/dist/kui.jar
http://kari.dy.fi/tigtag/dist/log4j-1.2.14.jar
)

Problem areas:
- Special hack is needed to pass Comparator from
  TableComparatorChooser to comparator of TreeFormat
- Refreshing model after comparator change is "unclean"
  * i.e. seemingly "clear/reinsert all" was needed to
    reset internally cached model state in TreeList
    ~ ExpansionModel must cache expansion states
      of nodes correctly
- TreeList updates block EDT thread
  * Doesn't scale to 10s of thousands of elements well

--
KI


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

 « Return to Thread: Sorting TreeList