/****添加合计行(适合于编辑界面)******/
private void setSumFields(){
HashMap map = new HashMap();
map.put(tblMain, new String [] {"totalLine"});
if(map == null)
return;
KDTable table;
String sumColNames[];
for (Iterator sumFieldsIterator = map.keySet().iterator();sumFieldsIterator.hasNext();setTableToSumField(table,sumColNames)) {
table = (KDTable)sumFieldsIterator.next();
sumColNames = (String[])map.get(table);
}
}
/****添加合计行(适合于序时簿界面没绑定Query)******/
private void addTotalRow() {
IRow footRow=null;
KDTFootManager footRowManager= tblMain.getFootManager();
if (footRowManager==null)
{
String total=EASResource.getString(FrameWorkClientUtils.strResource + "Msg_Total");
footRowManager = new KDTFootManager(this.tblMain);
footRowManager.addFootView();
this.tblMain.setFootManager(footRowManager);
footRow= footRowManager.addFootRow(0);
footRow.getStyleAttributes().setHorizontalAlign(HorizontalAlignment.getAlignment("right"));
this.tblMain.getIndexColumn().setWidthAdjustMode(KDTIndexColumn.WIDTH_MANUAL);
this.tblMain.getIndexColumn().setWidth(30);
footRowManager.addIndexText(0, total);
}else{
footRow=footRowManager.getFootRow(0);
}
footRow.getStyleAttributes().setBackground(new Color(0xf6, 0xf6, 0xbf));
}