<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: Customizing uitree nodes &#8211; part 2	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=customizing-uitree-nodes-2</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Fri, 31 May 2019 01:05:19 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-479809</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 31 May 2019 01:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-479809</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-479704&quot;&gt;Yuriy&lt;/a&gt;.

Yuriy - I do not understand your question]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-479704">Yuriy</a>.</p>
<p>Yuriy &#8211; I do not understand your question</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yuriy		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-479704</link>

		<dc:creator><![CDATA[Yuriy]]></dc:creator>
		<pubDate>Thu, 30 May 2019 11:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-479704</guid>

					<description><![CDATA[Hello!! Please help me deal with the matlab. You have a very useful article, but is it possible to implement setting the flag in the tree for uifigure using javacomponent or uitree ???]]></description>
			<content:encoded><![CDATA[<p>Hello!! Please help me deal with the matlab. You have a very useful article, but is it possible to implement setting the flag in the tree for uifigure using javacomponent or uitree ???</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-415343</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 22 Oct 2017 06:39:14 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-415343</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-415242&quot;&gt;Paul M.&lt;/a&gt;.

@Paul - you can check each node&#039;s &lt;b&gt;SelectionState&lt;/b&gt; property value, and you can compare it to &lt;code&gt;com.mathworks.mwswing.checkboxtree.SelectionState.SELECTED&lt;/code&gt;, &lt;code&gt;.NOT_SELECTED&lt;/code&gt; or &lt;code&gt;.MIXED&lt;/code&gt;. For example:
&lt;pre lang=&quot;matlab&quot;&gt;if jRoot.getSelectionState == com.mathworks.mwswing.checkboxtree.SelectionState.NOT_SELECTED, ...&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-415242">Paul M.</a>.</p>
<p>@Paul &#8211; you can check each node&#8217;s <b>SelectionState</b> property value, and you can compare it to <code>com.mathworks.mwswing.checkboxtree.SelectionState.SELECTED</code>, <code>.NOT_SELECTED</code> or <code>.MIXED</code>. For example:</p>
<pre lang="matlab">if jRoot.getSelectionState == com.mathworks.mwswing.checkboxtree.SelectionState.NOT_SELECTED, ...</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Paul M.		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-415242</link>

		<dc:creator><![CDATA[Paul M.]]></dc:creator>
		<pubDate>Fri, 20 Oct 2017 17:26:33 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-415242</guid>

					<description><![CDATA[Excellent tutorial,

I am using the Matlab built in class (com.mathworks.mwswing.checkboxtree.CheckBoxTree), how do I get a list of which nodes have the check box marked?

If I use:
&lt;pre lang=&quot;matlab&quot;&gt;
jCheckBoxTree.getSelectionPaths()
&lt;/pre&gt;
...from the built-in class example I get a list of the highlighted nodes, not the checked ones.

-Thanks]]></description>
			<content:encoded><![CDATA[<p>Excellent tutorial,</p>
<p>I am using the Matlab built in class (com.mathworks.mwswing.checkboxtree.CheckBoxTree), how do I get a list of which nodes have the check box marked?</p>
<p>If I use:</p>
<pre lang="matlab">
jCheckBoxTree.getSelectionPaths()
</pre>
<p>&#8230;from the built-in class example I get a list of the highlighted nodes, not the checked ones.</p>
<p>-Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andreas Horn		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-405633</link>

		<dc:creator><![CDATA[Andreas Horn]]></dc:creator>
		<pubDate>Sat, 29 Apr 2017 15:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-405633</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-405630&quot;&gt;Andreas Horn&lt;/a&gt;.

… found a solution: 
&lt;pre lang=&quot;matlab&quot;&gt;set(nodeFile(qq),&#039;SelectionState&#039;,SelectionState.SELECTED);&lt;/pre&gt;

However, this unfortunately does not update the parent selection boxes. Is there any method to re-validate the whole selection state of the jtree?

Thanks so much!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-405630">Andreas Horn</a>.</p>
<p>… found a solution: </p>
<pre lang="matlab">set(nodeFile(qq),'SelectionState',SelectionState.SELECTED);</pre>
<p>However, this unfortunately does not update the parent selection boxes. Is there any method to re-validate the whole selection state of the jtree?</p>
<p>Thanks so much!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andreas Horn		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-405630</link>

		<dc:creator><![CDATA[Andreas Horn]]></dc:creator>
		<pubDate>Sat, 29 Apr 2017 15:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-405630</guid>

					<description><![CDATA[Dear Yair,

this is an incredibly cool resource as all your stuff.

I&#039;m using the &lt;code&gt;com.mathworks.mwswing.checkboxtree.DefaultCheckBoxNode&lt;/code&gt; and would like to set the state of the check boxes programmatically. 

I know the &lt;i&gt;getSelectionState&lt;/i&gt; property that works fine for me.
However, &lt;i&gt;setSelectionState&lt;/i&gt; method does not:

&lt;pre lang=&quot;matlab&quot;&gt;
&gt;&gt; jBox.setSelectionState(true)
No method &#039;setSelectionState&#039; with matching signature found for class &#039;com.mathworks.mwswing.checkboxtree.DefaultCheckBoxNode&#039;.
&lt;/pre&gt;

Any ideas?
Thanks so much!]]></description>
			<content:encoded><![CDATA[<p>Dear Yair,</p>
<p>this is an incredibly cool resource as all your stuff.</p>
<p>I&#8217;m using the <code>com.mathworks.mwswing.checkboxtree.DefaultCheckBoxNode</code> and would like to set the state of the check boxes programmatically. </p>
<p>I know the <i>getSelectionState</i> property that works fine for me.<br />
However, <i>setSelectionState</i> method does not:</p>
<pre lang="matlab">
>> jBox.setSelectionState(true)
No method 'setSelectionState' with matching signature found for class 'com.mathworks.mwswing.checkboxtree.DefaultCheckBoxNode'.
</pre>
<p>Any ideas?<br />
Thanks so much!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374777</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 21 Apr 2016 10:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-374777</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374728&quot;&gt;KhRaIf&lt;/a&gt;.

@KhRaIf - there are several ways in which you can speed up your Matlab code. In general, you need to run the Profiler and see where the performance hotspot is, and try to optimize that. One general idea that could help is to create the tree model first, and only then to attach it to the tree, rather than updating a visible tree one node at a time (which is much slower since the tree needs to refresh after each update). Also, updating an invisible tree is faster than a visible one - you can make it visible when it is ready.

If you still need additional assistance, email me for private consulting.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374728">KhRaIf</a>.</p>
<p>@KhRaIf &#8211; there are several ways in which you can speed up your Matlab code. In general, you need to run the Profiler and see where the performance hotspot is, and try to optimize that. One general idea that could help is to create the tree model first, and only then to attach it to the tree, rather than updating a visible tree one node at a time (which is much slower since the tree needs to refresh after each update). Also, updating an invisible tree is faster than a visible one &#8211; you can make it visible when it is ready.</p>
<p>If you still need additional assistance, email me for private consulting.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374776</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 21 Apr 2016 10:00:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-374776</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-373253&quot;&gt;Daniel&lt;/a&gt;.

@Daniel - try to use the parent&#039;s &lt;b&gt;Children&lt;/b&gt; property, as in: &lt;code&gt;numel(hParent.Children)&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-373253">Daniel</a>.</p>
<p>@Daniel &#8211; try to use the parent&#8217;s <b>Children</b> property, as in: <code>numel(hParent.Children)</code></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374775</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 21 Apr 2016 09:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-374775</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374621&quot;&gt;ACenTe&lt;/a&gt;.

@ACenTe - this would probably require creating a custom CellRenderer class in Java. Email me for private consulting on this if you are interested.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374621">ACenTe</a>.</p>
<p>@ACenTe &#8211; this would probably require creating a custom CellRenderer class in Java. Email me for private consulting on this if you are interested.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: KhRaIf		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-uitree-nodes-2#comment-374728</link>

		<dc:creator><![CDATA[KhRaIf]]></dc:creator>
		<pubDate>Wed, 20 Apr 2016 14:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=1850#comment-374728</guid>

					<description><![CDATA[Hi Yair,
A big respect for you and your website. Really helpfull!

I have a question regarding the uitree/uitreenode and if it is possible to speed up the process. I have built my tree using uitreenode, and the user can have several filters. Because I have more then 1e4 elements, it takes quite a while filter everytime. For the time being, I do it using the following workflow:
&lt;pre lang=&quot;matlab&quot;&gt;
for k=1:NumberOfElements
   Check_if_Filter_Satisfied;
   New_Node = uitreenode;
   MyTree.add = Node ;
end
&lt;/pre&gt;
this is taking too much time. 
Is there a possibility to speed up things? Maybe by extracting a small tree from a larger tree?
Thanks in advance,]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,<br />
A big respect for you and your website. Really helpfull!</p>
<p>I have a question regarding the uitree/uitreenode and if it is possible to speed up the process. I have built my tree using uitreenode, and the user can have several filters. Because I have more then 1e4 elements, it takes quite a while filter everytime. For the time being, I do it using the following workflow:</p>
<pre lang="matlab">
for k=1:NumberOfElements
   Check_if_Filter_Satisfied;
   New_Node = uitreenode;
   MyTree.add = Node ;
end
</pre>
<p>this is taking too much time.<br />
Is there a possibility to speed up things? Maybe by extracting a small tree from a larger tree?<br />
Thanks in advance,</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
