标签:
1 public static int getSelectedRowIndex(KDTable table) 2 { 3 int[] selectRows = KDTableUtil.getSelectedRows(table); 4 int selectIndex = -1; 5 if ((selectRows != null) && (selectRows.length > 0)) 6 { 7 selectIndex = selectRows[0]; 8 } 9 return selectIndex; 10 } 11 public static List getSelectRowIndexes(KDTable table) 12 { 13 List rows = new ArrayList(); 14 if ((table.getRowCount() > 0) && (table.getSelectManager().size() != 0)) { 15 for (int i = 0; i < table.getSelectManager().size(); i++) { 16 KDTSelectBlock block = table.getSelectManager().get(i); 17 if ((block != null) && (block.getMode() == 4)) 18 { 19 block.setTop(0); 20 } 21 int beginRow = getBeginRow(block, table); 22 int endRow = getEndRow(block, table); 23 for (int r = beginRow; r <= endRow; r++) { 24 rows.add(new Integer(r)); 25 } 26 } 27 } 28 return rows; 29 }
标签:
原文地址:http://www.cnblogs.com/cyhj/p/4444952.html