[摘要]0"); catch(Exception e) e.printStackTrace(); try wigth = this.getParameter("WI...
0");
}catch(Exception e) {e.printStackTrace();}
try {
wigth = this.getParameter("WIGTH", "0");
}catch(Exception e) {e.printStackTrace();}
try {
jbInit();
}catch(Exception e) { e.printStackTrace(); }
}
private void jbInit() throws Exception {
this.setBackground(new Color(getColor(back_color)[0], getColor(back_color)[1], getColor(back_color)[2]));
}
public void setRMB(String rmb_temp){
var0 = rmb_temp;
}
public String getRMB(String rmb_temp){
if(checkNum(rmb_temp)){
if(rmb_temp.endsWith(".")){
rmb_temp = rmb_temp.substring(0,rmb_temp.length()-1);
}
re_rmb= rmb.RMB(rmb_temp);
}else{
re_rmb="输入错误:"+rmb_temp;
}
return re_rmb;
}
public boolean checkNum(String str){
String numChar="0123456789.";
boolean breakBoolean = false;
for(int i=0;i<str.length();i++){
if(numChar.indexOf(str.substring(i,i+1))<0){
breakBoolean =true;
}
if(breakBoolean) break;
}
if(breakBoolean){
return false;
}else{
if(str.startsWith(".")){
return false;
}else{
return true;
}
}
}
public String[][] getParameterInfo() {
String[][] pinfo =
{
{"RGB_Back", "String", ""},
{"RGB_Fore", "String", ""},
{"WIGTH", "String", ""},
};
return pinfo;
}
private int[] getColor(String rgb){
int[] rgb_return = new int[3];
int index =0,nextIndex=0,len=0;
while((index =rgb.indexOf("
关键词:jsp页面调用applet完成人民币的大小写转换