Chinaunix首页 | 论坛 | 博客
  • 博客访问: 522111
  • 博文数量: 147
  • 博客积分: 10105
  • 博客等级: 上将
  • 技术积分: 1594
  • 用 户 组: 普通用户
  • 注册时间: 2006-06-14 10:18
文章分类

全部博文(147)

文章存档

2011年(4)

2010年(4)

2009年(6)

2008年(5)

2007年(40)

2006年(88)

我的朋友

分类: Java

2007-09-30 16:52:47

1.
 protected void createControl(Composite body) {
  
  createSearchSection(body);
  createResultSection(body);
  createActions();
  initializeToolBar();
  initializeMenu();
  setBGColor();///////////////
 }
 
 
2.
  searchButton.addListener( new Listener() {
 
   public void handleEvent(Event event) {
              setBGColor();
             tableViewer.refresh(); 
           
         }
   
  }); 
 
3.
 
private void setBGColor() {
  TableItem[] rows = table.getItems();
  
  for (int i = 0; i < rows.length; i++) {   
   if (i == 0) {
    rows[i].setBackground(red);
   } else if (i % 5 == 0) {
    rows[i].setBackground(red);
   }
  }
 }
阅读(1178) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~