<?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: Figure toolbar customizations</title> <atom:link href="http://undocumentedmatlab.com/blog/figure-toolbar-customizations/feed/" rel="self" type="application/rss+xml" /><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/</link> <description>Charting Matlab's unsupported hidden underbelly</description> <lastBuildDate>Fri, 18 May 2012 13:56:51 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1.1</generator> <item><title>By: Aris</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-65372</link> <dc:creator>Aris</dc:creator> <pubDate>Mon, 12 Dec 2011 18:07:20 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-65372</guid> <description>@JP
How exactly do you adjust the height?
Did you by any chance find a solution for the width?
Thanks!</description> <content:encoded><![CDATA[<p>@JP<br
/> How exactly do you adjust the height?<br
/> Did you by any chance find a solution for the width?<br
/> Thanks!</p> ]]></content:encoded> </item> <item><title>By: JP</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-41706</link> <dc:creator>JP</dc:creator> <pubDate>Wed, 27 Apr 2011 21:38:37 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-41706</guid> <description>I have a GUI that has an axes that fills the bottom left 1/4 of the window.  I would like the toolbar to be directly above the axes, but not spill over into the content on the right half of the window.</description> <content:encoded><![CDATA[<p>I have a GUI that has an axes that fills the bottom left 1/4 of the window.  I would like the toolbar to be directly above the axes, but not spill over into the content on the right half of the window.</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-41704</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Wed, 27 Apr 2011 21:28:52 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-41704</guid> <description>@JP - I don&#039;t know of an easy way to reduce the toolbar&#039;s width. Why do you wish to do this?To remove the docking icon, simply use the fully-documented &lt;b&gt;DockControls&lt;/b&gt; property of the figure:
&lt;pre lang=&#039;matlab&#039;&gt;set(gcf,&#039;DockControls&#039;,&#039;off&#039;)&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>@JP &#8211; I don&#8217;t know of an easy way to reduce the toolbar&#8217;s width. Why do you wish to do this?</p><p>To remove the docking icon, simply use the fully-documented <b>DockControls</b> property of the figure:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;"><span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">gcf</span>,<span style="color:#A020F0;">'DockControls'</span>,<span style="color:#A020F0;">'off'</span><span style="color: #080;">&#41;</span></pre></div></div>]]></content:encoded> </item> <item><title>By: JP</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-41700</link> <dc:creator>JP</dc:creator> <pubDate>Wed, 27 Apr 2011 20:57:02 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-41700</guid> <description>Yair,
thanks for this, it is extremely helpful.  Playing around with the jToolbar properties, I was wondering if there is a way to make the toolbar width less than the width of the window?  I can adjust the height using preferred size, but adjusting the width does nothing.Also, when adding matlab toolbars, it adds the dock button to the right of the toolbar.  Is there a way to remove that.  It shows up in the list of jToolbar components, but removing it does not seem to work.Thanks,
JP</description> <content:encoded><![CDATA[<p>Yair,<br
/> thanks for this, it is extremely helpful.  Playing around with the jToolbar properties, I was wondering if there is a way to make the toolbar width less than the width of the window?  I can adjust the height using preferred size, but adjusting the width does nothing.</p><p>Also, when adding matlab toolbars, it adds the dock button to the right of the toolbar.  Is there a way to remove that.  It shows up in the list of jToolbar components, but removing it does not seem to work.</p><p>Thanks,<br
/> JP</p> ]]></content:encoded> </item> <item><title>By: Modifying default toolbar/menubar actions &#124; Undocumented Matlab</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-10646</link> <dc:creator>Modifying default toolbar/menubar actions &#124; Undocumented Matlab</dc:creator> <pubDate>Wed, 02 Jun 2010 14:11:04 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-10646</guid> <description>[...] Examples of toolbar customizations were presented in past articles (here and here). A future article will explain how to customize menu [...]</description> <content:encoded><![CDATA[<p>[...] Examples of toolbar customizations were presented in past articles (here and here). A future article will explain how to customize menu [...]</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-6538</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Thu, 28 Jan 2010 19:52:29 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-6538</guid> <description>@Kris - interesting question! Standard Java JToolBars (which the Matlab toolbar extends) allow floating toolbars to be manually dragged and pinned to the sides, but apparently the Matlab extension prevents it.Here is how to programmatically place the toolbar on the bottom:
&lt;pre lang=&quot;matlab&quot;&gt;
jPanel = jToolbar.getParent.getParent;
jPanel.add(jToolbar.getParent,java.awt.BorderLayout.SOUTH);
jPanel.revalidate;
&lt;/pre&gt;Unfortunately, when we try to use the same method for placing the toolbar on the left/right sides, the figure gets &quot;frozen&quot; and unresponsive. Perhaps someone can enlighten us what needs to be changed in the following code:
&lt;pre lang=&quot;matlab&quot;&gt;
jToolbar.setOrientation(jToolbar.VERTICAL);
jPanel = jToolbar.getParent.getParent;
jPanel.add(jToolbar.getParent,java.awt.BorderLayout.WEST);
jPanel.revalidate;
&lt;/pre&gt;Yair</description> <content:encoded><![CDATA[<p>@Kris &#8211; interesting question! Standard Java JToolBars (which the Matlab toolbar extends) allow floating toolbars to be manually dragged and pinned to the sides, but apparently the Matlab extension prevents it.</p><p>Here is how to programmatically place the toolbar on the bottom:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">jPanel = jToolbar.<span style="">getParent</span>.<span style="">getParent</span>;
jPanel.<span style="">add</span><span style="color: #080;">&#40;</span>jToolbar.<span style="">getParent</span>,java.<span style="">awt</span>.<span style="">BorderLayout</span>.<span style="">SOUTH</span><span style="color: #080;">&#41;</span>;
jPanel.<span style="">revalidate</span>;</pre></div></div><p>Unfortunately, when we try to use the same method for placing the toolbar on the left/right sides, the figure gets &#8220;frozen&#8221; and unresponsive. Perhaps someone can enlighten us what needs to be changed in the following code:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">jToolbar.<span style="">setOrientation</span><span style="color: #080;">&#40;</span>jToolbar.<span style="">VERTICAL</span><span style="color: #080;">&#41;</span>;
jPanel = jToolbar.<span style="">getParent</span>.<span style="">getParent</span>;
jPanel.<span style="">add</span><span style="color: #080;">&#40;</span>jToolbar.<span style="">getParent</span>,java.<span style="">awt</span>.<span style="">BorderLayout</span>.<span style="">WEST</span><span style="color: #080;">&#41;</span>;
jPanel.<span style="">revalidate</span>;</pre></div></div><p>Yair</p> ]]></content:encoded> </item> <item><title>By: Kris</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-6535</link> <dc:creator>Kris</dc:creator> <pubDate>Thu, 28 Jan 2010 18:36:23 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-6535</guid> <description>Yair:I was curious if you might know how to create a vertically oriented figure toolbar.  I am not wise in the ways of java, and thus, I am not certain about how to go about relocating the figure toolbar from the top of the figure window to, say, the left hand side of the figure window.  I am interested in designing a GUI, such that the user may elect to place my customized toolbar icons and associated functions somewhere else in the figure window besides the top.I appreciate any feedback you might have.  Thanks.-Kris</description> <content:encoded><![CDATA[<p>Yair:</p><p>I was curious if you might know how to create a vertically oriented figure toolbar.  I am not wise in the ways of java, and thus, I am not certain about how to go about relocating the figure toolbar from the top of the figure window to, say, the left hand side of the figure window.  I am interested in designing a GUI, such that the user may elect to place my customized toolbar icons and associated functions somewhere else in the figure window besides the top.</p><p>I appreciate any feedback you might have.  Thanks.</p><p>-Kris</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-3747</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Thu, 29 Oct 2009 22:35:32 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-3747</guid> <description>oops... my bad - sometimes a simple &lt;i&gt;&lt;b&gt;handle&lt;/b&gt;(obj)&lt;/i&gt; is enough to expose the callbacks, but sometimes not, so it is always advisable to use &lt;i&gt;&lt;b&gt;handle&lt;/b&gt;(obj,&#039;CallbackProperties&#039;)&lt;/i&gt;.Even MathWorks programmers encounter this limitation, as attested by the following internal comment within the built-in &lt;b&gt;&lt;i&gt;javacomponent&lt;/i&gt;&lt;/b&gt;.m function:
&lt;q&gt;Promote the component to a handle object first. It seems once a java object is cast to a handle, you cannot get another handle with &#039;callbackproperties&#039;.&lt;/q&gt;Anyway, I fixed the post accordingly.</description> <content:encoded><![CDATA[<p>oops&#8230; my bad &#8211; sometimes a simple <i><b>handle</b>(obj)</i> is enough to expose the callbacks, but sometimes not, so it is always advisable to use <i><b>handle</b>(obj,&#8217;CallbackProperties&#8217;)</i>.</p><p>Even MathWorks programmers encounter this limitation, as attested by the following internal comment within the built-in <b><i>javacomponent</i></b>.m function:<br
/> <q>Promote the component to a handle object first. It seems once a java object is cast to a handle, you cannot get another handle with &#8216;callbackproperties&#8217;.</q></p><p>Anyway, I fixed the post accordingly.</p> ]]></content:encoded> </item> <item><title>By: Daniel</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-3742</link> <dc:creator>Daniel</dc:creator> <pubDate>Thu, 29 Oct 2009 21:26:38 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-3742</guid> <description>Yair
i`ve just resolved my problem.
jToolbar = handle(jToolbar, &#039;CallbackProperties&#039;); is missing in the example on the top of the page.
Thanks for the new example.Daniel</description> <content:encoded><![CDATA[<p>Yair<br
/> i`ve just resolved my problem.<br
/> jToolbar = handle(jToolbar, &#8216;CallbackProperties&#8217;); is missing in the example on the top of the page.<br
/> Thanks for the new example.</p><p>Daniel</p> ]]></content:encoded> </item> <item><title>By: Yair Altman</title><link>http://undocumentedmatlab.com/blog/figure-toolbar-customizations/#comment-3701</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Thu, 29 Oct 2009 07:24:15 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=564#comment-3701</guid> <description>Daniel - which Matlab release and platform are you using? Also, what commands do you use to get the toolbar object and its callbacks? - The following should work:&lt;pre lang=&quot;matlab&quot;&gt;
hToolbar = findall(hFig,&#039;tag&#039;,&#039;FigureToolBar&#039;);
jToolbar = get(get(hToolbar,&#039;JavaContainer&#039;),&#039;ComponentPeer&#039;);
jToolbar = handle(jToolbar, &#039;CallbackProperties&#039;);
set(jToolbar,&#039;AncestorAddedCallback&#039;,@myCallbackFunction);
&lt;/pre&gt;</description> <content:encoded><![CDATA[<p>Daniel &#8211; which Matlab release and platform are you using? Also, what commands do you use to get the toolbar object and its callbacks? &#8211; The following should work:</p><div
class="wp_syntax"><div
class="code"><pre class="matlab" style="font-family:monospace;">hToolbar = findall<span style="color: #080;">&#40;</span>hFig,<span style="color:#A020F0;">'tag'</span>,<span style="color:#A020F0;">'FigureToolBar'</span><span style="color: #080;">&#41;</span>;
jToolbar = <span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span><span style="color: #0000FF;">get</span><span style="color: #080;">&#40;</span>hToolbar,<span style="color:#A020F0;">'JavaContainer'</span><span style="color: #080;">&#41;</span>,<span style="color:#A020F0;">'ComponentPeer'</span><span style="color: #080;">&#41;</span>;
jToolbar = handle<span style="color: #080;">&#40;</span>jToolbar, <span style="color:#A020F0;">'CallbackProperties'</span><span style="color: #080;">&#41;</span>;
<span style="color: #0000FF;">set</span><span style="color: #080;">&#40;</span>jToolbar,<span style="color:#A020F0;">'AncestorAddedCallback'</span>,@myCallbackFunction<span style="color: #080;">&#41;</span>;</pre></div></div>]]></content:encoded> </item> </channel> </rss>

<!-- W3 Total Cache: Minify debug info:
Engine:             disk: basic
Theme:              b7666
Template:           single
-->
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: undocumentedmatlab.com @ 2012-05-18 22:50:57 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          blog/figure-toolbar-customizations/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.569s
Header info:
X-Pingback:         http://undocumentedmatlab.com/blog/xmlrpc.php
Set-Cookie:         wpgb_visit_last_php-default=1337406657; expires=Sun, 19-May-2013 05:50:57 GMT; path=/
Link:               <http://undocumentedmatlab.com/?p=564>; rel=shortlink
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Sat, 19 May 2012 05:50:57 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Sat, 19 May 2012 06:50:57 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               e3e2441e6738071f50d88df05c5718f2
Content-Encoding:   gzip
-->
