// ------------------------------------------------------------------------------------------------
 // 描述:
 // 设计: Skyline(2001.12.29)
 // 实现: Skyline
 // 修改:
 // ------------------------------------------------------------------------------------------------
 public JColorPanelDlg() {
   try {
     jbInit();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
 // ------------------------------------------------------------------------------------------------
 // 描述:
 // 设计: 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();
   }
 }
 // ------------------------------------------------------------------------------------------------
 // 描述:
 // 设计: 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();
   }
 }
Exemple #4
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;
 }
Exemple #5
0
 /**
  * 解析参数 形式:BBLX:TZ01,BBBH:0110,CS:@CQSM@;@YYYY@2004
  *
  * @param params
  * @return
  */
 public static Hashtable parseQueryParams(String params) {
   try {
     if (params != null && params.length() > 0) {
       String[] keys = params.split(",");
       Hashtable map = new Hashtable();
       for (int i = 0; i < keys.length; i++) {
         String crtStr = keys[i];
         int index = crtStr.indexOf(":");
         String key = crtStr.substring(0, index); // 去除:
         String value = crtStr.substring(index + 1);
         map.put(key, value);
       }
       return map;
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return null;
 }
Exemple #6
0
 /**
  * 解析参数
  *
  * @param params
  * @return
  */
 public static Hashtable parseParams(String params) {
   try {
     if (params != null && params.length() > 0) {
       String[] keys = params.split(";");
       Hashtable map = new Hashtable();
       for (int i = 0; i < keys.length; i++) {
         String crtStr = keys[i];
         int index = crtStr.lastIndexOf("@") + 1;
         String key = crtStr.substring(1, index - 1); // 去除@
         String value = crtStr.substring(index);
         map.put(key, value);
       }
       return map;
     }
   } catch (Exception e) {
     System.out.println("解析参数出现错误:" + params);
     e.printStackTrace();
   }
   return new Hashtable();
 }