<?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 Matlab labels</title> <atom:link href="http://undocumentedmatlab.com/blog/customizing-matlab-labels/feed/" rel="self" type="application/rss+xml" /><link>http://undocumentedmatlab.com/blog/customizing-matlab-labels/</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: Yair Altman</title><link>http://undocumentedmatlab.com/blog/customizing-matlab-labels/#comment-10508</link> <dc:creator>Yair Altman</dc:creator> <pubDate>Sat, 29 May 2010 18:12:35 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=734#comment-10508</guid> <description>@Nick - JLabel&#039;s &lt;b&gt;Background&lt;/b&gt; and &lt;b&gt;Foreground&lt;/b&gt; properties, and their corresponding &lt;i&gt;getXYZ(),setXYZ()&lt;/i&gt; accessor methods, are common to all Java Swing components, together with several other basic properties (and their accessor methods).In this particular case, java.awt.Color can be constructed in several ways:1) &lt;i&gt;Color(int)&lt;/i&gt; - the single integer RGB value you have reported in your comment2) &lt;i&gt;Color(float,float,float)&lt;/i&gt; - accepts three values between 0.0-1.0 (R,G,B)3) &lt;i&gt;Color(float,float,float,float)&lt;/i&gt; - as #2 above, with an additional 0.0-1.0 value for transparency (alpha)4) &lt;i&gt;Color(int, int, int)&lt;/i&gt; - as #2 above but the RGB values are specified as integer values between 0-255. There is also a fourth value for alpha, as in #3 above5) &lt;i&gt;Color.red&lt;/i&gt; etc. - there are several predefined static values: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, and yellow</description> <content:encoded><![CDATA[<p>@Nick &#8211; JLabel&#8217;s <b>Background</b> and <b>Foreground</b> properties, and their corresponding <i>getXYZ(),setXYZ()</i> accessor methods, are common to all Java Swing components, together with several other basic properties (and their accessor methods).</p><p>In this particular case, java.awt.Color can be constructed in several ways:</p><p>1) <i>Color(int)</i> &#8211; the single integer RGB value you have reported in your comment</p><p>2) <i>Color(float,float,float)</i> &#8211; accepts three values between 0.0-1.0 (R,G,B)</p><p>3) <i>Color(float,float,float,float)</i> &#8211; as #2 above, with an additional 0.0-1.0 value for transparency (alpha)</p><p>4) <i>Color(int, int, int)</i> &#8211; as #2 above but the RGB values are specified as integer values between 0-255. There is also a fourth value for alpha, as in #3 above</p><p>5) <i>Color.red</i> etc. &#8211; there are several predefined static values: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, and yellow</p> ]]></content:encoded> </item> <item><title>By: Nick</title><link>http://undocumentedmatlab.com/blog/customizing-matlab-labels/#comment-10488</link> <dc:creator>Nick</dc:creator> <pubDate>Sat, 29 May 2010 02:00:55 +0000</pubDate> <guid
isPermaLink="false">http://undocumentedmatlab.com/?p=734#comment-10488</guid> <description>I don&#039;t know if this is obvious as I don&#039;t know Java, but you can change the gray background of the JLabel by defining a java.awt.Color object and using setBackground:mycolor = javaObjectEDT(&#039;java.awt.Color&#039;, rgb_code)
setBackground(jLabel, mycolor);The rgb_code is an integer that seems to be correspond to RGB as follows:256^2*(0-255 red level) + 256*(0-255 green level) + (0-255 blue level)So black = 0, and white is 256^2*255 + 256*255 + 255.  You can cobble together highlighted sentences using this technique by aligning multiple JLabel objects in the figure.</description> <content:encoded><![CDATA[<p>I don&#8217;t know if this is obvious as I don&#8217;t know Java, but you can change the gray background of the JLabel by defining a java.awt.Color object and using setBackground:</p><p>mycolor = javaObjectEDT(&#8216;java.awt.Color&#8217;, rgb_code)<br
/> setBackground(jLabel, mycolor);</p><p>The rgb_code is an integer that seems to be correspond to RGB as follows:</p><p>256^2*(0-255 red level) + 256*(0-255 green level) + (0-255 blue level)</p><p>So black = 0, and white is 256^2*255 + 256*255 + 255.  You can cobble together highlighted sentences using this technique by aligning multiple JLabel objects in the figure.</p> ]]></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:26:31 -->

<!-- W3 Total Cache: Page cache debug info:
Engine:             disk: enhanced
Cache key:          blog/customizing-matlab-labels/feed/_index.xml_gzip
Caching:            enabled
Status:             not cached
Creation Time:      0.456s
Header info:
X-Pingback:         http://undocumentedmatlab.com/blog/xmlrpc.php
Set-Cookie:         wpgb_visit_last_php-default=1337405191; expires=Sun, 19-May-2013 05:26:31 GMT; path=/
Link:               <http://undocumentedmatlab.com/?p=734>; rel=shortlink
Content-Type:       text/xml; charset=UTF-8
Last-Modified:      Sat, 19 May 2012 05:26:31 GMT
Vary:               Accept-Encoding, Cookie
Expires:            Sat, 19 May 2012 06:26:31 GMT
Pragma:             public
Cache-Control:      public, must-revalidate, proxy-revalidate
Etag:               e156038fe930f046e154881034f8726c
Content-Encoding:   gzip
-->
