惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

博客园 - tatung zhang

全屏显示问题 sun发布lwuit1.4 深入理解 LWUIT 框架的 MVC lwuit控件关系模式图,Padding和Margin关系图 eclipse rcp 获取工程项目路径 eclipse content assist 代码提示功能失效解决办法 LWUIT 1.3 发布了 Eclipse RCP中添加第三方jar包的办法 lwuit---调整滚动条灵敏度值 lwuit---更改字体大小 j2me获取手机IMEI保证软件信息安全解决方案 show一下最新项目的界面图 谈谈移动开发 lwuit ---一些细节疑难杂症整理笔记 lwuit-tab与list配合使用 lwuit-List控件使用 lwuit控件布局定位 VS2005创建智能设备项目失败 wince嵌入式应用程序开发环境搭建
lwuit-list 困扰我的列颜色改变
tatung zhang · 2009-07-08 · via 博客园 - tatung zhang

所做的项目,有多个地方需要根据属性值改变list列的颜色,困扰了半天终于搞定了。

public Component getListCellRendererComponent(List list, Object value,
                
int index, boolean isSelected) {
            MailInfo mailinfo 
= (MailInfo) value;
            title.setText(mailinfo.getTitle());
            sender.setText(mailinfo.getSender());
            
if (mailinfo.getimportantflag().equals("重要")) {
                title.getStyle().setFgColor(
0xFF0000);
                sender.getStyle().setFgColor(
0xFF0000);

            }
 else {
                title.getStyle().setFgColor(
0xFFFFFF);
                sender.getStyle().setFgColor(
0xFFFFFF);
            }

            pic.setIcon(mailinfo.getPic());
            
return this;
        }

一定要加else否则变成默认的颜色。

posted on 2009-07-08 16:33  tatung zhang  阅读(645)  评论(1)    收藏  举报

刷新页面返回顶部