<?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: Enable/disable entire figure window	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/disable-entire-figure-window/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disable-entire-figure-window</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Wed, 16 Jan 2019 03:29:50 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: jagadeesh		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457516</link>

		<dc:creator><![CDATA[jagadeesh]]></dc:creator>
		<pubDate>Wed, 16 Jan 2019 03:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-457516</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457181&quot;&gt;Jagadeesh&lt;/a&gt;.

Dear Yair,

Thanks for your inputs.

Our current plan is to bring a university-student into our team for internship to study the way for - what we are expected.
Also, we want the student to examine Java-events to be used for this purpose.

Parallely, we will get in touch with you for the consulting-proposal- at some suitable time soon

best regards
Jagadeesh K]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457181">Jagadeesh</a>.</p>
<p>Dear Yair,</p>
<p>Thanks for your inputs.</p>
<p>Our current plan is to bring a university-student into our team for internship to study the way for &#8211; what we are expected.<br />
Also, we want the student to examine Java-events to be used for this purpose.</p>
<p>Parallely, we will get in touch with you for the consulting-proposal- at some suitable time soon</p>
<p>best regards<br />
Jagadeesh K</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457235</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 10 Jan 2019 08:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-457235</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457234&quot;&gt;Jagadeesh&lt;/a&gt;.

Matlab figures were never meant to be reparented in this way, and there are apparently many dependencies in the built-in interaction mechanisms that break because of this. If you would like my assistance in researching this area in the hope of finding a solution, then contact me offline (altmany at gmail) for a consulting proposal. Note that I cannot promise in advance that I will be able to find a solution, because this is an area nobody has previously investigated (AFAIK).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457234">Jagadeesh</a>.</p>
<p>Matlab figures were never meant to be reparented in this way, and there are apparently many dependencies in the built-in interaction mechanisms that break because of this. If you would like my assistance in researching this area in the hope of finding a solution, then contact me offline (altmany at gmail) for a consulting proposal. Note that I cannot promise in advance that I will be able to find a solution, because this is an area nobody has previously investigated (AFAIK).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jagadeesh		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457234</link>

		<dc:creator><![CDATA[Jagadeesh]]></dc:creator>
		<pubDate>Thu, 10 Jan 2019 08:42:25 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-457234</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457181&quot;&gt;Jagadeesh&lt;/a&gt;.

Heah Yair,

I could successfully embed the Matlab-Figure into Swing&#039;s JFrame using the JLayeredPane. Thanks for this information

After getting the Figure in the Swing-JFrame: Zoom-in and Zoom-out is working sexy but Pan, Datacursor and Rotate is not working at all. Even if this works, it is inconsistent.

any possible reasons, why its so ?

Thanks once again, your input helped us a lot
regards
Jagadeesh K]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457181">Jagadeesh</a>.</p>
<p>Heah Yair,</p>
<p>I could successfully embed the Matlab-Figure into Swing&#8217;s JFrame using the JLayeredPane. Thanks for this information</p>
<p>After getting the Figure in the Swing-JFrame: Zoom-in and Zoom-out is working sexy but Pan, Datacursor and Rotate is not working at all. Even if this works, it is inconsistent.</p>
<p>any possible reasons, why its so ?</p>
<p>Thanks once again, your input helped us a lot<br />
regards<br />
Jagadeesh K</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457192</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 09 Jan 2019 10:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-457192</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457181&quot;&gt;Jagadeesh&lt;/a&gt;.

Instead of the ContentPane, I suggest that you try to reparent LayeredPane or RootPane, which are higher-up in the FigureFrame&#039;s hierarchy.

Also, it would be easier for you to debug if you reparent into a Swing JFrame rather than JavaFX - this way you can more-easily debug the Swing reparenting aspects (which are not trivial, due to the way that Matlab&#039;s menubar and toolbar interact with the figure contents), separately from the JavaFX aspects.

Finally, you may find the following relevant/interesting:
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://undocumentedmatlab.com/blog/specialized-matlab-plots#comment-81287&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://undocumentedmatlab.com/blog/specialized-matlab-plots#comment-81287&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://undocumentedmatlab.com/blog/auto-completion-widget#comment-348838&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://undocumentedmatlab.com/blog/auto-completion-widget#comment-348838&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://undocumentedmatlab.com/about/todo#comment-409770&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://undocumentedmatlab.com/about/todo#comment-409770&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/36389862/how-can-we-connect-javafx-application-with-matlab&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;https://stackoverflow.com/questions/36389862/how-can-we-connect-javafx-application-with-matlab&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457181">Jagadeesh</a>.</p>
<p>Instead of the ContentPane, I suggest that you try to reparent LayeredPane or RootPane, which are higher-up in the FigureFrame&#8217;s hierarchy.</p>
<p>Also, it would be easier for you to debug if you reparent into a Swing JFrame rather than JavaFX &#8211; this way you can more-easily debug the Swing reparenting aspects (which are not trivial, due to the way that Matlab&#8217;s menubar and toolbar interact with the figure contents), separately from the JavaFX aspects.</p>
<p>Finally, you may find the following relevant/interesting:</p>
<ul>
<li><a href="http://undocumentedmatlab.com/blog/specialized-matlab-plots#comment-81287" target="_blank" rel="nofollow">http://undocumentedmatlab.com/blog/specialized-matlab-plots#comment-81287</a></li>
<li><a href="http://undocumentedmatlab.com/blog/auto-completion-widget#comment-348838" target="_blank" rel="nofollow">http://undocumentedmatlab.com/blog/auto-completion-widget#comment-348838</a></li>
<li><a href="http://undocumentedmatlab.com/about/todo#comment-409770" target="_blank" rel="nofollow">http://undocumentedmatlab.com/about/todo#comment-409770</a></li>
<li><a href="https://stackoverflow.com/questions/36389862/how-can-we-connect-javafx-application-with-matlab" target="_blank" rel="nofollow">https://stackoverflow.com/questions/36389862/how-can-we-connect-javafx-application-with-matlab</a></li>
</ul>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jagadeesh		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457181</link>

		<dc:creator><![CDATA[Jagadeesh]]></dc:creator>
		<pubDate>Wed, 09 Jan 2019 03:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-457181</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457164&quot;&gt;Jagadeesh&lt;/a&gt;.

Hi Yair,
 
these details and articles are excellent.

I want to bring the Matlab-Figure( compiled with Javabuilder) on JavaFX-Scene 

here are the details,
&lt;code&gt;jf.fHG2Client.getWindow&lt;/code&gt; will return you - &lt;code&gt;com.mathworks.hg.peer.FigureFrameProxy$FigureFrame&lt;/code&gt; and
&lt;code&gt;get(jw,&#039;ContentPane&#039;)&lt;/code&gt; will return you - &lt;code&gt;javax.swing.JPanel&lt;/code&gt;

I can convert this JPanel to JavaFX using SwingNode.
but, when i put this JPanel on a JavaFX scene i only get a blank JPanel without the Menubar, Axes and other components.
what am i missing ?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457164">Jagadeesh</a>.</p>
<p>Hi Yair,</p>
<p>these details and articles are excellent.</p>
<p>I want to bring the Matlab-Figure( compiled with Javabuilder) on JavaFX-Scene </p>
<p>here are the details,<br />
<code>jf.fHG2Client.getWindow</code> will return you &#8211; <code>com.mathworks.hg.peer.FigureFrameProxy$FigureFrame</code> and<br />
<code>get(jw,'ContentPane')</code> will return you &#8211; <code>javax.swing.JPanel</code></p>
<p>I can convert this JPanel to JavaFX using SwingNode.<br />
but, when i put this JPanel on a JavaFX scene i only get a blank JPanel without the Menubar, Axes and other components.<br />
what am i missing ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jagadeesh		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-457164</link>

		<dc:creator><![CDATA[Jagadeesh]]></dc:creator>
		<pubDate>Tue, 08 Jan 2019 15:06:47 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-457164</guid>

					<description><![CDATA[Hi Yair,

these details are Excellent.

I need to embed a Matlab-Figure inside a JavaFX-scene.

I know that - get(f,&#039;Javaframe&#039;) returns you the com.mathworks.hg.peer.HG2FigurePeer object.

How can i add &quot;com.mathworks.hg.peer.HG2FigurePeer object&quot; into Javafx - scene ?]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>these details are Excellent.</p>
<p>I need to embed a Matlab-Figure inside a JavaFX-scene.</p>
<p>I know that &#8211; get(f,&#8217;Javaframe&#8217;) returns you the com.mathworks.hg.peer.HG2FigurePeer object.</p>
<p>How can i add &#8220;com.mathworks.hg.peer.HG2FigurePeer object&#8221; into Javafx &#8211; scene ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ashwanth Narayanaswamy		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-414010</link>

		<dc:creator><![CDATA[Ashwanth Narayanaswamy]]></dc:creator>
		<pubDate>Mon, 25 Sep 2017 17:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-414010</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-413944&quot;&gt;Yair Altman&lt;/a&gt;.

Thank you Yair!! I appreciate it!!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-413944">Yair Altman</a>.</p>
<p>Thank you Yair!! I appreciate it!!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-413944</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 24 Sep 2017 07:17:15 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-413944</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-413868&quot;&gt;Nalla Thambi&lt;/a&gt;.

@Nalla - I believe that a simple call to &lt;i&gt;&lt;b&gt;drawnow; pause(0.1)&lt;/b&gt;&lt;/i&gt; after your &lt;i&gt;&lt;b&gt;questdlg&lt;/b&gt;&lt;/i&gt; will solve the problem. See here: http://undocumentedmatlab.com/blog/solving-a-matlab-hang-problem]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-413868">Nalla Thambi</a>.</p>
<p>@Nalla &#8211; I believe that a simple call to <i><b>drawnow; pause(0.1)</b></i> after your <i><b>questdlg</b></i> will solve the problem. See here: <a href="http://undocumentedmatlab.com/blog/solving-a-matlab-hang-problem" rel="ugc">http://undocumentedmatlab.com/blog/solving-a-matlab-hang-problem</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Nalla Thambi		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-413868</link>

		<dc:creator><![CDATA[Nalla Thambi]]></dc:creator>
		<pubDate>Thu, 21 Sep 2017 21:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-413868</guid>

					<description><![CDATA[Hello Yair,

Thanks for the code enableDisableFig.m

I use this to disable the first MATLAB GUI window(figure),from which a second MATLAB GUI window is opened
once the first window is disabled, inputs are transferred to the second window
some processing is done in the second window
the outputs are passed onto the first window
the second window is then closed (deleted) 
at this point the first window is enabled again

All is well, until I introduced a questdlg in the second window
when user presses a button in second window, a question dialgue pops up, and some processing happens, according to user choices
after the questdlg pops up, it seems to trigger something and the first window gets enabled for some reason, even before i use the enabledisable.m function to enable it again
(the first window gets enabled , even while the second window is still alive-after the questdlg popsup)

Can you please comment on what I am doing wrong?

The code is as follows:
&lt;pre lang=&quot;matlab&quot;&gt;
hFig = findobj(&#039;Name&#039;,&#039;first_window&#039;);
enableDisableFig(hFig, &#039;off&#039;);

handles.outputs=second_window(handles.inputs);

hf = findobj(&#039;Name&#039;,&#039;second_window&#039;);
delete(hf);

enableDisableFig(hFig, &#039;on&#039;);
&lt;/pre&gt;

I use MATLAB R2016b

Thanks

P.s:
I also tested this a follows
1. Open a MATLAB GUI figure
2. disable it using enabledisablefig.m
3. double check if window is disabled 
3. now just type in a questdlg command in the MATLAB command window and respond to it
4. now check if the window is still disabled( now, i find that the window has gotten enabled for some reason)

Can you Please help, thanks]]></description>
			<content:encoded><![CDATA[<p>Hello Yair,</p>
<p>Thanks for the code enableDisableFig.m</p>
<p>I use this to disable the first MATLAB GUI window(figure),from which a second MATLAB GUI window is opened<br />
once the first window is disabled, inputs are transferred to the second window<br />
some processing is done in the second window<br />
the outputs are passed onto the first window<br />
the second window is then closed (deleted)<br />
at this point the first window is enabled again</p>
<p>All is well, until I introduced a questdlg in the second window<br />
when user presses a button in second window, a question dialgue pops up, and some processing happens, according to user choices<br />
after the questdlg pops up, it seems to trigger something and the first window gets enabled for some reason, even before i use the enabledisable.m function to enable it again<br />
(the first window gets enabled , even while the second window is still alive-after the questdlg popsup)</p>
<p>Can you please comment on what I am doing wrong?</p>
<p>The code is as follows:</p>
<pre lang="matlab">
hFig = findobj('Name','first_window');
enableDisableFig(hFig, 'off');

handles.outputs=second_window(handles.inputs);

hf = findobj('Name','second_window');
delete(hf);

enableDisableFig(hFig, 'on');
</pre>
<p>I use MATLAB R2016b</p>
<p>Thanks</p>
<p>P.s:<br />
I also tested this a follows<br />
1. Open a MATLAB GUI figure<br />
2. disable it using enabledisablefig.m<br />
3. double check if window is disabled<br />
3. now just type in a questdlg command in the MATLAB command window and respond to it<br />
4. now check if the window is still disabled( now, i find that the window has gotten enabled for some reason)</p>
<p>Can you Please help, thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-337835</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Mon, 17 Nov 2014 15:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=2089#comment-337835</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-337830&quot;&gt;Kris Janssen&lt;/a&gt;.

@Kris - I already answered this &lt;a href=&quot;http://undocumentedmatlab.com/blog/disable-entire-figure-window#comment-220550&quot; rel=&quot;nofollow&quot;&gt;above&lt;/a&gt;.

&lt;pre lang=&#039;matlab&#039;&gt;
jFrame = get(handle(hFig), &#039;JavaFrame&#039;);
jFrame.fHG2Client.getWindow.setEnabled(flag);
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/disable-entire-figure-window#comment-337830">Kris Janssen</a>.</p>
<p>@Kris &#8211; I already answered this <a href="http://undocumentedmatlab.com/blog/disable-entire-figure-window#comment-220550" rel="nofollow">above</a>.</p>
<pre lang='matlab'>
jFrame = get(handle(hFig), 'JavaFrame');
jFrame.fHG2Client.getWindow.setEnabled(flag);
</pre>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
