Esempio n. 1
0
 // ------------------------------------------------------------------------------------------------
 // 描述:
 // 设计: Skyline(2001.12.29)
 // 实现: Skyline
 // 修改:setFontColor
 // ------------------------------------------------------------------------------------------------
 void setFrontColor(Color clr) {
   CellFormat CF;
   try {
     CF = mBook.getCellFormat();
     CF.setFontColor(clr.getRGB());
     mBook.setCellFormat(CF);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Esempio n. 2
0
 // ------------------------------------------------------------------------------------------------
 // 描述:
 // 设计: Skyline(2001.12.29)
 // 实现: Skyline
 // 修改:
 // ------------------------------------------------------------------------------------------------
 void setBackColor(Color clr) {
   CellFormat CF;
   try {
     CF = mBook.getCellFormat();
     CF.setPattern(CellFormat.ePatternSolid);
     CF.setPatternFG(clr.getRGB());
     mBook.setCellFormat(CF);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Esempio n. 3
0
 /**
  * @param book
  * @param startRow
  * @param startCol
  * @param endRow
  * @param endCol
  * @return
  */
 public static String coor2Formula(
     JBook book, int startRow, int startCol, int endRow, int endCol) {
   String T1 = null, T2 = null, Text = null;
   try {
     T1 = book.formatRCNr(startRow, startCol, false);
     if (startRow == endRow && startCol == endCol) {
       Text = T1;
     } else {
       T2 = book.formatRCNr(endRow, endCol, false);
       Text = T1 + ":" + T2;
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return Text;
 }