<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>uitable report &#8211; Undocumented Matlab</title>
	<atom:link href="https://undocumentedmatlab.com/articles/tag/uitable-report/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Mon, 23 Nov 2020 16:40:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>Uitable customization report</title>
		<link>https://undocumentedmatlab.com/articles/uitable-customization-report?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=uitable-customization-report</link>
					<comments>https://undocumentedmatlab.com/articles/uitable-customization-report#comments</comments>
		
		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 03 Aug 2011 18:00:25 +0000</pubDate>
				<category><![CDATA[GUI]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Medium risk of breaking in future versions]]></category>
		<category><![CDATA[Stock Matlab function]]></category>
		<category><![CDATA[Undocumented feature]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internal component]]></category>
		<category><![CDATA[JIDE]]></category>
		<category><![CDATA[uitable]]></category>
		<category><![CDATA[uitable report]]></category>
		<category><![CDATA[uitools]]></category>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2396</guid>

					<description><![CDATA[<p>Matlab's uitable can be customized in many different ways. A detailed report explains how. </p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/uitable-customization-report">Uitable customization report</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/uitable-sorting" rel="bookmark" title="Uitable sorting">Uitable sorting </a> <small>Matlab's uitables can be sortable using simple undocumented features...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/uitable-cell-colors" rel="bookmark" title="Uitable cell colors">Uitable cell colors </a> <small>A few Java-based customizations can transform a plain-looking data table into a lively colored one. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/treetable" rel="bookmark" title="treeTable">treeTable </a> <small>A description of a sortable, groupable tree-table control that can be used in Matlab is provided. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-toolstrip-part-3-basic-customization" rel="bookmark" title="Matlab toolstrip – part 3 (basic customization)">Matlab toolstrip – part 3 (basic customization) </a> <small>Matlab toolstrips can be created and customized in a variety of ways. ...</small></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>In last week&#8217;s report about <a target="_blank" href="/articles/uitable-sorting/"><i><b>uitable</b></i> sorting</a>, I offered a report that I have written which covers <i><b>uitable</b></i> customization in detail. Several people have asked for more details about the contents of this report. This is a reasonable request, and so in today&#8217;s post I will discuss in a bit more detail the highlights of what can be achieved to customize Matlab <i><b>uitable</b></i>s. For the fine details, well, <a target="_blank" rel="nofollow" href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&#038;business=altmany@gmail.com&#038;currency_code=USD&#038;amount=29&#038;return=&#038;item_name=Matlab-uitable-report">get my uitable report</a> (45 pages PDF, $29).</p>
<h3 id="Introduction">1. Introduction</h3>
<p>Here I discuss the evolution of the <i><b>uitable</b></i> control over the past decade, from its initially semi-documented status to today. I explain the similarities and differences between the control&#8217;s versions and explain how they can both be accessed today.</p>
<p>I also provide references to online resources for both Matlab&#8217;s <i><b>uitable</b></i>&#8216;s underlying Java components, as well as multiple alternatives using different technologies, that have been used and reported over the years.</p>
<h3 id="Customization">2. Customizing uitable</h3>
<p>In this section I explore the sub-component hierarchy of the <i><b>uitable</b></i> controls. I show how the scrollbar sub-components can be accessed (this will be used in section 4 below), as well as the table header and data grid. This is the entry point for uitable customization.<br />
<center><figure style="width: 312px" class="wp-caption aligncenter"><img decoding="async" alt="annotated uitable sub-components" src="https://undocumentedmatlab.com/images/uitable_new2b.png" title="annotated uitable sub-components" width="312" /><figcaption class="wp-caption-text">annotated <i><b>uitable</b></i> sub-components</figcaption></figure></center></p>
<p>I explain how individual cells can be modified without requiring the entire data set to be updated. This is very important in large data sets, to prevent flicker and improve performance.</p>
<p>I show how HTML can be used to format data cell contents (even images) and tooltips:<br />
<center><figure style="width: 249px" class="wp-caption aligncenter"><img decoding="async" alt="uitable with HTML cell contents and tooltip" src="https://undocumentedmatlab.com/images/uitable2.png" title="uitable with HTML cell contents and tooltip" width="249" /><figcaption class="wp-caption-text"><i><b>uitable</b></i> with HTML cell contents and tooltip</figcaption></figure></center><br />
<center><figure style="width: 289px" class="wp-caption aligncenter"><img decoding="async" alt="uitable with cell images" src="https://undocumentedmatlab.com/images/uitable_images.png" title="uitable with cell images" width="289" /><figcaption class="wp-caption-text"><i><b>uitable</b></i> with cell images</figcaption></figure></center></p>
<h3 id="Callbacks">3. Cell renderers and cell editors</h3>
<p>This section explains the role of the cell-renderer in the visual appearance of the cell, and of cell-editors in the way that cells interact with the user for data modification. I explain such customizations from the simple (setting a column&#8217;s background color) to the complex (cell-specific tooltips and colors; color-selection cell-editor):<br />
<center><br />
<figure style="width: 590px" class="wp-caption aligncenter"><img decoding="async" alt="uitable with a non-standard cell-renderer" src="https://undocumentedmatlab.com/images/uitable_colored.png" title="uitable with a non-standard cell-renderer" width="590" /><figcaption class="wp-caption-text"><i><b>uitable</b></i> with a non-standard cell-renderer</figcaption></figure><br />
<figure style="width: 580px" class="wp-caption aligncenter"><img decoding="async" alt="uitable with a non-standard cell-renderer" src="https://undocumentedmatlab.com/images/uitable5b.png" title="uitable with a non-standard cell-renderer" width="288" /><img decoding="async" alt="uitable with a non-standard cell-editor" src="https://undocumentedmatlab.com/images/uitable_lookup.png" title="uitable with a non-standard cell-editor" width="280" /><figcaption class="wp-caption-text"><i><b>uitable</b></i> with a non-standard cell-renderer (left) and cell-editor (right)</figcaption></figure><br />
<figure style="width: 308px" class="wp-caption aligncenter"><img decoding="async" alt="uitable with custom CellRenderer and CellEditor" src="https://undocumentedmatlab.com/images/ColorCellEditor_Renderer.png" title="uitable with custom CellRenderer and CellEditor" width="308" /><figcaption class="wp-caption-text"><i><b>uitable</b></i> with custom CellRenderer and CellEditor</figcaption></figure></center><br />
Cell renderers can also be used to set custom text format of cell contents and cell-specific tooltips (note the top table in the following screenshot):<br />
<center><figure style="width: 605px" class="wp-caption aligncenter"><img decoding="async" alt="uitable with custom CellRenderers (note text formats and cell-specific tooltips)" src="https://undocumentedmatlab.com/images/Backtesting-results.png" title="uitable with custom CellRenderers (note text formats and cell-specific tooltips)" width="605" /><figcaption class="wp-caption-text"><i><b>uitable</b></i> with custom CellRenderers (note text formats and cell-specific tooltips)</figcaption></figure></center><br />
(also note the colored table headers in the bottom table)</p>
<h3 id="Callbacks">4. Table callbacks</h3>
<p>This section of my uitable report presents the different callback properties that are settable in the old and new <i><b>uitable</b></i>, for events such as cell selection, data modification, key press, and mouse click. The discussion includes a working code example for validating user input and reverting invalid edits. </p>
<p>The section also includes a discussion of how to avoid and overcome problems that may occur with the callback execution.</p>
<h3 id="Scrollbars">5. Customizing scrollbars, column widths and selection behavior</h3>
<p>This section explains how to control the scrollbars behavior. For example, hiding the horizontal (bottom) scrollbar, automatically displaying it when the data width is larger than the table width. I also show how to control the column widths.</p>
<p>I then show how to customize the data selection policy: Can multiple cells be selected? perhaps only one cell at a time? or maybe a single large interval of cells? &#8211; this is all customizable. I then explain how the selection can be done and accessed programmatically.</p>
<p>Ever wanted to set the cursor on cell A1 after some system event has occurred? &#8211; this will show you how to do it.<br />
Ever wanted to use non-standard selection colors (background/foreground)? &#8211; this can also be done.</p>
<h3 id="Sorting">6. Data sorting</h3>
<p>Table sorting was discussed in last week&#8217;s <a target="_blank" href="/articles/uitable-sorting/">article</a>. This section expands on that article, and explains how the sorting can be customized, controlled, and accessed programmatically, and how sorted rows can be retrieved by the user.<br />
<center><figure style="width: 260px" class="wp-caption aligncenter"><img decoding="async" alt="Multi-column sorting with blue sort-order numbers" src="https://undocumentedmatlab.com/images/JIDE_Table_sort3a.png" title="Multi-column sorting with blue sort-order numbers" width="260" /><figcaption class="wp-caption-text">Multi-column sorting with blue sort-order numbers</figcaption></figure></center></p>
<h3 id="Filtering">7. Data filtering</h3>
<p>Data filtering is the ability to filter only a specified sub-set of rows for display (just like in Excel). This section explains how to do it (it&#8217;s so easy!).<br />
<center><figure style="width: 408px" class="wp-caption aligncenter"><img decoding="async" alt="uitable data filtering" src="https://undocumentedmatlab.com/images/004x013b.png" title="uitable data filtering" width="408" /><figcaption class="wp-caption-text"><i><b>uitable</b></i> data filtering</figcaption></figure></center></p>
<h3 id="JIDE">8. JIDE customizations</h3>
<p>The new <i><b>uitable</b></i> is based on an underlying JIDE table. This section explains how we can use this to our advantage for some simple and useful. Customization.</p>
<p>For example: have you wondered some time why is it that columns can only be resized by dragging the tiny divider in the table header? Why can&#8217;t the columns and rows be resized by dragging the grid lines? Well, it turns out that they can, with just a tiny bit of JIDE magic powder, explained here:<br />
<center><figure style="width: 260px" class="wp-caption aligncenter"><img decoding="async" alt="Resizing columns" src="https://undocumentedmatlab.com/images/004x014.png" title="Resizing columns" width="260" /><figcaption class="wp-caption-text">Resizing columns</figcaption></figure></center><br />
Similarly, this section explains how we can use JIDE to merge together adjacent cells:<br />
<center><figure style="width: 260px" class="wp-caption aligncenter"><img decoding="async" alt="Example of two table cell-spans (1x2 and 2x2)" src="https://undocumentedmatlab.com/images/004x016.png" title="Example of two table cell-spans (1x2 and 2x2)" width="260" /><figcaption class="wp-caption-text">Example of two table cell-spans (1x2 and 2x2)</figcaption></figure></center></p>
<p>I also show how to attach a custom context-menu (right-click menu) to the table header row:<br />
<center><figure style="width: 255px" class="wp-caption aligncenter"><img decoding="async" alt="Custom header-row context-menu" src="https://undocumentedmatlab.com/images/uitable_table_header.png" title="Custom header-row context-menu" width="255" /><figcaption class="wp-caption-text">Custom header-row context-menu</figcaption></figure></center></p>
<h3 id="Structure">9. Controlling the table structure (adding/removing rows)</h3>
<p>This section discusses the matter of dynamically adding and removing table rows. While this is easy to do in the old <i><b>uitable</b></i>, this is unfortunately not the case in the new <i><b>uitable</b></i>.</p>
<h3 id="Performance">10. Run-time performance</h3>
<p>This section discusses ways to improve the run-time performance (speed) of <i><b>uitable</b></i>, both new and old. For additional information regarding run-time performance, refer to my book &#8220;<a href="https://undocumentedmatlab.com/books/matlab-performance" target="_blank"><b>MATLAB Performance Tuning</b></a>&#8220;.</p>
<h3 id="Final">11. Final remarks</h3>
<p>Here I present a workaround for a long-time table bug. Also, I present my <i><b>createTable</b></i> utility that wraps table creation in Matlab:<br />
<center><figure style="width: 597px" class="wp-caption aligncenter"><img decoding="async" alt="createTable utility screenshot (note the action buttons, sortable columns, and customized CellEditor)" src="https://undocumentedmatlab.com/images/table.png" title="createTable utility screenshot (note the action buttons, sortable columns, and customized CellEditor)" width="597" /><figcaption class="wp-caption-text"><i><b>createTable</b></i> utility screenshot (note the action buttons, sortable columns, and customized CellEditor)</figcaption></figure></center></p>
<h3 id="JIDE-Grids">Appendix – JIDE Grids</h3>
<p>Finally, this appendix presents an overview of the wide array of components provided by JIDE and available in Matlab. <i><b>uitable</b></i> uses only one of these components (the <code>SortableTable</code>). In fact, there are many more such controls that we can use in our GUIs.</p>
<p>These include a wide selection of combo-box (drop-down) controls &#8211; calculator, file/folder selection, date selection, color selection, multi-elements selection etc.<br />
<center><figure style="width: 200px" class="wp-caption aligncenter"><img decoding="async" alt="Date selection comb-box" src="https://undocumentedmatlab.com/images/JIDE_DateComboBox.png" title="Date selection combo-box" width="200" /><figcaption class="wp-caption-text">Date selection combo-box</figcaption></figure></center></p>
<p>In addition, a very wide selection of lists, trees and table types is available.<br />
<center><figure style="width: 342px" class="wp-caption aligncenter"><img decoding="async" alt="TreeTable example" src="https://undocumentedmatlab.com/images/treeTable_InteractiveGrouping.jpg" title="TreeTable example" width="342" /><figcaption class="wp-caption-text">TreeTable example</figcaption></figure></center></p>
<p>Also included is a set of specialized editbox controls for accepting IP addresses and credit card numbers:<br />
<center><figure style="width: 350px" class="wp-caption aligncenter"><img decoding="async" alt="IP address entry box" src="https://undocumentedmatlab.com/images/JIDE_IPTextField.png" title="IP address entry box" width="100" /><img decoding="async" alt="credit-card entry box" src="https://undocumentedmatlab.com/images/JIDE_CreditCard_invalid.png" title="credit-card entry box" width="100" /><img decoding="async" alt="credit-card entry box" src="https://undocumentedmatlab.com/images/JIDE_CreditCard_Visa.png" title="credit-card entry box" width="100" /><figcaption class="wp-caption-text">IP address and credit-card entry boxes</figcaption></figure></center></p>
<p>While not explaining all these controls in detail (this could take hundreds of pages), this section does say a few words on each of them, and includes links to online resources for further exploration.</p>
<p>The post <a rel="nofollow" href="https://undocumentedmatlab.com/articles/uitable-customization-report">Uitable customization report</a> appeared first on <a rel="nofollow" href="https://undocumentedmatlab.com">Undocumented Matlab</a>.</p>
<div class='yarpp-related-rss'>
<h3>Related posts:</h3><ol>
<li><a href="https://undocumentedmatlab.com/articles/uitable-sorting" rel="bookmark" title="Uitable sorting">Uitable sorting </a> <small>Matlab's uitables can be sortable using simple undocumented features...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/uitable-cell-colors" rel="bookmark" title="Uitable cell colors">Uitable cell colors </a> <small>A few Java-based customizations can transform a plain-looking data table into a lively colored one. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/treetable" rel="bookmark" title="treeTable">treeTable </a> <small>A description of a sortable, groupable tree-table control that can be used in Matlab is provided. ...</small></li>
<li><a href="https://undocumentedmatlab.com/articles/matlab-toolstrip-part-3-basic-customization" rel="bookmark" title="Matlab toolstrip – part 3 (basic customization)">Matlab toolstrip – part 3 (basic customization) </a> <small>Matlab toolstrips can be created and customized in a variety of ways. ...</small></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://undocumentedmatlab.com/articles/uitable-customization-report/feed</wfw:commentRss>
			<slash:comments>81</slash:comments>
		
		
			</item>
	</channel>
</rss>
