You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
4.7 KiB
130 lines
4.7 KiB
/************************************************************************************************* |
|
* 프로그램명 : TableCreation.java 프로그램설명 : 집계문서 셀정의 페이지 생성 작성자 : 강원중 작성일 : 2003.12.03 변경일 : 2004.09.16 |
|
**************************************************************************************************/ |
|
|
|
package kr.co.kihyun.moumi.doc.table; |
|
|
|
import kr.co.kihyun.moumi.MoumiConfig; |
|
|
|
public class TableReCreation { |
|
|
|
public static String insertChartOrNumber(String form) { |
|
if (form == null) |
|
return null; |
|
|
|
// ban lower case form = form.toLowerCase(); |
|
|
|
StringBuffer formBuff = new StringBuffer(form); |
|
|
|
int tableCount = 1; |
|
int startTABLE = -1; |
|
int inStrSize = 0; |
|
StringBuffer inStr = null; |
|
while (true) { |
|
startTABLE = form.indexOf("</table>", (startTABLE + 1)); |
|
|
|
if (startTABLE == -1) |
|
break; |
|
|
|
startTABLE = startTABLE + 8; |
|
inStr = new StringBuffer(); |
|
inStr.append("\n"); |
|
inStr.append("<div align=left>"); |
|
inStr.append(" <table border=0>\n"); |
|
inStr.append(" <tr>"); |
|
|
|
inStr.append(" <td>"); |
|
inStr.append(" <input type=radio name=dyna"); |
|
inStr.append(tableCount); |
|
inStr.append(" onclick=\"StaticChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\" checked><b><font color=#48B54B size=2>" + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.staticTable2") +"</font></b>"); |
|
inStr.append(" <input type=radio name=dyna"); |
|
inStr.append(tableCount); |
|
inStr.append(" onclick=\"DynaChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\"><b><font color=#48B54B size=2>"+ MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.dynaTable2") +"</font></b>"); |
|
inStr.append(" </td>\n"); |
|
|
|
inStr.append(" <td>"); |
|
inStr.append(" </td>"); |
|
|
|
inStr.append(" <td>"); |
|
inStr.append(" <input type=radio name=a"); |
|
inStr.append(tableCount); |
|
inStr.append(" onclick=\"NumberChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\" checked><b><font color=#48B54B size=2>"+ MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.figure") +"</font></b>"); |
|
inStr.append(" <input type=radio name=a"); |
|
inStr.append(tableCount); |
|
inStr.append(" onClick=\"CharterChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\"><b><font color=#48B54B size=2>" + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.text") +"</font></b>"); |
|
inStr.append(" <input type=radio name=a"); |
|
inStr.append(tableCount); |
|
inStr.append(" onclick=\"DateChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\"><b><font color=#48B54B size=2>" + MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.date") +"</font></b>"); |
|
inStr.append(" </td>\n"); |
|
inStr.append(" </tr>"); |
|
inStr.append(" </table>"); |
|
inStr.append("</div><br>\n"); |
|
formBuff.insert((startTABLE + inStrSize), inStr.toString()); |
|
inStrSize += inStr.length(); |
|
tableCount++; |
|
} |
|
|
|
return formBuff.toString(); |
|
} |
|
|
|
public static String insertChartOrNumber(String form, String type) { |
|
if (form == null) |
|
return null; |
|
|
|
StringBuffer formBuff = new StringBuffer(form); |
|
|
|
int tableCount = 1; |
|
int startTABLE = -1; |
|
int inStrSize = 0; |
|
StringBuffer inStr = null; |
|
while (true) { |
|
startTABLE = form.indexOf("</table>", (startTABLE + 1)); |
|
|
|
if (startTABLE == -1) |
|
break; |
|
|
|
startTABLE = startTABLE + 8; |
|
inStr = new StringBuffer(); |
|
inStr.append("\n"); |
|
inStr.append("<div align=left>"); |
|
inStr.append(" <table border=0>\n"); |
|
inStr.append(" <tr>"); |
|
|
|
inStr.append(" <td>"); |
|
inStr.append(" <input type=radio name=a"); |
|
inStr.append(tableCount); |
|
inStr.append(" onclick=\"NumberChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\" checked><b><font color=#48B54B size=2>"+ MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.figure") +"</font></b>"); |
|
inStr.append(" <input type=radio name=a"); |
|
inStr.append(tableCount); |
|
inStr.append(" onClick=\"CharterChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\"><b><font color=#48B54B size=2>"+ MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.text") +"</font></b>"); |
|
inStr.append(" <input type=radio name=a"); |
|
inStr.append(tableCount); |
|
inStr.append(" onclick=\"DateChoice("); |
|
inStr.append(tableCount); |
|
inStr.append(");\"><b><font color=#48B54B size=2>"+ MoumiConfig.getMessageBundle().getString("moumi.message.tot_doc.date") + "</font></b>"); |
|
inStr.append(" </td>\n"); |
|
inStr.append(" </tr>"); |
|
inStr.append(" </table>"); |
|
inStr.append("</div><br>\n"); |
|
formBuff.insert((startTABLE + inStrSize), inStr.toString()); |
|
inStrSize += inStr.length(); |
|
tableCount++; |
|
} |
|
|
|
return formBuff.toString(); |
|
} |
|
}
|
|
|