表格中的格子添加背景色(未验证)

//holdingTable.setStyleName(style);

//for(int i){

/*

holdingTable.setRowGenerator(generator);

holdingTable.setStyleName(style);

holdingTable.getcolumn;

holdingTable.setCellStyleGenerator(new Table.CellStyleGenerator() {

   public String getStyle(Table holdingTable2,Object itemId, Object propertyId) {

       // Row style setting, not relevant in this example.

   Component cell = holdingTable2.getTableCellRendererComponent(table, value,

                   isSelected, hasFocus, row, column);

       if (propertyId == "bond")

           return "red"; // Will not actually be visible

       return "green";

   }

});*/

 

//holdingTable.setItemIcon(obj,new ThemeResource("img/redmark3.png") );

//holdingTable.setColumnIcon("bond", new ThemeResource("img/redmark3.png"));//在列的名称中显示

//importTable.setItemIconPropertyId("question");

//importTable.setItemIcon(obj,new ThemeResource("img/redmark3.png") );

 

猜你喜欢

转载自oylx.iteye.com/blog/2329747
今日推荐