5.0

5.0 | 5 ratings Rate this file 52 Downloads (last 30 days) File Size: 66.8 KB File ID: #42946
image thumbnail

treeTable - create a sortable table control with collapsible row groups

by

 

05 Aug 2013 (Updated )

Create a sortable Java-based tree-table GUI control having collapsible/expandable data row groups

| Watch this File

File Information
Description

Syntax:
   htable = treeTable (pnContainer, headers, data, 'PropName',PropValue, ...)

Input parameters:
   pnContainer - optional handle to container uipanel or figure (default: gcf)
   headers - optional cell array of column header strings
   data - optional numeric or cell array of data values
   'PropName',PropValue - optional list of property-value pairs: Container, Headers, Data, IconFilenames, ColumnTypes, ColumnEditable, Groupable, InteractiveGrouping

   (see internal help section for details)

Output parameters:
   htable - handle to Java tree-table object

Important features:
   * Table is fully sortable (multiple columns via ctrl-click on header)
   * Table can be flat or hierarchical (grouping)
   * Interactive grouping (like in Outlook)
   * Editable drop-down (selector) option
   * Table columns are automatically resized to fit the available width
   * Table columns are rearrangeable by dragging the headers right/left
   * Table columns can be resized by dragging their divider gridlines (not just the header)
   * User-defined icons for leaf rows and grouping rows (expanded/collapsed)
   * Sample data update and row selection callbacks included; user can attach custom callbacks

Warning:
   This code heavily relies on undocumented and unsupported Matlab functionality. It works on Matlab 7+, but use at your own risk!

Bugs and suggestions:
   Please send to Yair Altman (altmany at gmail dot com)

Technical details of the implementation can be found at http://UndocumentedMatlab.com/blog/treeTable

Acknowledgements

Java Based Data Table inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
12 Mar 2014 Kim

Amazing

11 Sep 2013 Jan Simon

Dear Yair, there has been a discussion about wanted features for uitree and uitable in the forum: http://www.mathworks.com/matlabcentral/answers/24369-wanted-features-for-uitable-and-uitree
Your treeTable solves many of the problems mentioned there. I cannot imagine, why TMW hesitates to implement such powerful GUI tools by their own.

08 Aug 2013 Assaf

Wow! That's amazing. Very useful. Great job!

08 Aug 2013 Alex

This is great! One thing I noticed: When I enter "-0" in the Numeric column, it is not changed to "0". Is this intended behaviour? Also, when I move the first column, the folder symbols and labels are separated.

06 Aug 2013 Sven

Add this to the It Simply Works(TM) suite of tools.

Updates
06 Aug 2013

Added InteractiveGrouping option to enable interactive column grouping as in Microsoft Outlook

06 Aug 2013

Forgot a couple of important Java files in the previous uploads, sorry about that...

Contact us