Comments on: JTattoo look-and-feel demo https://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo Charting Matlab's unsupported hidden underbelly Thu, 02 May 2024 08:00:01 +0000 hourly 1 https://wordpress.org/?v=4.4.1 By: nasanhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-353897 Mon, 27 Jul 2015 20:06:11 +0000 https://undocumentedmatlab.com/?p=3687#comment-353897 Hi Yair,
I’ve seen the demo but when I adapt it into my gui code gcbf is not recognize.
How can I resolve it ? Can you give me a simply implementation in gui

]]>
By: Jeffhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-351527 Thu, 18 Jun 2015 17:25:05 +0000 https://undocumentedmatlab.com/?p=3687#comment-351527 Hi Yair,
Thanks for the post. You can also do a lot to customize the appearance of each LaF by using the public ‘setTheme’ method, which accepts a java.util.Properties object (the full set of customizable properties can be found Here ). This works well the very first time you set a particular LaF for a figure in the current MATLAB session. However, it seems that if you change some of the properties, and then build another figure with that same LaF, only a subset of those changes are actually registered. For example, if I set the ‘menuSelectionBackgroundColor’ and ‘menuBackgroundColor’ properties for the GraphiteLookAndFeel, only the ‘menuSelectionBackgroundColor’ property change has any subsequent effect. So far, restarting MATLAB seems to be the only fix. I’m currently using 2013a on a mac OSX system. Any thoughts would be appreciated!
Cheers!

]]>
By: Using pure Java GUI in deployed Matlab apps | Undocumented Matlabhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-327702 Thu, 10 Jul 2014 21:26:35 +0000 https://undocumentedmatlab.com/?p=3687#comment-327702 […] like to welcome repeat guest blogger Karthik Ponudurai, who has previously written here about the JTattoo look-and-feel, and about integration of Java controls’ events with Matlab callbacks. Today, Karthik […]

]]>
By: HAChttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-315414 Sat, 22 Feb 2014 23:01:43 +0000 https://undocumentedmatlab.com/?p=3687#comment-315414 Ah, that explains it. Thanks, Yair. Perhaps other LNFs (weblaf, PgsLookAndFeel, etc.) are the same way as well.

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-315363 Sat, 22 Feb 2014 16:22:57 +0000 https://undocumentedmatlab.com/?p=3687#comment-315363 @HAC – JTattoo LNFs cannot be used like simple LNFs. Take a look at the source code of the utility to see how they can be used.

]]>
By: HAChttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-315242 Fri, 21 Feb 2014 22:53:34 +0000 https://undocumentedmatlab.com/?p=3687#comment-315242 Somewhere I have a fundamental misunderstanding of how to access third-party .jar files. This *seems* straightforward enough to me, but it doesn’t appear to work:

hFig = figure;
hc = uiflowcontainer('v0', 'Units', 'norm', 'Position', [0.1 0.1 0.8 0.8]);
h1 = uicontrol('String', 'One', 'Parent', hc);
javaaddpath ./JTattoo-1.6.10.jar;
m = javax.swing.UIManager();
oldLF = m.getLookAndFeel;
newLFName1 = 'com.jtattoo.plaf.aero.AeroLookAndFeel'; % This one fails!
newLFName2 = 'com.jgoodies.looks.plastic.Plastic3DLookAndFeel'; % This one works!
m.setLookAndFeel(newLFName1);
[j2, h2] = javacomponent(javax.swing.JButton('Two')); 
set(h2, 'Parent', hc);
m.setLookAndFeel(oldLF);

I expect to see two buttons, each with a different look and feel. However, I’ve tried every iteration of accessing the jtattoo LaF’s and can’t seem to set them. The .jar shows up when I type ‘javaclasspath’, so I think it should be accessible. This same error occurs regardless of which LaF I try to access from the JTattoo library, as well as any other 3rd-party library. However, if I use ‘newLFName2’ above, things work nicely.

So, I suspect I’m not understanding how to access the 3rd-party classes correctly. Any advice for a beginner?

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-276287 Wed, 02 Oct 2013 18:32:08 +0000 https://undocumentedmatlab.com/?p=3687#comment-276287 @Kilojoules – of course you can – read here: https://undocumentedmatlab.com/blog/modifying-matlab-look-and-feel/

]]>
By: kilojouleshttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-275936 Wed, 02 Oct 2013 01:11:21 +0000 https://undocumentedmatlab.com/?p=3687#comment-275936 Yair, Thank you so much for this. I just want to how to use the Jtattoo LnF’s UIcontrols in making a new GUI in matlab. I have only experience making GUI in matlab by using matlab GUIDE. Is it possible that I can change the design of the UIcontrols in matlab GUIDE? How can I do it?

Thanks.

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-211735 Wed, 12 Jun 2013 16:45:12 +0000 https://undocumentedmatlab.com/?p=3687#comment-211735 @Digna – I normally use ‘/folder/file’ format for compatibility (this works on all platforms), it was simply an oversight in this case… – thanks for pointing it out

]]>
By: Dignahttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-211726 Wed, 12 Jun 2013 15:34:16 +0000 https://undocumentedmatlab.com/?p=3687#comment-211726 Very interesting, thanks! Just a small suggestion: To make you code cross-platform, in the file JTattooDemo.m you could change the line:

javaclasspath( {folder, [folder '\JTattoo.jar']} );

to:

javaclasspath( {folder, [folder filesep 'JTattoo.jar']} );

because in GNU/Linux the file separator is “/” and not “\” :)

]]>
By: mormonismhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-194342 Fri, 26 Apr 2013 20:55:18 +0000 https://undocumentedmatlab.com/?p=3687#comment-194342 Nice write up. I’m studying something similar here at Fort Lewis College. It’s always helpful to
learn new stuff from fellow writers and collect expertise
from new sources. I’d like to incorporate some of this material
on my own blog (if you don’t mind). And of course, I’ll put up a backlink to your site at undocumentedmatlab.com on my own page. Kudos for posting.

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-177922 Thu, 21 Mar 2013 19:29:37 +0000 https://undocumentedmatlab.com/?p=3687#comment-177922 @Eric, indeed so. However, I usually prefer not to use onCleanup since it is only available in R2008a onward. Instead, I tend to use simple try-catch blocks, which are backward compatible all the way back to Matlab 6. As recently shown in the EigenVector blog, there are still plenty of users out there who use non-recent Matlab releases. So in general, unless there is a very good reason otherwise, I try to make my code as backward-compatible as possible. Luckily, most of the newish Matlab constructs have equivalent backward-compatible constructs so I am able to do so without much effort.

]]>
By: Erichttps://undocumentedmatlab.com/blog_old/jtattoo-look-and-feel-demo#comment-177913 Thu, 21 Mar 2013 19:12:32 +0000 https://undocumentedmatlab.com/?p=3687#comment-177913 Neat! That updateInterface snippet looks like a prime use case for an onCleanup function, to restore the originalLnF no matter what, such as if any of the code errors or the user Ctrl-C’s :)

]]>