MCPcopy Create free account
hub / github.com/HelloBush/Java_MHXYdemo / CalcTool

Class CalcTool

src/pkgCalc/CalcTool.java:8–26  ·  view source on GitHub ↗

��ֵ���㹤����

Source from the content-addressed store, hash-verified

6 * ��ֵ���㹤����
7 */
8public class CalcTool {
9 /**
10 * ����Įȡɫ����ֵ���ַ���"RRGGBB"ת��ΪColor��ɫ����
11 * @param dmC ��Į��ɫֵ���ַ���
12 * @return ����Color����
13 */
14 public static Color dmCToC(String dmC){
15 Color c =null;
16 try{
17 c = new Color(Integer.parseInt(dmC.substring(0, 2),16),
18 Integer.parseInt(dmC.substring(2, 4),16),
19 Integer.parseInt(dmC.substring(4, 6),16));
20 }
21 catch(NumberFormatException e){
22 e.printStackTrace();
23 }
24 return c;
25 }
26}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected