commit 811245db0cbf71fe0262dd6266024f261c44108e Author: lijh Date: Tue Mar 10 16:58:04 2026 +0800 first commit diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..1ffc305 --- /dev/null +++ b/.classpath @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000..3832f08 --- /dev/null +++ b/.project @@ -0,0 +1,28 @@ + + + CodeManagement + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..0c68a61 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF new file mode 100644 index 0000000..9880ee2 --- /dev/null +++ b/META-INF/MANIFEST.MF @@ -0,0 +1,44 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: CodeManagement +Bundle-SymbolicName: CodeManagement;singleton:=true +Bundle-Version: 1.0.0 +Require-Bundle: org.eclipse.ui, + org.eclipse.ui.forms;bundle-version="3.11.400", + org.apache.felix.gogo.runtime;bundle-version="1.1.6", + com.teamcenter.rac.ui;bundle-version="14000.3.0", + com.teamcenter.rac.aifrcp;bundle-version="14000.3.0", + com.teamcenter.rac.viewer;bundle-version="14000.3.0", + com.teamcenter.rac.kernel;bundle-version="14000.3.0", + com.teamcenter.rac.cme.kernel;bundle-version="14000.3.0", + com.teamcenter.rac.cme.framework;bundle-version="14000.3.0", + com.teamcenter.rac.ms.util;bundle-version="14000.3.0", + com.teamcenter.rac.cme.bvr.connect;bundle-version="14000.3.0", + com.teamcenter.rac.ui.commands;bundle-version="14000.3.0", + com.teamcenter.rac.cme.license;bundle-version="14000.3.0", + com.teamcenter.rac.classification.icm;bundle-version="14000.3.0", + com.teamcenter.rac.aif.registryeditor;bundle-version="14000.3.0", + com.teamcenter.rac.util;bundle-version="14000.3.0", + com.teamcenter.rac.common;bundle-version="14000.3.0", + org.eclipse.core.runtime;bundle-version="3.26.0" +Automatic-Module-Name: CodeManagement +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: PropertyToFile.handlers, + codemanagement.handlers, + com.origin.beans, + com.origin.rac.applications, + com.origin.rac.command, + com.origin.rac.handler, + com.origin.ui, + com.teamcenter.rac.common.actions, + org.jdesktop.layout +Bundle-ClassPath: ., + lib/aspose-words-17.4.0-jdk16.jar, + lib/commons-collections4-4.1.jar, + lib/poi-3.17.jar, + lib/poi-examples-3.17.jar, + lib/poi-excelant-3.17.jar, + lib/poi-ooxml-3.17.jar, + lib/poi-ooxml-schemas-3.17.jar, + lib/poi-scratchpad-3.17.jar, + lib/xmlbeans-2.6.0.jar diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..aca7074 --- /dev/null +++ b/build.properties @@ -0,0 +1,18 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + icons/,\ + src/com/origin/images/,\ + lib/aspose-words-17.4.0-jdk16.jar,\ + lib/commons-collections4-4.1.jar,\ + lib/poi-3.17.jar,\ + lib/poi-examples-3.17.jar,\ + lib/poi-excelant-3.17.jar,\ + lib/poi-ooxml-3.17.jar,\ + lib/poi-ooxml-schemas-3.17.jar,\ + lib/poi-scratchpad-3.17.jar,\ + lib/xmlbeans-2.6.0.jar,\ + src/com/origin/ui/images/ +jars.compile.order = . diff --git a/icons/sample.png b/icons/sample.png new file mode 100644 index 0000000..02c4b79 Binary files /dev/null and b/icons/sample.png differ diff --git a/icons/sample@2x.png b/icons/sample@2x.png new file mode 100644 index 0000000..c1224d1 Binary files /dev/null and b/icons/sample@2x.png differ diff --git a/lib/aspose-words-17.4.0-jdk16.jar b/lib/aspose-words-17.4.0-jdk16.jar new file mode 100644 index 0000000..e8bd66c Binary files /dev/null and b/lib/aspose-words-17.4.0-jdk16.jar differ diff --git a/lib/commons-collections4-4.1.jar b/lib/commons-collections4-4.1.jar new file mode 100644 index 0000000..43a9413 Binary files /dev/null and b/lib/commons-collections4-4.1.jar differ diff --git a/lib/poi-3.17.jar b/lib/poi-3.17.jar new file mode 100644 index 0000000..353ce76 Binary files /dev/null and b/lib/poi-3.17.jar differ diff --git a/lib/poi-examples-3.17.jar b/lib/poi-examples-3.17.jar new file mode 100644 index 0000000..a923b04 Binary files /dev/null and b/lib/poi-examples-3.17.jar differ diff --git a/lib/poi-excelant-3.17.jar b/lib/poi-excelant-3.17.jar new file mode 100644 index 0000000..da9f5ed Binary files /dev/null and b/lib/poi-excelant-3.17.jar differ diff --git a/lib/poi-ooxml-3.17.jar b/lib/poi-ooxml-3.17.jar new file mode 100644 index 0000000..68086e8 Binary files /dev/null and b/lib/poi-ooxml-3.17.jar differ diff --git a/lib/poi-ooxml-schemas-3.17.jar b/lib/poi-ooxml-schemas-3.17.jar new file mode 100644 index 0000000..2e9b3e7 Binary files /dev/null and b/lib/poi-ooxml-schemas-3.17.jar differ diff --git a/lib/poi-scratchpad-3.17.jar b/lib/poi-scratchpad-3.17.jar new file mode 100644 index 0000000..12ba1f1 Binary files /dev/null and b/lib/poi-scratchpad-3.17.jar differ diff --git a/lib/xmlbeans-2.6.0.jar b/lib/xmlbeans-2.6.0.jar new file mode 100644 index 0000000..d1b6627 Binary files /dev/null and b/lib/xmlbeans-2.6.0.jar differ diff --git a/plugin.xml b/plugin.xml new file mode 100644 index 0000000..6b4cdb3 --- /dev/null +++ b/plugin.xml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/PropertyToFile/handlers/PropertyToHandler.java b/src/PropertyToFile/handlers/PropertyToHandler.java new file mode 100644 index 0000000..9c19e3a --- /dev/null +++ b/src/PropertyToFile/handlers/PropertyToHandler.java @@ -0,0 +1,41 @@ +package PropertyToFile.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aifrcp.AIFUtility; +import com.teamcenter.rac.kernel.TCSession; + +public class PropertyToHandler extends AbstractHandler{ + + + @Override + public Object execute(ExecutionEvent arg0) throws ExecutionException { + AbstractAIFApplication app = AIFUtility.getCurrentApplication(); + TCSession session = (TCSession) app.getSession(); + try { + + new Thread() { + @Override + public void run() { + + try { + new PropertyToWordOrExcelOperation(app,session); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + }.start(); + + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + } + + return null; + } +} diff --git a/src/PropertyToFile/handlers/PropertyToWordOrExcelOperation.java b/src/PropertyToFile/handlers/PropertyToWordOrExcelOperation.java new file mode 100644 index 0000000..0023c69 --- /dev/null +++ b/src/PropertyToFile/handlers/PropertyToWordOrExcelOperation.java @@ -0,0 +1,333 @@ +package PropertyToFile.handlers; + +import java.awt.Window; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFName; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.util.CellReference; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFName; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; + +import com.aspose.words.Bookmark; +import com.aspose.words.Document; +import com.aspose.words.SaveFormat; +import com.teamcenter.rac.aif.AIFDesktop; +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aif.AbstractAIFOperation; +import com.teamcenter.rac.aif.kernel.AbstractAIFSession; +import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent; +import com.teamcenter.rac.kernel.TCComponent; +import com.teamcenter.rac.kernel.TCComponentDataset; +import com.teamcenter.rac.kernel.TCComponentItem; +import com.teamcenter.rac.kernel.TCComponentItemRevision; +import com.teamcenter.rac.kernel.TCComponentTcFile; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCProperty; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.util.FileUtility; +import com.teamcenter.rac.util.MessageBox; + + + + + +public class PropertyToWordOrExcelOperation extends AbstractAIFOperation{ + + private AbstractAIFApplication app; + private TCSession session; + + public PropertyToWordOrExcelOperation(AbstractAIFApplication app,TCSession session) throws Exception { + super(); + this.app = app; + this.session = session; + executeOperation(); + } + final String preName = "Connor_WordExcel_Report_ItemType"; + + + @Override + public void executeOperation() throws Exception { + // TODO Auto-generated method stub +System.out.println("33333333333"); + new Thread().sleep(1000); + InterfaceAIFComponent targetComponent = app.getTargetComponent(); + TCComponentItemRevision revision = (TCComponentItemRevision) targetComponent; + String[] prefVals = getPrefVals(session, preName); + if(prefVals == null || prefVals.length == 0) { + info(AIFDesktop.getActiveDesktop(), preName + "ѡδãϵԱ"); + return; + } + String relatioin = prefVals[0]; + TCComponent[] relatedComponents = revision.getRelatedComponents(relatioin); + if(relatedComponents == null || relatedComponents.length == 0) { + info(AIFDesktop.getActiveDesktop(), "ѡж " + relatioin + " ϵûݼ"); + return; + } + //ѡ + HashMap nameMap = new HashMap();//ݼƺͶ(item,rev,revMaster) + if(prefVals.length >= 2) { + for (int i = 1; i < prefVals.length; i++) { + //Item.object_name=object_name + String[] split = prefVals[i].split("="); + nameMap.put(split[1],split[0]); + } + } + for (TCComponent tcComponent : relatedComponents) { + if (tcComponent instanceof TCComponentDataset) { + TCComponentDataset dataset = (TCComponentDataset) tcComponent; + File datasetFile = getDatasetFile(dataset); + String type = tcComponent.getType(); + String datasetType = ""; + String newPath = ""; + if("MSExcel".equals(type) || "MSExcelX".equals(type) || "MSWord".equals(type) || "MSWordX".equals(type)) { + switch (type) { + case "MSExcel": + datasetType = "excel"; + newPath = dealExcel(datasetFile,revision,nameMap); + break; + case "MSExcelX": + datasetType = "excel"; + newPath = dealExcelX(datasetFile,revision,nameMap); + break; + case "MSWord": + datasetType = "word"; + newPath = dealWord2(datasetFile,revision,nameMap,"doc"); + break; + case "MSWordX": + datasetType = "word"; + newPath = dealWord2(datasetFile,revision,nameMap,"docx"); + break; + } + //ݼµ + dataset.setFiles(new String[] {newPath}, new String[] {datasetType}); + } + } + } + info(AIFDesktop.getActiveDesktop(), "ȡ汾ԵWord Excelִ"); + + } + + + private String dealExcel(File datasetFile, TCComponentItemRevision revision, HashMap nameMap) throws IOException, TCException { + FileInputStream is = new FileInputStream(datasetFile); + HSSFWorkbook workbook = new HSSFWorkbook(is); + List allNames = workbook.getAllNames(); + for (HSSFName hssfName : allNames) { + String name = hssfName.getNameName(); + //ƹѡ + if (nameMap.containsKey(name)) { + CellReference cellReference = new CellReference(hssfName.getRefersToFormula()); + HSSFSheet sheet = workbook.getSheet(cellReference.getSheetName()); + HSSFRow row = sheet.getRow(cellReference.getRow()); + HSSFCell cell = row.getCell(cellReference.getCol()); + String preConfigValue = getPreConfigValue(revision,nameMap,nameMap.get(name)); + System.out.println("Ϊ" + cellReference.getRow() + "====" + "Ϊ" + cellReference.getCol() + "====" + + "ֵΪ " + preConfigValue); + if(cell == null) { + cell = row.createCell(cellReference.getCol()); + } + cell.setCellValue(preConfigValue); + + } + } + is.close(); + FileOutputStream os = new FileOutputStream(datasetFile); + workbook.write(os); + workbook.close(); + return datasetFile.getAbsolutePath(); + } + + private String dealExcelX(File datasetFile, TCComponentItemRevision revision, HashMap nameMap) throws IOException, TCException { + FileInputStream is = new FileInputStream(datasetFile); + XSSFWorkbook workbook = new XSSFWorkbook(is); + List allNames = workbook.getAllNames(); + for (XSSFName xssfName : allNames) { + String name = xssfName.getNameName(); + //ƹѡ + if (nameMap.containsKey(name)) { + CellReference cellReference = new CellReference(xssfName.getRefersToFormula()); + XSSFSheet sheet = workbook.getSheet(cellReference.getSheetName()); + XSSFRow row = sheet.getRow(cellReference.getRow()); + XSSFCell cell = row.getCell(cellReference.getCol()); + String preConfigValue = getPreConfigValue(revision,nameMap,nameMap.get(name)); + System.out.println("Ϊ" + cellReference.getRow() + "====" + "Ϊ" + cellReference.getCol() + "====" + + "ֵΪ " + preConfigValue); + if(cell == null) { + cell = row.createCell(cellReference.getCol()); + cell.setCellValue(preConfigValue); + } + else { + cell.setCellValue(preConfigValue); + } + } + } + is.close(); + FileOutputStream os = new FileOutputStream(datasetFile); + workbook.write(os); + workbook.close(); + return datasetFile.getAbsolutePath(); + } + + private String dealWord(File datasetFile, TCComponentItemRevision revision, HashMap nameMap,String type) throws IOException, TCException { + String path = datasetFile.getAbsolutePath(); + InputStream inputStream = Files.newInputStream(Paths.get(path)); + Map dataMap = new HashMap<>(); + for(String key : nameMap.keySet()) { + String preConfigValue = getPreConfigValue(revision,nameMap,nameMap.get(key)); + dataMap.put(key, preConfigValue); + } + //String newPath = ""; + if(type.equals("doc")) { + //newPath = path.replace(".doc", "temp.doc"); + WordUtils.replaceBookmarksByDoc(inputStream, Files.newOutputStream(Paths.get(path)), dataMap); + } + else if(type.equals("docx")) { + //newPath = path.replace(".docx", "temp.docx"); + WordUtils.replaceBookmarksByDocx(inputStream, Files.newOutputStream(Paths.get(path)), dataMap); + } + return path; + } + + private String dealWord2(File datasetFile, TCComponentItemRevision revision, HashMap nameMap,String type) throws FileNotFoundException, Exception { + String path = datasetFile.getAbsolutePath(); + Document document2 = new Document(new FileInputStream(path)); + OutputStream outputStream = null; + //String newPath = path.replace(".doc", "temp.doc"); + outputStream = new FileOutputStream(path); + Map dataMap = new HashMap<>(); + for(String key : nameMap.keySet()) { + String preConfigValue = getPreConfigValue(revision,nameMap,nameMap.get(key)); + dataMap.put(key, preConfigValue); + } + System.out.println(" document2.getRange().getBookmarks()==="+ document2.getRange().getBookmarks().getCount()); + + for (Bookmark bookmark : document2.getRange().getBookmarks()) { + System.out.println("11111111111"); + String bookmarkName = bookmark.getName(); + System.out.println("ǩ"+bookmarkName); + if(dataMap.containsKey(bookmarkName)) + { + System.out.println(""); + bookmark.setText(dataMap.get(bookmarkName)); + } + } + if(type.equals("doc")) { + document2.save(outputStream, SaveFormat.DOC); + }else if(type.equals("docx")) { + document2.save(outputStream, SaveFormat.DOCX); + } + return path; + } + + /** + * õѡС=߶Ӧֵ + * @param revision + * @param nameMap + * @param value + * @return + * @throws TCException + */ + private String getPreConfigValue(TCComponentItemRevision revision, HashMap nameMap,String value) throws TCException { + String[] split = value.split("\\."); + String cellValue = ""; + TCProperty property = null; + if(split.length == 2) { + System.out.println("split1========"+split[0]); + System.out.println("split1========"+split[1]); + switch (split[0]) { + case "Item": + property = revision.getItem().getTCProperty(split[1]); + break; + case "Rev": + property = revision.getTCProperty(split[1]); + break; + case "RevMaster": + property = revision.getRelatedComponent("IMAN_master_form_rev").getTCProperty(split[1]); + break; + default: + break; + } + } + //ȡϵļµ + else if(split.length == 3) { + String relation = split[0]; + TCComponent relatedComponent = revision.getRelatedComponent(relation); + TCComponentItemRevision centerRev = null; + if(relatedComponent instanceof TCComponentItemRevision) { + centerRev = (TCComponentItemRevision) relatedComponent; + }else if(relatedComponent instanceof TCComponentItem) { + centerRev = ((TCComponentItem) relatedComponent).getLatestItemRevision(); + } + if(centerRev != null) { + switch (split[1]) { + case "Item": + property = centerRev.getItem().getTCProperty(split[2]); + break; + case "Rev": + property = centerRev.getTCProperty(split[2]); + break; + case "RevMaster": + property = centerRev.getRelatedComponent("IMAN_master_form_rev").getTCProperty(split[2]); + break; + default: + break; + } + } + } + if(property == null) { + return ""; + } + else { + cellValue = property.getDisplayValue(); + return cellValue; + } + } + + + + //kUtil + + public static boolean isEmpty(String str) { + return str == null || "".equals(str.trim()); + } + + public static String[] getPrefVals(TCSession session, String prefName) throws Exception { + if (isEmpty(prefName)) { + return null; + } + return session.getPreferenceService().getStringValues(prefName); + } + + public static void info(Window dialog, String msg) { + MessageBox.post(dialog, msg, "", MessageBox.INFORMATION); + } + + + + public static File getDatasetFile(TCComponentDataset dataset) throws Exception { + File[] files = dataset.getFiles("", System.getenv("TEMP")); + if (files == null || files.length == 0) { + throw new Exception(String.format("ûݼ", dataset.toString())); + } + System.out.println(">> Download file (" + files.length + "): " + files[0].getAbsolutePath()); + return files[0]; + } +} diff --git a/src/PropertyToFile/handlers/WordUtils.java b/src/PropertyToFile/handlers/WordUtils.java new file mode 100644 index 0000000..2f301e5 --- /dev/null +++ b/src/PropertyToFile/handlers/WordUtils.java @@ -0,0 +1,168 @@ +package PropertyToFile.handlers; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.poi.hwpf.HWPFDocument; +import org.apache.poi.hwpf.usermodel.Bookmark; +import org.apache.poi.hwpf.usermodel.Bookmarks; +import org.apache.poi.hwpf.usermodel.Range; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.apache.poi.xwpf.usermodel.XWPFParagraph; +import org.apache.poi.xwpf.usermodel.XWPFRun; +import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark; +import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP; +import org.w3c.dom.Node; + +public class WordUtils { + + public static final String RUN_NODE_NAME = "w:r"; + public static final String TEXT_NODE_NAME = "w:t"; + public static final String BOOKMARK_START_TAG = "w:bookmarkStart"; + public static final String BOOKMARK_END_TAG = "w:bookmarkEnd"; + public static final String BOOKMARK_ID_ATTR_NAME = "w:id"; + public static final String STYLE_NODE_NAME = "w:rPr"; + + public static void main(String[] args) throws IOException { + // 滻ļе bookmark + InputStream inputStream3 = Files.newInputStream(Paths.get("C:\\Users\\Administrator\\Desktop\\ļ\\22.doc")); + Map dataMap = new HashMap<>(); + dataMap.put("one", "oneoneoneoneone"); + dataMap.put("two", "twotwotwotwo"); + dataMap.put("three", "ceshi"); + replaceBookmarksByDoc(inputStream3, Files.newOutputStream(Paths.get("C:\\Users\\Administrator\\Desktop\\ļ\\33.doc")), dataMap); + } + + /** + * ȡ doc ļеǩ + * + * @param inputStream + * @throws IOException + */ + public static void getBookmarksByDoc(InputStream inputStream) throws IOException { + HWPFDocument wordDoc = new HWPFDocument(inputStream); + + Bookmarks bookmarks = wordDoc.getBookmarks(); + + for (int b = 0; b < bookmarks.getBookmarksCount(); b++) { + Bookmark bookmark = bookmarks.getBookmark(b); + String bookMarkText = new Range(bookmark.getStart(), bookmark.getEnd(), wordDoc).text(); + + System.out.println("[" + bookmark.getStart() + "; " + + bookmark.getEnd() + "]: " + bookmark.getName() + " = " + bookMarkText); + } + + } + + /** + * ȡ docx ļеǩ + * + * @param inputStream + * @throws IOException + */ + public static void getBookmarksByDocx(InputStream inputStream) throws IOException { + XWPFDocument docx = new XWPFDocument(inputStream); + + List paragraphList = docx.getParagraphs(); + for (XWPFParagraph xwpfParagraph : paragraphList) { + CTP ctp = xwpfParagraph.getCTP(); + + for (int dwI = 0; dwI < ctp.sizeOfBookmarkStartArray(); dwI++) { + CTBookmark bookmark = ctp.getBookmarkStartArray(dwI); + String bookmarkName = bookmark.getName(); + + // Ϊ docx Ľṹxmlʽ doc ĵоstartendֵλһbookmarkֵΧ + // Ҫȡ docx ĵbookmarkݣҪ bookmarkStart ڵ㿪ʼνxml + // nodeValue ֵƴӣֱȡһΪ bookmarkEnd ĽڵΪֹ + // getBookmarkTextContent() һûʵֵķҪʵ + // String bookmarkTextContent = getBookmarkTextContent(bookmark); + + System.out.println(bookmarkName); + } + } + } + + + /** + * docx ļǩ滻 + * + * @param inputStream + * @param outputStream + * @param dataMap + * @throws IOException + */ + public static void replaceBookmarksByDocx(InputStream inputStream, OutputStream outputStream, Map dataMap) throws IOException { + XWPFDocument document = new XWPFDocument(inputStream).getXWPFDocument(); + List paragraphList = document.getParagraphs(); + for (XWPFParagraph xwpfParagraph : paragraphList) { + CTP ctp = xwpfParagraph.getCTP(); + + for (int dwI = 0; dwI < ctp.sizeOfBookmarkStartArray(); dwI++) { + CTBookmark bookmark = ctp.getBookmarkStartArray(dwI); + if (dataMap.containsKey(bookmark.getName())) { + + XWPFRun run = xwpfParagraph.createRun(); + run.setText(dataMap.get(bookmark.getName())); + + Node firstNode = bookmark.getDomNode(); + Node nextNode = firstNode.getNextSibling(); + while (nextNode != null) { + // ѭҽ + String nodeName = nextNode.getNodeName(); + if (nodeName.equals(BOOKMARK_END_TAG)) { + break; + } + + // ɾмķǽڵ㣬ɾԭǩ + Node delNode = nextNode; + nextNode = nextNode.getNextSibling(); + + ctp.getDomNode().removeChild(delNode); + } + + if (nextNode == null) { + // ʼҲʶģǩǰ + ctp.getDomNode().insertBefore(run.getCTR().getDomNode(), firstNode); + } else { + // ҵӵ֮ǰдbookmarkм + ctp.getDomNode().insertBefore(run.getCTR().getDomNode(), nextNode); + } + } + } + } + + document.write(outputStream); + document.close(); + } + + + /** + * doc ļǩ滻 + * + * @param inputStream + * @param outputStream + * @param dataMap + * @throws IOException + */ + public static void replaceBookmarksByDoc(InputStream inputStream, OutputStream outputStream, + Map dataMap) throws IOException { + HWPFDocument document = new HWPFDocument(inputStream); + Bookmarks bookmarks = document.getBookmarks(); + for (int dwI = 0; dwI < bookmarks.getBookmarksCount(); dwI++) { + Bookmark bookmark = bookmarks.getBookmark(dwI); + if (dataMap.containsKey(bookmark.getName())) { + Range range = new Range(bookmark.getStart(), bookmark.getEnd(), document); + range.replaceText(dataMap.get(bookmark.getName()), false); + } + } + document.write(outputStream); + } +} + + diff --git a/src/codemanagement/handlers/SampleHandler.java b/src/codemanagement/handlers/SampleHandler.java new file mode 100644 index 0000000..fd42279 --- /dev/null +++ b/src/codemanagement/handlers/SampleHandler.java @@ -0,0 +1,21 @@ +package codemanagement.handlers; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.jface.dialogs.MessageDialog; + +public class SampleHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event); + MessageDialog.openInformation( + window.getShell(), + "CodeManagement", + "Hello, Eclipse world"); + return null; + } +} diff --git a/src/com/origin/beans/AutoCodeBean.java b/src/com/origin/beans/AutoCodeBean.java new file mode 100644 index 0000000..255db24 --- /dev/null +++ b/src/com/origin/beans/AutoCodeBean.java @@ -0,0 +1,693 @@ +package com.origin.beans; + +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.commands.newitem.IItemTypesLoader; +import com.teamcenter.rac.commands.newitem.NewItemTypesLoader; +import com.teamcenter.rac.kernel.TCComponentType; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCPreferenceService; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.kernel.TCTypeService; +import com.teamcenter.rac.util.Registry; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.Vector; +import javax.swing.JOptionPane; + +public class AutoCodeBean +{ + AbstractAIFUIApplication app; + TCSession session = null; + String[] starItemTypeNames; + TCComponentType[] tc_component_type_a = null; + String[] stra_Single; + KelsenStartWindow ksw; + String strDisplay = ""; + String strDisplayItem = ""; + String strDisplayAllType = ""; + String strFile_Display1 = ""; + String strInnerDisplay = ""; + String strDisplay_getProperties = ""; + TCPreferenceService preferenceService = null; + + public AutoCodeBean(TCSession session) + { + this.session = session; + session.getRegistry(); + try + { + this.preferenceService = session.getPreferenceService(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public String[][] getAllItemTypes() + { + String[][] straResult = (String[][])null; + try + { + IItemTypesLoader item = new NewItemTypesLoader(); + item + .init( + + Registry.getRegistry("com.teamcenter.rac.commands.newitem.newitem"), + false, this.session); + Map map = item.loadTypes(); + System.out.println("Map:::::::::" + map); + + + String mapToString = map.toString(); + mapToString = mapToString.replace("{", ""); + mapToString = mapToString.replace("}", ""); + String[] split = null; + System.out.println("mapToString=="+mapToString); + if(mapToString.contains(",")) { + split = mapToString.split(","); + }else if(mapToString.contains("")) { + split = mapToString.split(""); + } + + if(split != null) { + straResult = new String[split.length][]; + for (int i = 0; i < split.length; i++) { + String[] split2 = split[i].split("="); + this.stra_Single = new String[2]; + System.out.println("split2[0]==="+split2[0]); + System.out.println("split2[1]==="+split2[1]); + this.stra_Single[0] = split2[0]; + this.stra_Single[1] = split2[1]; + straResult[i] = this.stra_Single; + System.out.println("111"+straResult[i].toString()); + } + } + + + +// straResult = new String[map.size()][]; +// Iterator iterator = map.keySet().iterator(); +// String clientStr = ""; +// int i = 0; +// while (iterator.hasNext()) +// { +// clientStr = iterator.next().toString(); +// +// System.out.println(clientStr); +// this.stra_Single = new String[2]; +// this.stra_Single[0] = clientStr; +// this.stra_Single[1] = map.get(clientStr).toString(); +// straResult[(i++)] = this.stra_Single; +// } + } + catch (Exception e) + { + e.printStackTrace(); + } + return straResult; + } + + public boolean isRegistRule(String str_ItemType) + { + boolean b_result = false; + HashMap hm_allBeRegistItemType = getAllRegistItemType(); + if (hm_allBeRegistItemType != null) + { + if (hm_allBeRegistItemType.get(str_ItemType) == null) { + b_result = false; + } else { + b_result = true; + } + } + else { + b_result = false; + } + return b_result; + } + + public HashMap getAllRegistItemType() + { + HashMap hm_result = null; + String[] stra_option_origin_item_names = getOriginOptions( + "origin_item_names", 4); + if ((stra_option_origin_item_names != null) && + (stra_option_origin_item_names.length > 0)) + { + hm_result = new HashMap(); + for (int i = 0; i < stra_option_origin_item_names.length; i++) { + hm_result.put(stra_option_origin_item_names[i], + stra_option_origin_item_names[i]); + } + } + return hm_result; + } + + public String[] getStraREVMasterPro(String str_FormType) + { + String[] stra_result = (String[])null; + if (this.session == null) { + this.session = ((TCSession)this.app.getSession()); + } + try + { + System.out.println("str_FormType------>" + str_FormType); + TCTypeService typeService = this.session.getTypeService(); + TCComponentType typeComponent = typeService + .getTypeComponent(str_FormType); + stra_result = typeComponent.getPropertyNames(); + } + catch (TCException e) + { + e.printStackTrace(); + } + return stra_result; + } + + public String[] getOriginOptions(String str_Option_Title, int int_scope) + { + String[] stra_Result = (String[])null; + try + { + stra_Result = this.preferenceService.getStringArray(int_scope, + str_Option_Title); + } + catch (Exception e) + { + e.printStackTrace(); + } + return stra_Result; + } + + public boolean deleteRule(String str_selete_item_type) + { + boolean b_result = true; + String[] stra_Field = getOriginOptions("origin_" + str_selete_item_type + + "_field", 4); + int int_Field = 0; + if ((stra_Field != null) && (stra_Field.length > 0)) { + try + { + int_Field = Integer.parseInt(stra_Field[0].split("oj")[1]); + } + catch (Exception localException) + { + System.out.println("󣡣\n ڶȡorigin_" + + str_selete_item_type + "_field﷨"); + } + } else { + b_result = false; + } + if (int_Field != 0) + { + b_result = deleteOption( + "origin_" + str_selete_item_type + "_field", 4); + b_result = deleteOption("origin_" + str_selete_item_type + + "_other_info", 4); + b_result = deleteOption("origin_" + str_selete_item_type + + "_options", 4); + for (int i = 0; i < int_Field; i++) + { + b_result = deleteOption("origin_" + str_selete_item_type + "_" + ( + i + 1) + "_", 4); + b_result = deleteOption("origin_" + str_selete_item_type + "_" + ( + i + 1) + "_", 4); + } + } + if (b_result) + { + String[] stra_all_regist_name = getOriginOptions( + "origin_item_names", 4); + if ((stra_all_regist_name != null) && (stra_all_regist_name.length > 0)) + { + Vector v_new_regist_name = new Vector(); + for (int i = 0; i < stra_all_regist_name.length; i++) { + if (!str_selete_item_type.equals(stra_all_regist_name[i])) { + v_new_regist_name.add(stra_all_regist_name[i]); + } + } + String[] stra_new_regist_names = new String[v_new_regist_name + .size()]; + for (int j = 0; j < stra_new_regist_names.length; j++) { + stra_new_regist_names[j] = + ((String)v_new_regist_name.get(j)); + } + addOptionsPreference(this.session, 4, "origin_item_names", + stra_new_regist_names); + } + } + return b_result; + } + + public boolean deleteOption(String str_Option_Title, int int_scope) + { + boolean b_result = true; + try + { + this.preferenceService.removeEntry(int_scope, str_Option_Title); + } + catch (Exception e) + { + b_result = false; + e.printStackTrace(); + } + return b_result; + } + + public boolean deleteOptions(String[] stra_Option_Title, int[] inta_scope) + { + boolean b_result = true; + try + { + this.preferenceService.removePreferencesFromCache(inta_scope, + stra_Option_Title); + } + catch (Exception e) + { + b_result = false; + e.printStackTrace(); + } + return b_result; + } + + public void addOptionsPreference(TCSession session, int int_scope, String str_Option_Title, String[] stra_Option_values) + { + try + { + TCPreferenceService preferenceService = session + .getPreferenceService(); + preferenceService.setStringArray(int_scope, str_Option_Title, + stra_Option_values); + System.out.println("Optionsֵӳɹ"); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public HashMap getCodeRuleMessage(String str_CodeRuleName) + { + HashMap hm_result = null; + + String[] stra_filed = getOriginOptions("origin_" + str_CodeRuleName + + "_field", 4); + + String[] other_info = getOriginOptions("origin_" + str_CodeRuleName + + "_other_info", 4); + + String[] stra_options = getOriginOptions("origin_" + str_CodeRuleName + + "_options", 4); + if ((stra_filed != null) && (stra_filed.length > 0)) { + try + { + int int_filed_count = + Integer.parseInt(stra_filed[0].split("oj")[1]); + Vector v_Style_Content = new Vector(); + for (int i = 1; i <= int_filed_count; i++) + { + String[] stra_style = getOriginOptions("origin_" + + str_CodeRuleName + "_" + i + "_", 4); + String[] stra_content = getOriginOptions("origin_" + + str_CodeRuleName + "_" + i + "_", 4); + Vector v_temp = new Vector(); + v_temp.add(stra_style); + v_temp.add(stra_content); + v_Style_Content.add(v_temp); + } + hm_result = new HashMap(); + hm_result.put("origin_" + str_CodeRuleName + "_field", + stra_filed); + hm_result.put("origin_" + str_CodeRuleName + "_other_info", + other_info); + hm_result.put("origin_" + str_CodeRuleName + "_options", + stra_options); + hm_result.put("origin_" + str_CodeRuleName + "__", + v_Style_Content); + } + catch (Exception e) + { + JOptionPane.showMessageDialog(null, "ݲ鿴⣡", "", 2); + e.printStackTrace(); + } + } + return hm_result; + } + + public HashMap getFinalCodeRuleMessage(String str_CodeRuleName) + { + HashMap hm_result = null; + HashMap hm_first_get = getCodeRuleMessage(str_CodeRuleName); + try + { + hm_result = new HashMap(); + + String[] stra_temp = (String[])hm_first_get.get("origin_" + + str_CodeRuleName + "_field"); + String str_ZCS_MDS = stra_temp[0].split("oj")[1]; + hm_result.put("_", str_ZCS_MDS); + + String[] stra_other_info = (String[])hm_first_get.get("origin_" + + str_CodeRuleName + "_other_info"); + String[] stra_ZCS_LSHWZ = stra_other_info[0].split("oj")[1] + .split("/"); + if ((stra_ZCS_LSHWZ != null) && (stra_ZCS_LSHWZ.length > 0)) { + for (int i = 0; i < stra_ZCS_LSHWZ.length; i++) { + hm_result.put("" + (i + 1) + "_", stra_ZCS_LSHWZ[i]); + } + } + String[] stra_options = (String[])hm_first_get.get("origin_" + + str_CodeRuleName + "_options"); + if ((stra_options != null) && (stra_options.length > 0)) + { + String str_ItemIDEdable = stra_options[0].split("oj")[1]; + hm_result.put("ItemIDɱ༭", str_ItemIDEdable); + String str_LiuShuiHaoXinXi = stra_options[1].split("oj")[1]; + String[] stra_LiuShuiHaoXinXi = str_LiuShuiHaoXinXi.split("/"); + if ((stra_LiuShuiHaoXinXi != null) && + (stra_LiuShuiHaoXinXi.length >= 4)) + { + String str_WeiShu = stra_LiuShuiHaoXinXi[0]; + hm_result.put("ˮ_λ", str_WeiShu); + String str_QiShiZhi = stra_LiuShuiHaoXinXi[1]; + hm_result.put("ˮ_ʼֵ", str_QiShiZhi); + String str_ZhongZhiZhi = stra_LiuShuiHaoXinXi[2]; + hm_result.put("ˮ_ֵֹ", str_ZhongZhiZhi); + String str_BuChang = stra_LiuShuiHaoXinXi[3]; + hm_result.put("ˮ_", str_BuChang); + } + else + { + System.out.println("ע⣡\nļУˮϢ⣡"); + } + String str_ItemNameSetValueTo = stra_options[2].split("oj")[1]; + String[] stra_ItemNameSetValueTo = str_ItemNameSetValueTo + .split("/"); + if ((stra_ItemNameSetValueTo != null) && + (stra_ItemNameSetValueTo.length >= 2)) + { + hm_result.put("Item Nameֵ", stra_ItemNameSetValueTo[0]); + hm_result.put("Nameľ", stra_ItemNameSetValueTo[1]); + } + else + { + System.out.println("ע⣡\nļУItemNameֵϢ⣡"); + } + String str_ShouDongBianMa = stra_options[3].split("oj")[1]; + hm_result.put("ֶ", str_ShouDongBianMa); + + String str_LiuShuiHaoWeiZhi = stra_options[4].split("oj")[1]; + String[] stra_LiuShuiHaoWeiZhi = str_LiuShuiHaoWeiZhi + .split("/"); + if ((stra_LiuShuiHaoWeiZhi != null) && + (stra_LiuShuiHaoWeiZhi.length >= 2)) + { + // stra_LiuShuiHaoWeiZhi[0]; + // stra_LiuShuiHaoWeiZhi[1]; + hm_result.put("ˮλ_", stra_LiuShuiHaoWeiZhi[0]); + hm_result.put("ˮλ", stra_LiuShuiHaoWeiZhi[1]); + } + else + { + System.out.println("ע⣡\nļУˮλϢ⣡"); + } + try + { + String str_ItemIDSetValueTo = stra_options[5].split("oj")[1]; + String[] stra_ItemIDSetValueTo = str_ItemIDSetValueTo + .split("/"); + if ((stra_ItemIDSetValueTo != null) && + (stra_ItemIDSetValueTo.length >= 2)) + { + hm_result.put("Item IDֵ", stra_ItemIDSetValueTo[0]); + hm_result + .put("ItemIDľ", stra_ItemIDSetValueTo[1]); + } + else + { + System.out.println("ע⣡\nļУItemIDֵ⣡﷨ǷIDֵԡojyes/shPrtEnN"); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + Vector v_Style_Contain = (Vector)hm_first_get.get("origin_" + + str_CodeRuleName + "__"); + System.out.println("ͺݱǩ:\nv_Style_Contain.size()=" + + v_Style_Contain.size()); + if ((v_Style_Contain != null) && (v_Style_Contain.size() > 0)) { + for (int i = 0; i < v_Style_Contain.size(); i++) + { + Vector v_temp = (Vector)v_Style_Contain.get(i); + if (v_temp.size() > 0) + { + String[] stra_Style = (String[])v_temp.get(0); + if (stra_Style.length >= 4) + { + String str_LeiXing = stra_Style[0]; + str_LeiXing = str_LeiXing.split("oj")[1]; + hm_result.put("" + (i + 1) + "_", str_LeiXing); + String str_ShiFouChengWeiGuiZeZiDuan = stra_Style[1]; + str_ShiFouChengWeiGuiZeZiDuan = str_ShiFouChengWeiGuiZeZiDuan + .split("oj")[1]; + hm_result.put("" + (i + 1) + "_ǷΪֶ", + str_ShiFouChengWeiGuiZeZiDuan); + String str_ShuXingFuZhiXinXi = stra_Style[2]; + str_ShuXingFuZhiXinXi = str_ShuXingFuZhiXinXi + .split("oj")[1]; + String[] stra_ShuXingFuZhiXinXi = str_ShuXingFuZhiXinXi + .split("/"); + if (stra_ShuXingFuZhiXinXi.length >= 4) + { + hm_result.put("" + (i + 1) + "_Ըֵ", + stra_ShuXingFuZhiXinXi[0]); + hm_result.put("" + (i + 1) + "_ֵı", + stra_ShuXingFuZhiXinXi[1]); + hm_result.put("" + (i + 1) + "_ֵı", + stra_ShuXingFuZhiXinXi[2]); + hm_result.put("" + (i + 1) + "_ʾֵڲֵ", + stra_ShuXingFuZhiXinXi[3]); + } + else + { + System.out.println("" + (i + 1) + + "_ԸֵϢ!"); + hm_result.put("" + (i + 1) + "_Ըֵ", "no"); + } + String str_ShiFouCanYuTeZhengMa = stra_Style[3]; + str_ShiFouCanYuTeZhengMa = str_ShiFouCanYuTeZhengMa + .split("oj")[1]; + hm_result.put("" + (i + 1) + "_Ƿ", + str_ShiFouCanYuTeZhengMa); + } + String[] stra_Content = (String[])v_temp.get(1); + Object[][] obja2 = new Object[stra_Content.length][]; + for (int k = 0; k < stra_Content.length; k++) + { + String[] stra = stra_Content[k].split("oj"); + Object[] obja = new Object[2]; + obja[0] = stra[0]; + obja[1] = stra[1]; + obja2[k] = obja; + } + hm_result.put("" + (i + 1) + "_ݶά", obja2); + } + else + { + System.out.println("AutoCodeBean.java338ȡͺݱǩDzƥ䣬VectorijΪ2ַ飬"); + } + } + } + } + catch (Exception e) + { + hm_result = null; + e.printStackTrace(); + } + return hm_result; + } + + public void StringBufferDemo(String strContext, String strFileName) + throws IOException + { + File file = new File("C:\\" + strFileName); + if (!file.exists()) { + file.createNewFile(); + } + FileOutputStream out = new FileOutputStream(file, true); + StringBuffer sb = new StringBuffer(strContext); + out.write(sb.toString().getBytes("gb2312")); + out.close(); + } + + public void displayInfo() + { + try + { + for (int j = 0; j < this.tc_component_type_a.length; j++) + { + Map abac = this.tc_component_type_a[j] + .getProperties(); + Set> en = abac.entrySet(); + Iterator> eii = en.iterator(); + while (eii.hasNext()) { + this.strDisplay_getProperties = + (this.strDisplay_getProperties + eii.next() + "\n"); + } + this.strInnerDisplay = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (this.strInnerDisplay + "" + this.tc_component_type_a[j].getTypeName() + "\n" + "tc_component_type_a[" + j + "].getTypeName()=" + this.tc_component_type_a[j].getTypeName() + "\n" + "tc_component_type_a[" + j + "].getAuditInfo(true)=" + this.tc_component_type_a[j].getAuditInfo(true) + "\n" + "tc_component_type_a[" + j + "].getAuditInfo(false)=" + this.tc_component_type_a[j].getAuditInfo(false) + "\n" + "tc_component_type_a[" + j + "].getChildrenCount()=" + this.tc_component_type_a[j].getChildrenCount() + "\n" + "tc_component_type_a[" + j + "].getClassificationClass()=" + this.tc_component_type_a[j].getClassificationClass() + "\n" + "tc_component_type_a[" + j + "].getClassificationSubclass()=" + this.tc_component_type_a[j].getClassificationSubclass() + "\n" + "tc_component_type_a[" + j + "].getClassType()=" + this.tc_component_type_a[j].getClassType() + "\n" + "tc_component_type_a[" + j + "].getDefaultPasteRelation()=" + this.tc_component_type_a[j].getDefaultPasteRelation() + "\n" + "tc_component_type_a[" + j + "].getObjectString()=" + this.tc_component_type_a[j].getObjectString() + "\n" + "tc_component_type_a[" + j + "].getServerEncodingName()=" + this.tc_component_type_a[j].getServerEncodingName() + "\n" + "tc_component_type_a[" + j + "].getSubType()=" + this.tc_component_type_a[j].getSubType() + "\n" + "tc_component_type_a[" + j + "].getToStringProperty()=" + this.tc_component_type_a[j].getToStringProperty() + "\n" + "tc_component_type_a[" + j + "].getType()=" + this.tc_component_type_a[j].getType() + "\n" + "tc_component_type_a[" + j + "].getUid()=" + this.tc_component_type_a[j].getUid() + "\n" + "tc_component_type_a[" + j + "].getWebURL()=" + this.tc_component_type_a[j].getWebURL() + "\n" + "tc_component_type_a[" + j + "].getWhereReferencedCount()=" + this.tc_component_type_a[j].getWhereReferencedCount() + "\n" + "tc_component_type_a[" + j + "].getKey()=" + (String)((Map.Entry)this.tc_component_type_a[j]).getKey() + "\n" + "tc_component_type_a[" + j + "].getProperties()=" + this.tc_component_type_a[j].getProperties() + "\n" + "-------------START--------------------TCComponentTypegetProperties()---------------START----------------" + "\n" + this.strDisplay_getProperties + "--------------END---------------------TCComponentTypegetProperties()----------------END-----------------" + "\n" + "tc_component_type_a[" + j + "].getPasteRelationNames()=" + this.tc_component_type_a[j].getPasteRelationNames() + "\n" + "tc_component_type_a[" + j + "].getPropertyNames()=" + this.tc_component_type_a[j].getPropertyNames() + "\n"); + + + + System.out + .println("=========================ItemTypeϢ=============================\n" + + this.strInnerDisplay); + + + this.strDisplayItem = + (this.strDisplayItem + this.tc_component_type_a[j].getTypeName() + "\n"); + } + this.starItemTypeNames = this.session.getTypeService().getTypeNames(); + for (int k = 0; k < this.starItemTypeNames.length; k++) { + this.strDisplayAllType = + (this.strDisplayAllType + this.starItemTypeNames[k] + "\n"); + } + System.out.println("=====================Ϣsession.getTypeService().getTypeNames()====================\n" + + this.strDisplayAllType + + "=====================Ϣsession.getTypeService().getTypes(\"Item\")====================\n" + + this.strDisplayItem); + + + Calendar c = Calendar.getInstance(); + Date date = c.getTime(); + String strDate = new SimpleDateFormat().format(date); + this.strFile_Display1 = + + + + + + + ("\n====================================ItemTypeϢ==========================================\n" + this.strInnerDisplay + "=====================Ϣsession.getTypeService().getTypeNames()===================\n" + this.strDisplayAllType + "=====================Ϣsession.getTypeService().getTypes(\"Item\")================\n" + this.strDisplayItem + "=====================־ڡ================\n" + strDate + " Kelsen Xu\n\n\n\n"); + StringBufferDemo(this.strFile_Display1, "K_Item_Info.log"); + } + catch (Exception e) + { + e.printStackTrace(); + } + } +} diff --git a/src/com/origin/beans/KSearchDialog.java b/src/com/origin/beans/KSearchDialog.java new file mode 100644 index 0000000..b1f2a30 --- /dev/null +++ b/src/com/origin/beans/KSearchDialog.java @@ -0,0 +1,555 @@ +package com.origin.beans; + +import com.teamcenter.rac.util.Registry; +import java.awt.AWTException; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Container; +import java.awt.FlowLayout; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.PrintStream; +import java.util.Vector; +import javax.swing.ImageIcon; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextField; +import javax.swing.event.AncestorEvent; +import javax.swing.event.AncestorListener; + +public class KSearchDialog + extends JDialog + implements MouseListener, KeyListener +{ + public JScrollPane jsp; + public JList listMy; + JPanel pMain; + Container con; + String[] stra; + Vector vMain; + JTextField txtBeSet; + JPanel pBottom; + JLabel lblClose; + JDialog dialogK; + ImageIcon iiClose_1; + ImageIcon iiClose_2; + + public KSearchDialog(JDialog d, JTextField txtK, Vector vMain) + { + super(d); + this.dialogK = d; + this.txtBeSet = txtK; + this.vMain = vMain; + this.stra = new String[vMain.size()]; + this.lblClose = new JLabel("ر"); + this.pBottom = new JPanel(); + this.pBottom.add(new JLabel(" ")); + this.pBottom.add(this.lblClose); + this.lblClose.addMouseListener(this); + this.pBottom.setBackground(Color.LIGHT_GRAY); + for (int i = 0; i < this.stra.length; i++) { + this.stra[i] = ((String)vMain.get(i)); + } + this.listMy = new JList(this.stra); + this.jsp = new JScrollPane(this.listMy); + this.con = getContentPane(); + this.con.setLayout(new BorderLayout()); + this.con.add("Center", this.jsp); + this.con.add("South", this.pBottom); + this.listMy.addMouseListener(this); + this.listMy.addKeyListener(this); + setUndecorated(true); + setSize(150, 150); + } + + public KSearchDialog(JDialog d, JTextField txtK, String[] stra_Main) + { + super(d); + this.dialogK = d; + this.txtBeSet = txtK; + this.stra = stra_Main; + this.lblClose = new JLabel("ر"); + this.pBottom = new JPanel(); + this.pBottom.add(new JLabel(" ")); + this.pBottom.add(this.lblClose); + this.lblClose.addMouseListener(this); + this.pBottom.setBackground(Color.LIGHT_GRAY); + for (int i = 0; i < this.stra.length; i++) { + this.stra[i] = ((String)this.vMain.get(i)); + } + this.listMy = new JList(this.stra); + this.jsp = new JScrollPane(this.listMy); + this.con = getContentPane(); + this.con.setLayout(new BorderLayout()); + this.con.add("Center", this.jsp); + this.con.add("South", this.pBottom); + this.listMy.addMouseListener(this); + this.listMy.addKeyListener(this); + setUndecorated(true); + setSize(150, 150); + } + + public KSearchDialog(JDialog d, JTextField txtK, Vector vMain, boolean selfFlag) + { + super(d); + + this.dialogK = d; + this.txtBeSet = txtK; + this.vMain = vMain; + this.stra = new String[vMain.size()]; + this.lblClose = new JLabel("ر"); + this.pBottom = new JPanel(); + this.pBottom.add(new JLabel(" ")); + this.pBottom.add(this.lblClose); + this.lblClose.addMouseListener(this); + this.pBottom.setBackground(Color.LIGHT_GRAY); + for (int i = 0; i < this.stra.length; i++) { + this.stra[i] = ((String)vMain.get(i)); + } + this.listMy = new JList(this.stra); + this.jsp = new JScrollPane(this.listMy); + this.con = getContentPane(); + this.con.setLayout(new BorderLayout()); + this.con.add("Center", this.jsp); + this.con.add("South", this.pBottom); + this.listMy.addMouseListener(this); + this.listMy.addKeyListener(this); + setUndecorated(true); + setSize(150, 150); + + + this.txtBeSet.addKeyListener(new KeyAdapter() + { + int iCount = 0; + int iSelect = 0; + + public void keyReleased(KeyEvent ke) + { + if ((this.iCount == 0) && (KSearchDialog.this != null)) + { + KSearchDialog.this.setLocation( + + KSearchDialog.this.txtBeSet.getLocationOnScreen().x, + + KSearchDialog.this.txtBeSet.getLocationOnScreen().y + 25); + KSearchDialog.this.setVisible(true); + this.iCount = 1; + } + if ((KSearchDialog.this != null) && (ke.getKeyCode() != 40) && + (ke.getKeyCode() != 17) && + (ke.getKeyCode() != 37) && + (ke.getKeyCode() != 39)) + { + String strContain = KSearchDialog.this.txtBeSet.getText(); + Vector vFinal = new Vector(); + String strTemp = ""; + for (int i = 0; i < KSearchDialog.this.vMain.size(); i++) + { + strTemp = (String)KSearchDialog.this.vMain.get(i); + if (strTemp.contains(strContain)) { + vFinal.add(strTemp); + } + } + String[] straFinal = new String[vFinal + .size()]; + for (int i = 0; i < straFinal.length; i++) { + straFinal[i] = ((String)vFinal.get(i)); + } + KSearchDialog.this.kUpLoad(straFinal); + + this.iSelect = 0; + } + else if ((KSearchDialog.this != null) && (ke.getKeyCode() == 40) && + (this.iSelect == 0)) + { + KSearchDialog.this.dialogK.setEnabled(false); + KSearchDialog.this.setEnabled(true); + KSearchDialog.this.listMy.setSelectedIndex(0); + KSearchDialog.this.listMy.requestFocus(); + this.iSelect = 1; + } + } + }); + } + + public void setKtxtBeSetAndKVector(JTextField txt_k, Vector v_k) + { + this.txtBeSet = txt_k; + this.vMain = v_k; + setVisible(true); + } + + public KSearchDialog(JDialog d, JTextField txtK, Vector vMain, Registry fappReg) + { + super(d); + + + + this.iiClose_1 = fappReg.getImageIcon("error.ICON"); + this.iiClose_2 = fappReg.getImageIcon("close.ICON"); + this.dialogK = d; + this.txtBeSet = txtK; + this.vMain = vMain; + this.stra = new String[vMain.size()]; + this.lblClose = new JLabel(this.iiClose_1); + this.pBottom = new JPanel(); + this.pBottom.add(new JLabel(" ")); + this.pBottom.add(this.lblClose); + this.lblClose.addMouseListener(this); + this.pBottom.setBackground(Color.LIGHT_GRAY); + for (int i = 0; i < this.stra.length; i++) { + this.stra[i] = ((String)vMain.get(i)); + } + this.listMy = new JList(this.stra); + this.jsp = new JScrollPane(this.listMy); + this.con = getContentPane(); + this.con.setLayout(new BorderLayout()); + this.con.add("Center", this.jsp); + this.con.add("South", this.pBottom); + this.listMy.addMouseListener(this); + this.listMy.addKeyListener(this); + setUndecorated(true); + setSize(150, 150); + } + + public KSearchDialog(JDialog d, JTextField txtK, Vector vMain, Registry fappReg, boolean bFlag) + { + super(d); + this.iiClose_1 = fappReg.getImageIcon("error.ICON"); + this.iiClose_2 = fappReg.getImageIcon("close.ICON"); + this.dialogK = d; + this.txtBeSet = txtK; + this.vMain = vMain; + this.stra = new String[vMain.size()]; + this.lblClose = new JLabel(this.iiClose_1); + this.pBottom = new JPanel(); + this.pBottom.setLayout(new BorderLayout()); + this.pBottom.add("East", this.lblClose); + this.lblClose.addMouseListener(this); + this.pBottom.setBackground(Color.LIGHT_GRAY); + for (int i = 0; i < this.stra.length; i++) { + this.stra[i] = ((String)vMain.get(i)); + } + this.listMy = new JList(this.stra); + this.jsp = new JScrollPane(this.listMy); + this.con = getContentPane(); + this.con.setLayout(new BorderLayout()); + this.con.add("Center", this.jsp); + this.con.add("South", this.pBottom); + this.listMy.addMouseListener(this); + this.listMy.addKeyListener(this); + setUndecorated(true); + setSize(this.txtBeSet.getWidth(), 150); + this.txtBeSet.addKeyListener(new KeyAdapter() + { + int iSelect = 0; + + public void keyReleased(KeyEvent ke) + { + if (!KSearchDialog.this.isVisible()) + { + KSearchDialog.this.setLocation( + + KSearchDialog.this.txtBeSet.getLocationOnScreen().x, + + KSearchDialog.this.txtBeSet.getLocationOnScreen().y + 25); + KSearchDialog.this.setVisible(true); + KSearchDialog.this.txtBeSet.requestFocus(); + try + { + Robot myRobot = new Robot(); + myRobot.keyPress(37); + myRobot.keyPress(39); + myRobot = null; + } + catch (AWTException e) + { + e.printStackTrace(); + } + } + if ((KSearchDialog.this != null) && (ke.getKeyCode() != 40) && + (ke.getKeyCode() != 17) && + (ke.getKeyCode() != 37) && + (ke.getKeyCode() != 39)) + { + String strContain = KSearchDialog.this.txtBeSet.getText(); + Vector vFinal = new Vector(); + String strTemp = ""; + for (int i = 0; i < KSearchDialog.this.vMain.size(); i++) + { + strTemp = (String)KSearchDialog.this.vMain.get(i); + if (strTemp.contains(strContain)) { + vFinal.add(strTemp); + } + } + String[] straFinal = new String[vFinal + .size()]; + for (int i = 0; i < straFinal.length; i++) { + straFinal[i] = ((String)vFinal.get(i)); + } + KSearchDialog.this.kUpLoad(straFinal); + + this.iSelect = 0; + } + else if ((KSearchDialog.this != null) && (ke.getKeyCode() == 40) && + (this.iSelect == 0)) + { + KSearchDialog.this.dialogK.setEnabled(false); + KSearchDialog.this.setEnabled(true); + KSearchDialog.this.listMy.setSelectedIndex(0); + KSearchDialog.this.listMy.requestFocus(); + this.iSelect = 1; + } + if ((KSearchDialog.this != null) && (ke.getKeyCode() == 10)) { + KSearchDialog.this.setVisible(false); + } + } + }); + this.txtBeSet.addAncestorListener(new AncestorListener() + { + public void ancestorAdded(AncestorEvent event) {} + + public void ancestorMoved(AncestorEvent event) {} + + public void ancestorRemoved(AncestorEvent event) + { + KSearchDialog.this.setVisible(false); + } + }); + this.txtBeSet.requestFocus(); + } + + public KSearchDialog(JDialog d, JTextField txtK, String[] stra_Main, Registry fappReg, boolean bFlag) + { + super(d); + this.iiClose_1 = fappReg.getImageIcon("error.ICON"); + this.iiClose_2 = fappReg.getImageIcon("close.ICON"); + this.dialogK = d; + this.txtBeSet = txtK; + this.stra = stra_Main; + this.lblClose = new JLabel(this.iiClose_1); + this.pBottom = new JPanel(); + this.pBottom.setLayout(new BorderLayout()); + this.pBottom.add("East", this.lblClose); + this.lblClose.addMouseListener(this); + this.pBottom.setBackground(Color.LIGHT_GRAY); + + + + this.listMy = new JList(this.stra); + this.jsp = new JScrollPane(this.listMy); + this.con = getContentPane(); + this.con.setLayout(new BorderLayout()); + this.con.add("Center", this.jsp); + this.con.add("South", this.pBottom); + this.listMy.addMouseListener(this); + this.listMy.addKeyListener(this); + setUndecorated(true); + setSize(this.txtBeSet.getWidth(), 150); + this.txtBeSet.addKeyListener(new KeyAdapter() + { + int iSelect = 0; + + public void keyReleased(KeyEvent ke) + { + if (!KSearchDialog.this.isVisible()) + { + KSearchDialog.this.setLocation( + + KSearchDialog.this.txtBeSet.getLocationOnScreen().x, + + KSearchDialog.this.txtBeSet.getLocationOnScreen().y + 25); + KSearchDialog.this.setVisible(true); + KSearchDialog.this.txtBeSet.requestFocus(); + try + { + Robot myRobot = new Robot(); + myRobot.keyPress(37); + myRobot.keyPress(39); + myRobot = null; + } + catch (AWTException e) + { + e.printStackTrace(); + } + } + if ((KSearchDialog.this != null) && (ke.getKeyCode() != 40) && + (ke.getKeyCode() != 17) && + (ke.getKeyCode() != 37) && + (ke.getKeyCode() != 39)) + { + String strContain = KSearchDialog.this.txtBeSet.getText(); + Vector vFinal = new Vector(); + String strTemp = ""; + for (int i = 0; i < KSearchDialog.this.stra.length; i++) + { + strTemp = KSearchDialog.this.stra[i]; + if (strTemp.contains(strContain)) { + vFinal.add(strTemp); + } + } + String[] straFinal = new String[vFinal + .size()]; + for (int i = 0; i < straFinal.length; i++) { + straFinal[i] = ((String)vFinal.get(i)); + } + KSearchDialog.this.kUpLoad(straFinal); + + this.iSelect = 0; + } + else if ((KSearchDialog.this != null) && (ke.getKeyCode() == 40) && + (this.iSelect == 0)) + { + KSearchDialog.this.dialogK.setEnabled(false); + KSearchDialog.this.setEnabled(true); + KSearchDialog.this.listMy.setSelectedIndex(0); + KSearchDialog.this.listMy.requestFocus(); + this.iSelect = 1; + } + if ((KSearchDialog.this != null) && (ke.getKeyCode() == 10)) { + KSearchDialog.this.setVisible(false); + } + } + }); + this.txtBeSet.addAncestorListener(new AncestorListener() + { + public void ancestorAdded(AncestorEvent event) {} + + public void ancestorMoved(AncestorEvent event) {} + + public void ancestorRemoved(AncestorEvent event) + { + KSearchDialog.this.setVisible(false); + } + }); + this.txtBeSet.requestFocus(); + } + + public void kUpLoad(String[] straK) + { + this.listMy = new JList(straK); + this.listMy.addMouseListener(this); + this.listMy.addKeyListener(this); + this.jsp = new JScrollPane(this.listMy); + this.con.removeAll(); + this.con.add("Center", this.jsp); + this.con.add("South", this.pBottom); + this.con.repaint(); + this.con.validate(); + this.con.setVisible(false); + this.con.setVisible(true); + setLocation(this.txtBeSet.getLocationOnScreen().x, + this.txtBeSet.getLocationOnScreen().y + 25); + } + + public void mouseClicked(MouseEvent me) + { + if (me.getComponent() == this.lblClose) + { + this.lblClose.setForeground(Color.black); + setVisible(false); + } + else if ((me.getComponent() == this.listMy) && + (me.getClickCount() == 2)) + { + this.txtBeSet.setText(String.valueOf(this.listMy.getSelectedValue())); + this.dialogK.setEnabled(true); + setVisible(false); + } + } + + public void mouseEntered(MouseEvent e) + { + if (e.getComponent() == this.lblClose) { + if (this.iiClose_2 != null) { + this.lblClose.setIcon(this.iiClose_2); + } else { + this.lblClose.setForeground(Color.red); + } + } + } + + public void mouseExited(MouseEvent e) + { + if (e.getComponent() == this.lblClose) + { + if (this.iiClose_1 != null) { + this.lblClose.setIcon(this.iiClose_1); + } else { + this.lblClose.setForeground(Color.black); + } + } + else if (e.getComponent() == this.listMy) { + this.dialogK.setEnabled(true); + } + } + + public void mousePressed(MouseEvent e) {} + + public void mouseReleased(MouseEvent e) {} + + public void keyPressed(KeyEvent e) {} + + public void keyReleased(KeyEvent ke) + { + if (ke.getComponent() == this.listMy) { + if ((this.txtBeSet != null) && (this.dialogK != null)) + { + if (ke.getKeyCode() == 10) + { + this.txtBeSet.setText(String.valueOf(this.listMy.getSelectedValue())); + this.dialogK.setEnabled(true); + this.txtBeSet.requestFocus(); + setVisible(false); + } + } + else { + System.out.println("ע⣺txtBeSetnull"); + } + } + } + + public void keyTyped(KeyEvent e) {} + + public static void main(String[] args) + { + Vector vMain = new Vector(); + + vMain.add(new String("kelsen")); + vMain.add(new String("ken")); + vMain.add(new String("jerry")); + vMain.add(new String("mandy")); + vMain.add(new String("happy")); + vMain.add(new String("jim")); + vMain.add(new String("kelly")); + vMain.add(new String("shirly")); + vMain.add(new String("welly")); + vMain.add(new String("susan")); + vMain.add(new String("")); + vMain.add(new String("")); + vMain.add(new String("")); + vMain.add(new String("н")); + vMain.add(new String("ӵ")); + vMain.add(new String("")); + vMain.add(new String("")); + vMain.add(new String("")); + vMain.add(new String("ⷢͼֽ")); + vMain.add(new String("")); + JTextField txtInput = new JTextField(15); + JDialog dialog = new JDialog(); + Container con = dialog.getContentPane(); + con.setLayout(new FlowLayout()); + new KSearchDialog(dialog, txtInput, vMain, true); + con.add(txtInput); + dialog.setSize(300, 300); + dialog.setVisible(true); + } +} diff --git a/src/com/origin/beans/KelsenJList.java b/src/com/origin/beans/KelsenJList.java new file mode 100644 index 0000000..d107140 --- /dev/null +++ b/src/com/origin/beans/KelsenJList.java @@ -0,0 +1,34 @@ +package com.origin.beans; + +import java.awt.BorderLayout; +import javax.swing.DefaultListModel; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; + +public class KelsenJList + extends JPanel +{ + JLabel iconLabel = null; + JList iconJList = null; + DefaultListModel dlm; + + public KelsenJList(Object[][] obj) + { + this.dlm = new DefaultListModel(); + for (int i = 0; i < obj.length; i++) { + this.dlm.addElement(obj[i]); + } + this.iconJList = new JList(this.dlm); + iconJList.setCellRenderer(new KelsenJListCellRenderer()); + JScrollPane jsp = new JScrollPane(this.iconJList); + setLayout(new BorderLayout()); + add(jsp); + } + + public JList getJList() + { + return this.iconJList; + } +} diff --git a/src/com/origin/beans/KelsenJListCellRenderer.java b/src/com/origin/beans/KelsenJListCellRenderer.java new file mode 100644 index 0000000..9b27e2f --- /dev/null +++ b/src/com/origin/beans/KelsenJListCellRenderer.java @@ -0,0 +1,102 @@ +package com.origin.beans; + +import java.awt.Color; +import java.awt.Component; +import java.io.PrintStream; +import javax.swing.Icon; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.ListCellRenderer; + +class KelsenJListCellRenderer + extends JLabel + implements ListCellRenderer +{ + boolean b_back_color = false; + + KelsenJListCellRenderer() + { + setOpaque(true); + } + + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) + { + Object[] obja = (Object[])value; + if (value != null) + { + setText(String.valueOf(obja[1])); + setIcon((Icon)obja[0]); + setToolTipText(String.valueOf(obja[2])); + } + if (isSelected) + { + setBackground(list.getSelectionBackground()); + setForeground(list.getSelectionForeground()); + } + else + { + String str_BiaoShi = ""; + try + { + String[] stra_1 = String.valueOf(obja[2]).split(""); + if (stra_1.length >= 2) + { + String str_1 = stra_1[1]; + String[] stra_2 = str_1.split(""); + if (stra_2.length >= 1) + { + String str_2 = stra_2[0]; + str_BiaoShi = str_2; + } + else + { + System.out.println("[[[[ г룺JListȱ \")\" ]]]]"); + } + } + } + catch (Exception e) + { + e.printStackTrace(); + } + if ((str_BiaoShi.equals("Ѱ󶨱")) && (!this.b_back_color)) + { + setBackground(Color.decode("#FCFBAB")); + setForeground(list.getForeground()); + this.b_back_color = true; + } + else if ((str_BiaoShi.equals("Ѱ󶨱")) && (this.b_back_color)) + { + setBackground(Color.decode("#C1D0FF")); + setForeground(list.getForeground()); + this.b_back_color = false; + } + else + { + setBackground(list.getBackground()); + setForeground(list.getForeground()); + this.b_back_color = false; + } + } + return this; + } + + public static void main(String[] args) + { + String str_temp = "Ϊ: shecitemѰ󶨱"; + String[] stra_1 = str_temp.split(""); + if (stra_1.length >= 2) + { + String str_1 = stra_1[1]; + String[] stra_2 = str_1.split(""); + if (stra_2.length >= 1) + { + String str_2 = stra_2[0]; + System.out.println(str_2); + } + else + { + System.out.println("[[[[ г룺JListȱ \")\" ]]]]"); + } + } + } +} diff --git a/src/com/origin/beans/KelsenMoveThread.java b/src/com/origin/beans/KelsenMoveThread.java new file mode 100644 index 0000000..8167451 --- /dev/null +++ b/src/com/origin/beans/KelsenMoveThread.java @@ -0,0 +1,134 @@ +package com.origin.beans; + +import java.awt.Container; +import java.awt.FlowLayout; +import javax.swing.JFrame; +import javax.swing.JLabel; + +public class KelsenMoveThread + extends Thread +{ + private String strTitle; + private String str1; + private String str2; + Object component; + boolean flag = false; + Thread threadOutside = null; + String strSpace = " "; + + public KelsenMoveThread(Object objJComponent) + { + this.str1 = ""; + this.strSpace = " "; + if ((objJComponent instanceof JFrame)) + { + JFrame jframe = (JFrame)objJComponent; + this.strTitle = jframe.getTitle(); + } + else if ((objJComponent instanceof JLabel)) + { + JLabel jlabel = (JLabel)objJComponent; + this.strTitle = jlabel.getText(); + } + else + { + this.strTitle = "dddd"; + } + this.component = objJComponent; + } + + public KelsenMoveThread(Object objJComponent, Thread kthread) + { + this.str1 = ""; + this.strSpace = " "; + if ((objJComponent instanceof JFrame)) + { + JFrame jframe = (JFrame)objJComponent; + this.strTitle = jframe.getTitle(); + } + else if ((objJComponent instanceof JLabel)) + { + JLabel jlabel = (JLabel)objJComponent; + this.strTitle = jlabel.getText(); + } + else + { + this.strTitle = "dddd"; + } + this.component = objJComponent; + this.threadOutside = kthread; + } + + public void run() + { + if (this.threadOutside != null) + { + JLabel jlabel = (JLabel)this.component; + jlabel.setText(""); + try + { + sleep(1000L); + } + catch (Exception localException1) {} + } + for (int j = 0; j < this.strTitle.length(); j++) + { + try + { + sleep(1L); + } + catch (Exception localException2) {} + this.str2 = new String(this.strSpace + this.strTitle.charAt(j)); + int i = this.str2.length(); + for (int k = 0; k < i - 1; k++) + { + try + { + sleep(2L); + } + catch (Exception localException3) {} + if ((this.component instanceof JFrame)) + { + JFrame jframe = (JFrame)this.component; + jframe.setTitle(this.str1 + this.str2); + } + if ((this.component instanceof JLabel)) + { + JLabel jlabel = (JLabel)this.component; + jlabel.setText(this.str1 + this.str2); + } + this.str2 = this.str2.substring(1, this.str2.length()); + } + this.str1 += this.str2; + if (j == this.strTitle.length() - 1) { + try + { + if (this.threadOutside == null) { + break; + } + this.threadOutside.start(); + } + catch (Exception localException4) + { + j = -1; + this.str1 = ""; + } + } + } + } + + public static void main(String[] args) + { + JFrame frame = new JFrame("ʹռ䷨ĵط "); + JLabel lbl = new JLabel("ABCDEFGHIJKLMN "); + Container con = frame.getContentPane(); + con.setLayout(new FlowLayout()); + con.add(lbl); + frame.setSize(500, 500); + frame.setVisible(true); + KelsenMoveThread kt = new KelsenMoveThread(frame); + kt.start(); + KelsenMoveThread kt2 = new KelsenMoveThread(lbl); + kt2.start(); + } +} diff --git a/src/com/origin/beans/KelsenStartWindow.java b/src/com/origin/beans/KelsenStartWindow.java new file mode 100644 index 0000000..df20f2b --- /dev/null +++ b/src/com/origin/beans/KelsenStartWindow.java @@ -0,0 +1,133 @@ +package com.origin.beans; + +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import java.awt.Color; +import java.awt.Container; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Toolkit; +import java.net.URL; +import javax.swing.ImageIcon; +import javax.swing.JLabel; +import javax.swing.JProgressBar; +import javax.swing.JWindow; + +public class KelsenStartWindow + extends JWindow + implements Runnable +{ + Thread splashThread; + JProgressBar progress; + private boolean B_KStartWindow_Flag = true; + public int intTime = 30; + AbstractAIFUIApplication app; + + public KelsenStartWindow(AbstractAIFUIApplication app) + { + this.app = app; + Container container = getContentPane(); + setCursor(Cursor.getPredefinedCursor(3)); + URL url = getClass().getResource("login.jpg"); + if (url != null) { + container.add(new JLabel(new ImageIcon(url)), "Center"); + } + this.progress = new JProgressBar(1, 100); + this.progress.setStringPainted(true); + this.progress.setString("ݼ,Ժ......"); + this.progress.setBackground(Color.white); + container.add(this.progress, "South"); + + Dimension screen = getToolkit().getScreenSize(); + pack(); + setLocation((screen.width - getSize().width) / 2, + (screen.height - getSize().height) / 2); + } + + public KelsenStartWindow() + { + this.app = this.app; + Container container = getContentPane(); + setCursor(Cursor.getPredefinedCursor(3)); + URL url = getClass().getResource("login.jpg"); + if (url != null) { + container.add(new JLabel(new ImageIcon(url)), "Center"); + } + this.progress = new JProgressBar(1, 100); + this.progress.setStringPainted(true); + this.progress.setString("ݼ,Ժ......................"); + this.progress.setBackground(Color.white); + container.add(this.progress, "South"); + + Dimension screen = getToolkit().getScreenSize(); + pack(); + setLocation((screen.width - getSize().width) / 2, + (screen.height - getSize().height) / 2); + } + + public KelsenStartWindow(int kintTime) + { + this.app = this.app; + this.intTime = kintTime; + Container container = getContentPane(); + setCursor(Cursor.getPredefinedCursor(3)); + URL url = getClass().getResource("login.jpg"); + if (url != null) { + container.add(new JLabel(new ImageIcon(url)), "Center"); + } + this.progress = new JProgressBar(1, 100); + this.progress.setStringPainted(true); + + this.progress.setString("Ժ..."); + this.progress.setBackground(Color.white); + container.add(this.progress, "South"); + + Dimension screen = getToolkit().getScreenSize(); + pack(); + setLocation((screen.width - getSize().width) / 2, + (screen.height - getSize().height) / 2); + } + + public void start() + { + toFront(); + this.splashThread = new Thread(this); + this.splashThread.start(); + } + + public void run() + { + setVisible(true); + try + { + for (;;) + { + Thread.sleep(this.intTime); + if (!this.B_KStartWindow_Flag) { + break; + } + this.progress.setValue(this.progress.getValue() + 1); + if (this.progress.getValue() == 100) { + this.progress.setValue(0); + } + } + } + catch (Exception ex) + { + ex.printStackTrace(); + + + dispose(); + } + } + + public void stop() + { + this.B_KStartWindow_Flag = false; + } + + public static void main(String[] args) + { + KelsenStartWindow splash = new KelsenStartWindow(160); + splash.start(); + } +} diff --git a/src/com/origin/images/BiaoTi_16.png b/src/com/origin/images/BiaoTi_16.png new file mode 100644 index 0000000..2443c09 Binary files /dev/null and b/src/com/origin/images/BiaoTi_16.png differ diff --git a/src/com/origin/images/Cancel2_16.png b/src/com/origin/images/Cancel2_16.png new file mode 100644 index 0000000..139a0f0 Binary files /dev/null and b/src/com/origin/images/Cancel2_16.png differ diff --git a/src/com/origin/images/Cancel_16.png b/src/com/origin/images/Cancel_16.png new file mode 100644 index 0000000..ff7184c Binary files /dev/null and b/src/com/origin/images/Cancel_16.png differ diff --git a/src/com/origin/images/ClearAll_16.png b/src/com/origin/images/ClearAll_16.png new file mode 100644 index 0000000..f565838 Binary files /dev/null and b/src/com/origin/images/ClearAll_16.png differ diff --git a/src/com/origin/images/Document_16.png b/src/com/origin/images/Document_16.png new file mode 100644 index 0000000..0c0654f Binary files /dev/null and b/src/com/origin/images/Document_16.png differ diff --git a/src/com/origin/images/FangDaBiaoGe_16.png b/src/com/origin/images/FangDaBiaoGe_16.png new file mode 100644 index 0000000..6569be4 Binary files /dev/null and b/src/com/origin/images/FangDaBiaoGe_16.png differ diff --git a/src/com/origin/images/Hand_16.png b/src/com/origin/images/Hand_16.png new file mode 100644 index 0000000..377d49c Binary files /dev/null and b/src/com/origin/images/Hand_16.png differ diff --git a/src/com/origin/images/Item_16.png b/src/com/origin/images/Item_16.png new file mode 100644 index 0000000..6ff9793 Binary files /dev/null and b/src/com/origin/images/Item_16.png differ diff --git a/src/com/origin/images/JY.png b/src/com/origin/images/JY.png new file mode 100644 index 0000000..7cece7e Binary files /dev/null and b/src/com/origin/images/JY.png differ diff --git a/src/com/origin/images/LeiXing_16.png b/src/com/origin/images/LeiXing_16.png new file mode 100644 index 0000000..b654efd Binary files /dev/null and b/src/com/origin/images/LeiXing_16.png differ diff --git a/src/com/origin/images/MaDuan_16.png b/src/com/origin/images/MaDuan_16.png new file mode 100644 index 0000000..d69c659 Binary files /dev/null and b/src/com/origin/images/MaDuan_16.png differ diff --git a/src/com/origin/images/SpecElement_16.png b/src/com/origin/images/SpecElement_16.png new file mode 100644 index 0000000..040d46f Binary files /dev/null and b/src/com/origin/images/SpecElement_16.png differ diff --git a/src/com/origin/images/Sure_16.png b/src/com/origin/images/Sure_16.png new file mode 100644 index 0000000..f7a63ad Binary files /dev/null and b/src/com/origin/images/Sure_16.png differ diff --git a/src/com/origin/images/Title2_16.png b/src/com/origin/images/Title2_16.png new file mode 100644 index 0000000..0a382c2 Binary files /dev/null and b/src/com/origin/images/Title2_16.png differ diff --git a/src/com/origin/images/Title3_16.png b/src/com/origin/images/Title3_16.png new file mode 100644 index 0000000..2443c09 Binary files /dev/null and b/src/com/origin/images/Title3_16.png differ diff --git a/src/com/origin/images/Title_16.png b/src/com/origin/images/Title_16.png new file mode 100644 index 0000000..615fab1 Binary files /dev/null and b/src/com/origin/images/Title_16.png differ diff --git a/src/com/origin/images/WorkspaceObject_16.png b/src/com/origin/images/WorkspaceObject_16.png new file mode 100644 index 0000000..df98919 Binary files /dev/null and b/src/com/origin/images/WorkspaceObject_16.png differ diff --git a/src/com/origin/images/ZhuCanShu_16.png b/src/com/origin/images/ZhuCanShu_16.png new file mode 100644 index 0000000..62e5afe Binary files /dev/null and b/src/com/origin/images/ZhuCanShu_16.png differ diff --git a/src/com/origin/images/a.gif b/src/com/origin/images/a.gif new file mode 100644 index 0000000..5be27cb Binary files /dev/null and b/src/com/origin/images/a.gif differ diff --git a/src/com/origin/images/a_Finish1.gif b/src/com/origin/images/a_Finish1.gif new file mode 100644 index 0000000..113092e Binary files /dev/null and b/src/com/origin/images/a_Finish1.gif differ diff --git a/src/com/origin/images/back_16.png b/src/com/origin/images/back_16.png new file mode 100644 index 0000000..8a1e6bf Binary files /dev/null and b/src/com/origin/images/back_16.png differ diff --git a/src/com/origin/images/bomline_16.png b/src/com/origin/images/bomline_16.png new file mode 100644 index 0000000..d61354a Binary files /dev/null and b/src/com/origin/images/bomline_16.png differ diff --git a/src/com/origin/images/close_16.png b/src/com/origin/images/close_16.png new file mode 100644 index 0000000..52ec28b Binary files /dev/null and b/src/com/origin/images/close_16.png differ diff --git a/src/com/origin/images/deleterule_16.png b/src/com/origin/images/deleterule_16.png new file mode 100644 index 0000000..82b316f Binary files /dev/null and b/src/com/origin/images/deleterule_16.png differ diff --git a/src/com/origin/images/help_16.png b/src/com/origin/images/help_16.png new file mode 100644 index 0000000..4d9be0c Binary files /dev/null and b/src/com/origin/images/help_16.png differ diff --git a/src/com/origin/images/info_24.png b/src/com/origin/images/info_24.png new file mode 100644 index 0000000..48dd7d0 Binary files /dev/null and b/src/com/origin/images/info_24.png differ diff --git a/src/com/origin/images/main_16.png b/src/com/origin/images/main_16.png new file mode 100644 index 0000000..e0c9ac6 Binary files /dev/null and b/src/com/origin/images/main_16.png differ diff --git a/src/com/origin/images/n_Finish1.gif b/src/com/origin/images/n_Finish1.gif new file mode 100644 index 0000000..094f8cd Binary files /dev/null and b/src/com/origin/images/n_Finish1.gif differ diff --git a/src/com/origin/images/next_16.png b/src/com/origin/images/next_16.png new file mode 100644 index 0000000..68c8218 Binary files /dev/null and b/src/com/origin/images/next_16.png differ diff --git a/src/com/origin/images/origin.png b/src/com/origin/images/origin.png new file mode 100644 index 0000000..e93303d Binary files /dev/null and b/src/com/origin/images/origin.png differ diff --git a/src/com/origin/images/origin_assign.png b/src/com/origin/images/origin_assign.png new file mode 100644 index 0000000..c5747be Binary files /dev/null and b/src/com/origin/images/origin_assign.png differ diff --git a/src/com/origin/images/origin_auto_code.png b/src/com/origin/images/origin_auto_code.png new file mode 100644 index 0000000..e434f2d Binary files /dev/null and b/src/com/origin/images/origin_auto_code.png differ diff --git a/src/com/origin/images/origin_field_1_16.png b/src/com/origin/images/origin_field_1_16.png new file mode 100644 index 0000000..7510b03 Binary files /dev/null and b/src/com/origin/images/origin_field_1_16.png differ diff --git a/src/com/origin/images/origin_field_2_16.png b/src/com/origin/images/origin_field_2_16.png new file mode 100644 index 0000000..f2f5233 Binary files /dev/null and b/src/com/origin/images/origin_field_2_16.png differ diff --git a/src/com/origin/images/origin_field_4_16.png b/src/com/origin/images/origin_field_4_16.png new file mode 100644 index 0000000..e434f2d Binary files /dev/null and b/src/com/origin/images/origin_field_4_16.png differ diff --git a/src/com/origin/images/origin_field_5_16.png b/src/com/origin/images/origin_field_5_16.png new file mode 100644 index 0000000..34c88bf Binary files /dev/null and b/src/com/origin/images/origin_field_5_16.png differ diff --git a/src/com/origin/images/origin_field_6_16.png b/src/com/origin/images/origin_field_6_16.png new file mode 100644 index 0000000..61e0457 Binary files /dev/null and b/src/com/origin/images/origin_field_6_16.png differ diff --git a/src/com/origin/images/origin_field_7_16.png b/src/com/origin/images/origin_field_7_16.png new file mode 100644 index 0000000..c61b69c Binary files /dev/null and b/src/com/origin/images/origin_field_7_16.png differ diff --git a/src/com/origin/images/origin_field_8_16.png b/src/com/origin/images/origin_field_8_16.png new file mode 100644 index 0000000..3057ef6 Binary files /dev/null and b/src/com/origin/images/origin_field_8_16.png differ diff --git a/src/com/origin/images/origin_filed_3_16.png b/src/com/origin/images/origin_filed_3_16.png new file mode 100644 index 0000000..5d3ae6c Binary files /dev/null and b/src/com/origin/images/origin_filed_3_16.png differ diff --git a/src/com/origin/images/origin_log.jpg b/src/com/origin/images/origin_log.jpg new file mode 100644 index 0000000..e93303d Binary files /dev/null and b/src/com/origin/images/origin_log.jpg differ diff --git a/src/com/origin/images/other_16.png b/src/com/origin/images/other_16.png new file mode 100644 index 0000000..8c77b6c Binary files /dev/null and b/src/com/origin/images/other_16.png differ diff --git a/src/com/origin/images/p_Finish1.gif b/src/com/origin/images/p_Finish1.gif new file mode 100644 index 0000000..b8baf01 Binary files /dev/null and b/src/com/origin/images/p_Finish1.gif differ diff --git a/src/com/origin/rac/applications/WXYSJApplicationAutoSortingPSE.java b/src/com/origin/rac/applications/WXYSJApplicationAutoSortingPSE.java new file mode 100644 index 0000000..3892e79 --- /dev/null +++ b/src/com/origin/rac/applications/WXYSJApplicationAutoSortingPSE.java @@ -0,0 +1,63 @@ +package com.origin.rac.applications; + +import javax.swing.JOptionPane; + +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.aif.kernel.AIFComponentContext; +import com.teamcenter.rac.kernel.TCComponentBOMLine; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.util.MessageBox; + +public class WXYSJApplicationAutoSortingPSE +{ + private AbstractAIFUIApplication abstractaifuiapplication_local; + private TCSession tcsession; + + public WXYSJApplicationAutoSortingPSE(AbstractAIFUIApplication abstractaifuiapplication) + { + this.abstractaifuiapplication_local = abstractaifuiapplication; + this.tcsession = ((TCSession)this.abstractaifuiapplication_local.getSession()); + } + + public void startRunning() + { + TCComponentBOMLine tcBomLine = (TCComponentBOMLine)this.abstractaifuiapplication_local.getTargetComponent(); + if (tcBomLine != null) + { + Object[] options = { "ȷ", "ȡ" }; + int selectIndex = JOptionPane.showOptionDialog(null, "ǷϸԶ", "Ϣʾ", + -1, -1, + null, options, options[1]); + if (selectIndex == 0) + { + System.out.println("ȷ"); + try + { + AIFComponentContext[] aifcomponentcontext = tcBomLine.getChildren(); + if (aifcomponentcontext.length <= 0) { + return; + } + for (int i = 0; i < aifcomponentcontext.length; i++) + { + tcBomLine = (TCComponentBOMLine)aifcomponentcontext[i].getComponent(); + tcBomLine.setProperty("Detail_ID", Integer.toString(i + 1)); + } + } + catch (TCException e) + { + e.printStackTrace(); + MessageBox.post(e.getError(),"ʾ",2); + } + } + else + { + System.out.println("ȡ"); + } + } + else + { + MessageBox.post("ûжѡ", "Ϣʾ", 2); + } + } +} diff --git a/src/com/origin/rac/applications/WXYSJReportWYCheck.java b/src/com/origin/rac/applications/WXYSJReportWYCheck.java new file mode 100644 index 0000000..494bcba --- /dev/null +++ b/src/com/origin/rac/applications/WXYSJReportWYCheck.java @@ -0,0 +1,101 @@ +package com.origin.rac.applications; + +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.aif.kernel.AIFComponentContext; +import com.teamcenter.rac.kernel.TCComponentBOMLine; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.util.MessageBox; +import java.util.Vector; + +public class WXYSJReportWYCheck +{ + private AbstractAIFUIApplication abstractaifuiapplication_local; + private TCSession tcsession; + private Vector vectorAllNodes; + + public WXYSJReportWYCheck(AbstractAIFUIApplication abstractaifuiapplication) + { + this.abstractaifuiapplication_local = abstractaifuiapplication; + this.tcsession = ((TCSession)this.abstractaifuiapplication_local.getSession()); + } + + public void startRunning() + { + this.vectorAllNodes = new Vector(); + TCComponentBOMLine tcBOMLineTop = (TCComponentBOMLine)this.abstractaifuiapplication_local.getTargetComponent(); + try + { + if (tcBOMLineTop != null) + { + int intCount = tcBOMLineTop.getChildrenCount(); + if (intCount > 0) + { + StringBuilder strInformation = new StringBuilder(); + String strIn = "ظɣ£\n"; + strInformation.append(strIn); + TCComponentBOMLine itemRev01 = null; + TCComponentBOMLine itemRev02 = null; + AIFComponentContext[] aifcomponentcontext = tcBOMLineTop.getChildren(); + for (int i = 0; i < aifcomponentcontext.length - 1; i++) + { + itemRev01 = (TCComponentBOMLine)aifcomponentcontext[i].getComponent(); + if (intCount >= 2) { + for (int j = i + 1; j < aifcomponentcontext.length; j++) + { + itemRev02 = (TCComponentBOMLine)aifcomponentcontext[j].getComponent(); + if (itemRev01.getProperty("bl_rev_current_id").equals(itemRev02.getProperty("bl_rev_current_id"))) { + strInformation.append(aifcomponentcontext[i] + "\n"); + } + } + } + } + if (strInformation.toString().length() > strIn.length()) { + MessageBox.post(strInformation.toString(), "Ϣʾ", 2); + } else { + MessageBox.post("ϣδͬ㲿", "Ϣʾ", 2); + } + } + else + { + MessageBox.post("δȷѡѡнṹĶ", "Ϣʾ", 2); + } + } + else + { + MessageBox.post("ûжѡ", "Ϣʾ", 2); + } + } + catch (TCException e) + { + e.printStackTrace(); + } + } + + private void judgeQT_TZAllNodes(TCComponentBOMLine tccomponentbomline) + { + TCComponentBOMLine tcBOMLine = null; + String releaseState = ""; + try + { + if (tccomponentbomline.getChildrenCount() > 0) + { + AIFComponentContext[] aifcomponentcontext = tccomponentbomline.getChildren(); + for (int i = 0; i < aifcomponentcontext.length; i++) + { + tcBOMLine = (TCComponentBOMLine)aifcomponentcontext[i].getComponent(); + releaseState = tcBOMLine.getProperty("bl_rev_release_statuses"); + if ((!releaseState.contains("XYDesRelease")) && (!releaseState.contains("XYRelease"))) { + this.vectorAllNodes.addElement(tcBOMLine); + } + judgeQT_TZAllNodes(tcBOMLine); + } + } + } + catch (TCException e) + { + e.printStackTrace(); + MessageBox.post(e.getError(), "Ϣʾ", 2); + } + } +} diff --git a/src/com/origin/rac/command/AbstractWXYSJReportCommand.java b/src/com/origin/rac/command/AbstractWXYSJReportCommand.java new file mode 100644 index 0000000..15d5d79 --- /dev/null +++ b/src/com/origin/rac/command/AbstractWXYSJReportCommand.java @@ -0,0 +1,37 @@ +package com.origin.rac.command; + +import com.teamcenter.rac.aif.AbstractAIFCommand; +import com.teamcenter.rac.aif.AbstractAIFOperation; +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.util.Registry; + +public abstract class AbstractWXYSJReportCommand + extends AbstractAIFCommand +{ + private AbstractAIFUIApplication application = null; + private TCSession tcsession = null; + private Registry reg = null; + + public AbstractWXYSJReportCommand(AbstractAIFUIApplication application) + { + this.application = application; + this.tcsession = ((TCSession)application.getSession()); + this.reg = Registry.getRegistry(this); + startRunning(); + } + + public void startRunning() + { + this.tcsession.queueOperation(new AbstractAIFOperation(this.reg.getString("create.MESSAGE", "ݴ...")) + { + public void executeOperation() + throws Exception + { + AbstractWXYSJReportCommand.this.reportRunning(AbstractWXYSJReportCommand.this.application); + } + }); + } + + protected abstract void reportRunning(AbstractAIFUIApplication paramAbstractAIFUIApplication); +} diff --git a/src/com/origin/rac/command/WXYSJApplicationAutoSortingPSECommand.java b/src/com/origin/rac/command/WXYSJApplicationAutoSortingPSECommand.java new file mode 100644 index 0000000..c801a4a --- /dev/null +++ b/src/com/origin/rac/command/WXYSJApplicationAutoSortingPSECommand.java @@ -0,0 +1,19 @@ +package com.origin.rac.command; + +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.origin.rac.applications.WXYSJApplicationAutoSortingPSE; + +public class WXYSJApplicationAutoSortingPSECommand + extends AbstractWXYSJReportCommand +{ + public WXYSJApplicationAutoSortingPSECommand(AbstractAIFUIApplication application) + { + super(application); + } + + protected void reportRunning(AbstractAIFUIApplication application) + { + WXYSJApplicationAutoSortingPSE start = new WXYSJApplicationAutoSortingPSE(application); + start.startRunning(); + } +} diff --git a/src/com/origin/rac/command/WXYSJReportWYCheckCommand.java b/src/com/origin/rac/command/WXYSJReportWYCheckCommand.java new file mode 100644 index 0000000..3d14be7 --- /dev/null +++ b/src/com/origin/rac/command/WXYSJReportWYCheckCommand.java @@ -0,0 +1,19 @@ +package com.origin.rac.command; + +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.origin.rac.applications.WXYSJReportWYCheck; + +public class WXYSJReportWYCheckCommand + extends AbstractWXYSJReportCommand +{ + public WXYSJReportWYCheckCommand(AbstractAIFUIApplication application) + { + super(application); + } + + protected void reportRunning(AbstractAIFUIApplication application) + { + WXYSJReportWYCheck report = new WXYSJReportWYCheck(application); + report.startRunning(); + } +} diff --git a/src/com/origin/rac/handler/AbstractWXYSJHandler.java b/src/com/origin/rac/handler/AbstractWXYSJHandler.java new file mode 100644 index 0000000..5ab1487 --- /dev/null +++ b/src/com/origin/rac/handler/AbstractWXYSJHandler.java @@ -0,0 +1,31 @@ +package com.origin.rac.handler; + +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.aifrcp.AIFUtility; +import com.teamcenter.rac.util.MessageBox; +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +public abstract class AbstractWXYSJHandler + extends AbstractHandler +{ + private AbstractAIFUIApplication application; + + public Object execute(ExecutionEvent arg0) + throws ExecutionException + { + this.application = AIFUtility.getCurrentApplication(); + try + { + startRunning(this.application); + } + catch (Exception exception) + { + MessageBox.post(exception, true); + } + return null; + } + + protected abstract void startRunning(AbstractAIFUIApplication paramAbstractAIFUIApplication); +} diff --git a/src/com/origin/rac/handler/WXYSJApplicationAutoSortingPSEHandler.java b/src/com/origin/rac/handler/WXYSJApplicationAutoSortingPSEHandler.java new file mode 100644 index 0000000..b398afa --- /dev/null +++ b/src/com/origin/rac/handler/WXYSJApplicationAutoSortingPSEHandler.java @@ -0,0 +1,21 @@ +package com.origin.rac.handler; + +import com.origin.rac.command.WXYSJApplicationAutoSortingPSECommand; +import com.teamcenter.rac.aif.AbstractAIFUIApplication; + +public class WXYSJApplicationAutoSortingPSEHandler + extends AbstractWXYSJHandler +{ + protected void startRunning(AbstractAIFUIApplication application) + { + try + { + WXYSJApplicationAutoSortingPSECommand command = new WXYSJApplicationAutoSortingPSECommand(application); + command.executeModal(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } +} diff --git a/src/com/origin/rac/handler/WXYSJReportWYCheckHandler.java b/src/com/origin/rac/handler/WXYSJReportWYCheckHandler.java new file mode 100644 index 0000000..b5763a5 --- /dev/null +++ b/src/com/origin/rac/handler/WXYSJReportWYCheckHandler.java @@ -0,0 +1,21 @@ +package com.origin.rac.handler; + +import com.origin.rac.command.WXYSJReportWYCheckCommand; +import com.teamcenter.rac.aif.AbstractAIFUIApplication; + +public class WXYSJReportWYCheckHandler + extends AbstractWXYSJHandler +{ + protected void startRunning(AbstractAIFUIApplication application) + { + WXYSJReportWYCheckCommand command = new WXYSJReportWYCheckCommand(application); + try + { + command.executeModal(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } +} diff --git a/src/com/origin/ui/AutoCodeMainPanel.java b/src/com/origin/ui/AutoCodeMainPanel.java new file mode 100644 index 0000000..726c26e --- /dev/null +++ b/src/com/origin/ui/AutoCodeMainPanel.java @@ -0,0 +1,8115 @@ +package com.origin.ui; + +import com.origin.beans.AutoCodeBean; +import com.origin.beans.KSearchDialog; +import com.origin.beans.KelsenJList; +import com.origin.beans.KelsenMoveThread; +import com.teamcenter.rac.aif.AbstractAIFDialog; +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.kernel.TCPreferenceService; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.util.AIFImageIcon; +import com.teamcenter.rac.util.MessageBox; +import com.teamcenter.rac.util.Registry; +import java.awt.Color; +import java.awt.Font; +import java.awt.Point; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.PrintStream; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Set; +import java.util.Vector; +import javax.swing.BorderFactory; +import javax.swing.DefaultComboBoxModel; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JComboBox; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JPopupMenu; +import javax.swing.JScrollPane; +import javax.swing.JSeparator; +import javax.swing.JSplitPane; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextField; +import javax.swing.JToggleButton; +import javax.swing.JTree; +import javax.swing.JViewport; +import javax.swing.event.AncestorEvent; +import javax.swing.event.AncestorListener; +import javax.swing.table.DefaultTableModel; +import javax.swing.table.TableModel; +import javax.swing.tree.DefaultMutableTreeNode; +import javax.swing.tree.TreeNode; +import org.jdesktop.layout.GroupLayout; +import org.jdesktop.layout.GroupLayout.ParallelGroup; +import org.jdesktop.layout.GroupLayout.SequentialGroup; + +public class AutoCodeMainPanel + extends JPanel +{ + AbstractAIFUIApplication app; + String[][] straItemTypeNames; + Icon[] straItemTypeImageIcon; + String[] straItemTypeNote; + Object[][] objaaInfo; + Object[] objaSinfo; + AbstractAIFDialog dialog; + TCSession session; + Registry reg; + int i_MySearchDialog = 0; + JPopupMenu popup_ItemTypeList; + AutoCodeBean acb; + + public AutoCodeMainPanel(JPanel app, JDialog dialog) + { + initComponents(); + getAllJTabbedPaneSub(); + getAllJTextMustInsertTitle(); + getAllJTableMustInsertContain(); + getAllJScrollPaneTableOrTree(); + getAllJCheckWGZZD(); + getAllJComboBoxLX(); + getAllJComboBoxTZM(); + getAllJToggleButtonXSZ(); + getAllJCheckBoxFZ(); + getAllJTextFieldFZ(); + } + + public AutoCodeMainPanel(TCSession session, AbstractAIFDialog dialog) + { + this.session = session; + this.reg = session.getRegistry(); + this.dialog = dialog; + initComponents(); + getAllJTabbedPaneSub(); + getAllJTextMustInsertTitle(); + getAllJTableMustInsertContain(); + getAllJCheckWGZZD(); + getAllJComboBoxLX(); + getAllJComboBoxTZM(); + getAllJToggleButtonXSZ(); + getAllJCheckBoxFZ(); + getAllJTextFieldFZ(); + } + + public void addItemTypeListPopupMenu(final JList list_ItemType) + { + this.popup_ItemTypeList = new JPopupMenu(); + this.popup_ItemTypeList.setBackground(Color.white); + JMenu menu_SubRule = new JMenu("ӹ"); + menu_SubRule.setBackground(Color.white); + JMenuItem menuItem_delete_rule = new JMenuItem("ɾ", new ImageIcon( + getClass().getResource( + "/com/origin/images/deleterule_16.png"))); + menuItem_delete_rule.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent arg0) + { + Object[] obja = (Object[])list_ItemType.getSelectedValue(); + if (JOptionPane.showConfirmDialog(AutoCodeMainPanel.this.dialog, "ȷɾ " + obja[1] + + " 㲿ı", "", 2, 2) == 0) { + if (AutoCodeMainPanel.this.acb.deleteRule((String)obja[1])) + { + JOptionPane.showMessageDialog(AutoCodeMainPanel.this.dialog, "ɹɾ " + + (String)obja[1] + "͵ı!"); + obja[2] = ("Ϊ" + (String)obja[1]); + list_ItemType.repaint(); + } + else + { + JOptionPane.showMessageDialog(AutoCodeMainPanel.this.dialog, "ɾʧ!"); + } + } + } + }); + menuItem_delete_rule.setBackground(Color.white); + JSeparator speparator = new JSeparator(); + this.popup_ItemTypeList.add(menu_SubRule); + this.popup_ItemTypeList.add(speparator); + this.popup_ItemTypeList.add(menuItem_delete_rule); + list_ItemType.addMouseListener(new MouseAdapter() + { + public void mousePressed(MouseEvent event) + { + if (event.isPopupTrigger()) { + AutoCodeMainPanel.this.popup_ItemTypeList.show(event.getComponent(), event.getX(), + event.getY()); + } + } + + public void mouseReleased(MouseEvent event) + { + if (event.isPopupTrigger()) { + AutoCodeMainPanel.this.popup_ItemTypeList.show(event.getComponent(), event.getX(), + event.getY()); + } + } + }); + } + + public void originInit() + { + this.jTabbedPaneMainOption_sub2.setVisible(false); + this.jPanelMainOptions_sub3.setVisible(false); + this.acb = new AutoCodeBean(this.session); + this.straItemTypeNames = this.acb.getAllItemTypes(); + System.out.println("straItemTypeNames----->" + this.straItemTypeNames.length); + System.out.println("array==="+straItemTypeNames[0].toString()); + if ((this.straItemTypeNames != null) && (this.straItemTypeNames.length > 0)) + { + this.straItemTypeImageIcon = new ImageIcon[this.straItemTypeNames.length]; + this.straItemTypeNote = new String[this.straItemTypeNames.length]; + this.objaaInfo = new Object[this.straItemTypeNames.length][]; + for (int i = 0; i < this.straItemTypeNames.length; i++) + { + this.objaSinfo = new Object[3]; + System.out.println("path==="+ this.straItemTypeNames[i][1]); + // System.out.println("path==="+getClass().getResource("/" + this.straItemTypeNames[i][1])); + System.out.println("path==="+AIFImageIcon.getImageIcon(this, "images/Item_16.png")); + // this.objaSinfo[0] = new ImageIcon(getClass().getResource("/" + this.straItemTypeNames[i][1])); + this.objaSinfo[0] = AIFImageIcon.getImageIcon(this, "images/item_16.png"); + this.objaSinfo[1] = this.straItemTypeNames[i][0]; + if (this.acb.isRegistRule(String.valueOf(this.objaSinfo[1]))) { + this.objaSinfo[2] = + ("Ϊ:" + this.straItemTypeNames[i][0] + " Ѱ󶨱"); + } else { + this.objaSinfo[2] = ("Ϊ:" + this.straItemTypeNames[i][0]); + } + this.objaaInfo[i] = this.objaSinfo; + } + KelsenJList kjl = new KelsenJList(this.objaaInfo); + this.jListItemTypeNames = kjl.getJList(); + addItemTypeListPopupMenu(this.jListItemTypeNames); + } + else + { + new MessageBox("ûκε㲿!", "[straItemTypeNames!=null && straItemTypeNames.length>0]!", "", 2).setVisible(true); + } + Thread kThreadJList = new Thread() + { + public void run() + { + for (int i = 0; i < 4; i++) { + try + { + sleep(600L); + if (i % 2 == 0) + { + AutoCodeMainPanel.this.jListItemTypeNames.setBackground(Color.gray); + AutoCodeMainPanel.this.jListItemTypeNames.setForeground(Color.white); + } + else + { + AutoCodeMainPanel.this.jListItemTypeNames.setBackground(Color.white); + AutoCodeMainPanel.this.jListItemTypeNames.setForeground(Color.black); + } + } + catch (InterruptedException e) + { + e.printStackTrace(); + } + } + } + }; + KelsenMoveThread kmt = new KelsenMoveThread(this.jLabelMainInfo, + kThreadJList); + kmt.start(); + this.jListItemTypeNames.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent arg0) + { + Object[] objaSelectValue = (Object[])AutoCodeMainPanel.this.jListItemTypeNames + .getSelectedValue(); + AutoCodeMainPanel.this.jLabelMainInfo.setText("ѡ:" + objaSelectValue[1] + + "͵ "); + KelsenMoveThread kmt2 = new KelsenMoveThread(AutoCodeMainPanel.this.jLabelMainInfo); + kmt2.start(); + AutoCodeMainPanel.this.jListItemTypeNames.repaint(); + + AutoCodeMainPanel.this.clearAllData(); + Object[] obja = (Object[])AutoCodeMainPanel.this.jListItemTypeNames + .getSelectedValue(); + String str_ifBangDingGuiZe = (String)obja[2]; + if (str_ifBangDingGuiZe.contains("Ѱ󶨱")) { + AutoCodeMainPanel.this.initTheData(String.valueOf(obja[1])); + } + AutoCodeMainPanel.this.jPanelMainOptions_sub2.setBorder( + BorderFactory.createTitledBorder( + null, + "", + 0, + 0, + new Font("", 0, 12), + new Color(0, 0, 0))); + AutoCodeMainPanel.this.jTabbedPaneMainOption_sub2.setVisible(true); + AutoCodeMainPanel.this.jPanelMainOptions_sub3.setVisible(true); + } + }); + } + + public void clearAllData() + { + this.jTextFieldRevFormPro.setText(""); + this.jComboBoxMDS.setSelectedIndex(0); + this.jComboBoxLSHBFWZ.setSelectedItem(""); + this.jComboBoxWS.setSelectedItem("6"); + this.jComboBoxWS1.setSelectedIndex(0); + this.jComboBoxBC.setSelectedIndex(0); + this.jComboBoxZZZ.setSelectedItem("999999"); + this.jCheckBoxItemIDKBJ.setSelected(false); + this.jCheckBoxSDBM.setSelected(false); + this.jCheckBoxItemName.setSelected(false); + this.jTextFieldRevFormPro.setText(""); + for (int i = 0; i < 12; i++) + { + this.jtext_aAllMustInsertTitle[i].setText(""); + this.jcb_aAllWGZZD[i].setSelected(false); + this.jcomb_aAllLX[i].setSelectedIndex(0); + this.jcomb_aAllTZM[i].setSelectedIndex(0); + this.jtogglebutton_aAllXSZ[i].setSelected(false); + this.jcb_aAllFZ[i].setSelected(false); + this.txt_aAllFZ[i].setText(""); + DefaultTableModel dtm = new DefaultTableModel(new Object[][] { { + "", "" } }, new Object[] { "ڲֵ", "ʾֵ" }); + this.jtable_aAllMustInsertContain[i].setModel(dtm); + } + } + + public void initTheData(String str_SelectItemName) + { + if (this.acb != null) + { + HashMap hm_TheAllData = this.acb + .getFinalCodeRuleMessage(str_SelectItemName); + String str_MaDuanShu = (String)hm_TheAllData.get("_"); + int int_MaDuanShu = Integer.parseInt(str_MaDuanShu); + this.jComboBoxMDS.setSelectedItem(str_MaDuanShu); + try + { + if (hm_TheAllData.get("ˮλ_").equals("no")) { + this.jComboBoxLSHBFWZ.setSelectedItem(""); + } else { + this.jComboBoxLSHBFWZ.setSelectedItem(hm_TheAllData.get("ˮλ")); + } + } + catch (Exception localException1) + { + System.out.println("ˮλ_ ⣡"); + this.jComboBoxLSHBFWZ.setSelectedItem(""); + } + this.jComboBoxWS.setSelectedItem(hm_TheAllData.get("ˮ_λ")); + this.jComboBoxWS1.setSelectedItem(hm_TheAllData.get("ˮ_ʼֵ")); + this.jComboBoxZZZ.setSelectedItem(hm_TheAllData.get("ˮ_ֵֹ")); + this.jComboBoxBC.setSelectedItem(hm_TheAllData.get("ˮ_")); + try + { + if (hm_TheAllData.get("ItemIDɱ༭").equals("yes")) { + this.jCheckBoxItemIDKBJ.setSelected(true); + } else { + this.jCheckBoxItemIDKBJ.setSelected(false); + } + } + catch (Exception localException2) + { + System.out.println("ItemIDɱ༭ ⣡"); + this.jCheckBoxItemIDKBJ.setSelected(false); + } + try + { + if (hm_TheAllData.get("ֶ").equals("yes")) { + this.jCheckBoxSDBM.setSelected(true); + } else { + this.jCheckBoxSDBM.setSelected(false); + } + } + catch (Exception localException3) + { + System.out.println("ֶ ⣡"); + this.jCheckBoxSDBM.setSelected(false); + } + try + { + if (hm_TheAllData.get("Item Nameֵ").equals("yes")) + { + this.jCheckBoxItemName.setSelected(true); + this.jTextFieldRevFormPro.setText(String.valueOf(hm_TheAllData + .get("Nameľ"))); + } + else + { + this.jCheckBoxItemName.setSelected(false); + this.jTextFieldRevFormPro.setText(""); + } + } + catch (Exception localException4) + { + System.out.println("Item Nameֵ ⣡"); + this.jCheckBoxItemName.setSelected(false); + this.jTextFieldRevFormPro.setText(""); + } + for (int i = 0; i < int_MaDuanShu; i++) + { + this.jtext_aAllMustInsertTitle[i].setText( + (String)hm_TheAllData.get("" + (i + 1) + "_")); + try + { + if (hm_TheAllData.get("" + (i + 1) + "_ǷΪֶ").equals( + "yes")) { + this.jcb_aAllWGZZD[i].setSelected(true); + } else { + this.jcb_aAllWGZZD[i].setSelected(false); + } + } + catch (Exception localException5) + { + this.jcb_aAllWGZZD[i].setSelected(false); + System.out.println("" + (i + 1) + "_ǷΪֶ ⣡"); + } + try + { + if (hm_TheAllData.get("" + (i + 1) + "_").equals("0")) { + this.jcomb_aAllLX[i].setSelectedIndex(0); + } else if (hm_TheAllData.get("" + (i + 1) + "_").equals("1")) { + this.jcomb_aAllLX[i].setSelectedIndex(1); + } else if (hm_TheAllData.get("" + (i + 1) + "_").equals("2")) { + this.jcomb_aAllLX[i].setSelectedIndex(2); + } else if (hm_TheAllData.get("" + (i + 1) + "_").equals("3")) { + this.jcomb_aAllLX[i].setSelectedIndex(3); + } else if (hm_TheAllData.get("" + (i + 1) + "_").equals("4")) { + this.jcomb_aAllLX[i].setSelectedIndex(4); + } else if (hm_TheAllData.get("" + (i + 1) + "_").equals("5")) { + this.jcomb_aAllLX[i].setSelectedIndex(5); + } else { + this.jcomb_aAllLX[i].setSelectedIndex(0); + } + } + catch (Exception e) + { + this.jcomb_aAllLX[i].setSelectedIndex(0); + System.out.println("" + (i + 1) + "_ ⣡"); + e.printStackTrace(); + } + try + { + if (hm_TheAllData.get("" + (i + 1) + "_Ƿ").equals( + "yes")) { + this.jcomb_aAllTZM[i].setSelectedIndex(0); + } else if (hm_TheAllData.get("" + (i + 1) + "_Ƿ").equals("no")) { + this.jcomb_aAllTZM[i].setSelectedIndex(1); + } else if (hm_TheAllData.get("" + (i + 1) + "_Ƿ").equals("no and do not display")) { + this.jcomb_aAllTZM[i].setSelectedIndex(2); + } else { + this.jcomb_aAllTZM[i].setSelectedIndex(0); + } + } + catch (Exception localException6) + { + System.out.println("" + (i + 1) + "_Ƿ ⣡"); + this.jcomb_aAllTZM[i].setSelectedIndex(0); + } + try + { + if (hm_TheAllData.get("" + (i + 1) + "_ʾֵڲֵ").equals( + "")) + { + this.jtogglebutton_aAllXSZ[i].setSelected(true); + this.jtogglebutton_aAllXSZ[i].setText("ڲֵ"); + } + else if (hm_TheAllData.get("" + (i + 1) + "_ʾֵڲֵ").equals("")) + { + this.jtogglebutton_aAllXSZ[i].setSelected(false); + this.jtogglebutton_aAllXSZ[i].setText("ʾֵ"); + } + } + catch (Exception localException7) + { + System.out.println("" + (i + 1) + "_ʾֵڲֵ ⣡"); + this.jtogglebutton_aAllXSZ[i].setSelected(false); + this.jtogglebutton_aAllXSZ[i].setText("ʾֵ"); + } + try + { + if (hm_TheAllData.get("" + (i + 1) + "_Ըֵ").equals( + "yes")) + { + this.jcb_aAllFZ[i].setSelected(true); + if (hm_TheAllData.get("" + (i + 1) + "_ʾֵڲֵ").equals("")) { + this.jtogglebutton_aAllXSZ[i].setSelected(true); + } else if (hm_TheAllData.get("" + (i + 1) + "_ʾֵڲֵ").equals("")) { + this.jtogglebutton_aAllXSZ[i].setSelected(false); + } + this.txt_aAllFZ[i].setText(String.valueOf(hm_TheAllData + .get("" + (i + 1) + "_ֵı"))); + } + else + { + this.jcb_aAllFZ[i].setSelected(false); + } + } + catch (Exception localException8) + { + System.out.println("" + (i + 1) + "_Ըֵ ⣡"); + this.jcb_aAllFZ[i].setSelected(false); + } + Object[][] obja2 = (Object[][])hm_TheAllData.get("" + ( + i + 1) + "_ݶά"); + Object[] obja = { "ڲֵ", "ʾֵ" }; + DefaultTableModel dft_temp = new DefaultTableModel(obja2, obja); + this.jtable_aAllMustInsertContain[i].setModel(dft_temp); + } + String str_Display = ""; + Iterator ii = hm_TheAllData.entrySet().iterator(); + while (ii.hasNext()) { + str_Display = str_Display + ii.next() + "\n"; + } + System.out.println("--------------------------------------------------------------------\n" + + str_Display + + "\n===================================================================="); + } + else + { + JOptionPane.showMessageDialog(null, "acb==null", "", 2); + } + } + + private void initComponents() + { + this.jPopupMenuForJTable = new JPopupMenu(); + this.jMenuItemClearAll = new JMenuItem(); + this.jMenuItemSingle = new JMenuItem(); + this.jTabbedPaneMain = new JTabbedPane(); + this.jPanelMainContain_1 = new JPanel(); + this.jSplitPaneMainContain_1 = new JSplitPane(); + this.jPanelItemTypes = new JPanel(); + this.jPanelOriginLogo = new JPanel(); + this.jLabelOriginLogo = new JLabel(); + this.jPanelItemTypeNameList = new JPanel(); + this.jScrollPane1 = new JScrollPane(); + this.jListItemTypeNames = new JList(); + this.jPanelMainOptions = new JPanel(); + this.jPanelMainOptions_sub3 = new JPanel(); + this.jLabelFinish = new JLabel(); + this.jButtonBack = new JButton(); + this.jButtonBack1 = new JButton(); + this.jButtonBackClose = new JButton(); + this.jPanelMainOptions_sub2 = new JPanel(); + this.jTabbedPaneMainOption_sub2 = new JTabbedPane(); + this.jPanelMainOptionContain = new JPanel(); + this.jPanelZhuCanShu_Sub = new JPanel(); + this.jPanelMD_CSPZ = new JPanel(); + this.jLabelMDS = new JLabel(); + this.jComboBoxMDS = new JComboBox(); + this.jLabelLSHBFWZ = new JLabel(); + this.jComboBoxLSHBFWZ = new JComboBox(); + this.jPanel3 = new JPanel(); + this.jLabelWS = new JLabel(); + this.jComboBoxWS = new JComboBox(); + this.jLabelBC = new JLabel(); + this.jComboBoxBC = new JComboBox(); + this.jLabelQSZ = new JLabel(); + this.jComboBoxWS1 = new JComboBox(); + this.jLabelZZZ = new JLabel(); + this.jComboBoxZZZ = new JComboBox(); + this.jPanel4 = new JPanel(); + this.jCheckBoxItemIDKBJ = new JCheckBox(); + this.jCheckBoxSDBM = new JCheckBox(); + this.jCheckBoxItemName = new JCheckBox(); + this.jTextFieldRevFormPro = new JTextField(); + this.jLabelUp = new JLabel(); + this.jPanelMDContain_MD_1 = new JPanel(); + this.jPanelMDM_Sub_MD_1 = new JPanel(); + this.jPanel_Title_MD_1 = new JPanel(); + this.jLabel_Title_MD_1 = new JLabel(); + this.txt_Title_MD_1 = new JTextField(); + this.jcb_WGZMD_MD_1 = new JCheckBox(); + this.jPanel_CS2_MD_1 = new JPanel(); + this.jLabel_Style_MD_1 = new JLabel(); + this.jcb_LX_MD_1 = new JComboBox(); + this.jcb_FZ_MD_1 = new JCheckBox(); + this.txt_FZ_MD_1 = new JTextField(); + this.jLabel_SXS_MD_1 = new JLabel(); + this.jToggleButton_JXSZ_MD_1 = new JToggleButton(); + this.jcb_TZM_MD_1 = new JComboBox(); + this.jPanel_NRCS_MD_1 = new JPanel(); + this.jsp_NR_MD_1 = new JScrollPane(); + this.jtb_NR_MD_1 = new JTable(); + this.jPanelMDContain_MD_2 = new JPanel(); + this.jPanelMDM_Sub_MD_2 = new JPanel(); + this.jPanel_Title_MD_2 = new JPanel(); + this.jLabel_Title_MD_2 = new JLabel(); + this.txt_Title_MD_2 = new JTextField(); + this.jcb_WGZMD_MD_2 = new JCheckBox(); + this.jPanel_CS2_MD_2 = new JPanel(); + this.jLabel_Style_MD_2 = new JLabel(); + this.jcb_LX_MD_2 = new JComboBox(); + this.jcb_FZ_MD_2 = new JCheckBox(); + this.txt_FZ_MD_2 = new JTextField(); + this.jLabel_SXS_MD_2 = new JLabel(); + this.jToggleButton_JXSZ_MD_2 = new JToggleButton(); + this.jcb_TZM_MD_2 = new JComboBox(); + this.jPanel_NRCS_MD_2 = new JPanel(); + this.jsp_NR_MD_2 = new JScrollPane(); + this.jtb_NR_MD_2 = new JTable(); + this.jPanelMDContain_MD_3 = new JPanel(); + this.jPanelMDM_Sub_MD_3 = new JPanel(); + this.jPanel_Title_MD_3 = new JPanel(); + this.jLabel_Title_MD_3 = new JLabel(); + this.txt_Title_MD_3 = new JTextField(); + this.jcb_WGZMD_MD_3 = new JCheckBox(); + this.jPanel_CS2_MD_3 = new JPanel(); + this.jLabel_Style_MD_3 = new JLabel(); + this.jcb_LX_MD_3 = new JComboBox(); + this.jcb_FZ_MD_3 = new JCheckBox(); + this.txt_FZ_MD_3 = new JTextField(); + this.jLabel_SXS_MD_3 = new JLabel(); + this.jToggleButton_JXSZ_MD_3 = new JToggleButton(); + this.jcb_TZM_MD_3 = new JComboBox(); + this.jPanel_NRCS_MD_3 = new JPanel(); + this.jsp_NR_MD_3 = new JScrollPane(); + this.jtb_NR_MD_3 = new JTable(); + this.jPanelMDContain_MD_4 = new JPanel(); + this.jPanelMDM_Sub_MD_4 = new JPanel(); + this.jPanel_Title_MD_4 = new JPanel(); + this.jLabel_Title_MD_4 = new JLabel(); + this.txt_Title_MD_4 = new JTextField(); + this.jcb_WGZMD_MD_4 = new JCheckBox(); + this.jPanel_CS2_MD_4 = new JPanel(); + this.jLabel_Style_MD_4 = new JLabel(); + this.jcb_LX_MD_4 = new JComboBox(); + this.jcb_FZ_MD_4 = new JCheckBox(); + this.txt_FZ_MD_4 = new JTextField(); + this.jLabel_SXS_MD_4 = new JLabel(); + this.jToggleButton_JXSZ_MD_4 = new JToggleButton(); + this.jcb_TZM_MD_4 = new JComboBox(); + this.jPanel_NRCS_MD_4 = new JPanel(); + this.jsp_NR_MD_4 = new JScrollPane(); + this.jtb_NR_MD_4 = new JTable(); + this.jPanelMDContain_MD_5 = new JPanel(); + this.jPanelMDM_Sub_MD_5 = new JPanel(); + this.jPanel_Title_MD_5 = new JPanel(); + this.jLabel_Title_MD_5 = new JLabel(); + this.txt_Title_MD_5 = new JTextField(); + this.jcb_WGZMD_MD_5 = new JCheckBox(); + this.jPanel_CS2_MD_5 = new JPanel(); + this.jLabel_Style_MD_5 = new JLabel(); + this.jcb_LX_MD_5 = new JComboBox(); + this.jcb_FZ_MD_5 = new JCheckBox(); + this.txt_FZ_MD_5 = new JTextField(); + this.jLabel_SXS_MD_5 = new JLabel(); + this.jToggleButton_JXSZ_MD_5 = new JToggleButton(); + this.jcb_TZM_MD_5 = new JComboBox(); + this.jPanel_NRCS_MD_5 = new JPanel(); + this.jsp_NR_MD_5 = new JScrollPane(); + this.jtb_NR_MD_5 = new JTable(); + this.jPanelMDContain_MD_6 = new JPanel(); + this.jPanelMDM_Sub_MD_6 = new JPanel(); + this.jPanel_Title_MD_6 = new JPanel(); + this.jLabel_Title_MD_6 = new JLabel(); + this.txt_Title_MD_6 = new JTextField(); + this.jcb_WGZMD_MD_6 = new JCheckBox(); + this.jPanel_CS2_MD_6 = new JPanel(); + this.jLabel_Style_MD_6 = new JLabel(); + this.jcb_LX_MD_6 = new JComboBox(); + this.jcb_FZ_MD_6 = new JCheckBox(); + this.txt_FZ_MD_6 = new JTextField(); + this.jLabel_SXS_MD_6 = new JLabel(); + this.jToggleButton_JXSZ_MD_6 = new JToggleButton(); + this.jcb_TZM_MD_6 = new JComboBox(); + this.jPanel_NRCS_MD_6 = new JPanel(); + this.jsp_NR_MD_6 = new JScrollPane(); + this.jtb_NR_MD_6 = new JTable(); + this.jPanelMDContain_MD_7 = new JPanel(); + this.jPanelMDM_Sub_MD_7 = new JPanel(); + this.jPanel_Title_MD_7 = new JPanel(); + this.jLabel_Title_MD_7 = new JLabel(); + this.txt_Title_MD_7 = new JTextField(); + this.jcb_WGZMD_MD_7 = new JCheckBox(); + this.jPanel_CS2_MD_7 = new JPanel(); + this.jLabel_Style_MD_7 = new JLabel(); + this.jcb_LX_MD_7 = new JComboBox(); + this.jcb_FZ_MD_7 = new JCheckBox(); + this.txt_FZ_MD_7 = new JTextField(); + this.jLabel_SXS_MD_7 = new JLabel(); + this.jToggleButton_JXSZ_MD_7 = new JToggleButton(); + this.jcb_TZM_MD_7 = new JComboBox(); + this.jPanel_NRCS_MD_7 = new JPanel(); + this.jsp_NR_MD_7 = new JScrollPane(); + this.jtb_NR_MD_7 = new JTable(); + this.jPanelMDContain_MD_8 = new JPanel(); + this.jPanelMDM_Sub_MD_8 = new JPanel(); + this.jPanel_Title_MD_8 = new JPanel(); + this.jLabel_Title_MD_8 = new JLabel(); + this.txt_Title_MD_8 = new JTextField(); + this.jcb_WGZMD_MD_8 = new JCheckBox(); + this.jPanel_CS2_MD_8 = new JPanel(); + this.jLabel_Style_MD_8 = new JLabel(); + this.jcb_LX_MD_8 = new JComboBox(); + this.jcb_FZ_MD_8 = new JCheckBox(); + this.txt_FZ_MD_8 = new JTextField(); + this.jLabel_SXS_MD_8 = new JLabel(); + this.jToggleButton_JXSZ_MD_8 = new JToggleButton(); + this.jcb_TZM_MD_8 = new JComboBox(); + this.jPanel_NRCS_MD_8 = new JPanel(); + this.jsp_NR_MD_8 = new JScrollPane(); + this.jtb_NR_MD_8 = new JTable(); + this.jPanelMDContain_MD_9 = new JPanel(); + this.jPanelMDM_Sub_MD_9 = new JPanel(); + this.jPanel_Title_MD_9 = new JPanel(); + this.jLabel_Title_MD_9 = new JLabel(); + this.txt_Title_MD_9 = new JTextField(); + this.jcb_WGZMD_MD_9 = new JCheckBox(); + this.jPanel_CS2_MD_9 = new JPanel(); + this.jLabel_Style_MD_9 = new JLabel(); + this.jcb_LX_MD_9 = new JComboBox(); + this.jcb_FZ_MD_9 = new JCheckBox(); + this.txt_FZ_MD_9 = new JTextField(); + this.jLabel_SXS_MD_9 = new JLabel(); + this.jToggleButton_JXSZ_MD_9 = new JToggleButton(); + this.jcb_TZM_MD_9 = new JComboBox(); + this.jPanel_NRCS_MD_9 = new JPanel(); + this.jsp_NR_MD_9 = new JScrollPane(); + this.jtb_NR_MD_9 = new JTable(); + this.jPanelMDContain_MD_10 = new JPanel(); + this.jPanelMDM_Sub_MD_10 = new JPanel(); + this.jPanel_Title_MD_10 = new JPanel(); + this.jLabel_Title_MD_10 = new JLabel(); + this.txt_Title_MD_10 = new JTextField(); + this.jcb_WGZMD_MD_10 = new JCheckBox(); + this.jPanel_CS2_MD_10 = new JPanel(); + this.jLabel_Style_MD_10 = new JLabel(); + this.jcb_LX_MD_10 = new JComboBox(); + this.jcb_FZ_MD_10 = new JCheckBox(); + this.txt_FZ_MD_10 = new JTextField(); + this.jLabel_SXS_MD_10 = new JLabel(); + this.jToggleButton_JXSZ_MD_10 = new JToggleButton(); + this.jcb_TZM_MD_10 = new JComboBox(); + this.jPanel_NRCS_MD_10 = new JPanel(); + this.jsp_NR_MD_10 = new JScrollPane(); + this.jtb_NR_MD_10 = new JTable(); + this.jPanelMDContain_MD_11 = new JPanel(); + this.jPanelMDM_Sub_MD_11 = new JPanel(); + this.jPanel_Title_MD_11 = new JPanel(); + this.jLabel_Title_MD_11 = new JLabel(); + this.txt_Title_MD_11 = new JTextField(); + this.jcb_WGZMD_MD_11 = new JCheckBox(); + this.jPanel_CS2_MD_11 = new JPanel(); + this.jLabel_Style_MD_11 = new JLabel(); + this.jcb_LX_MD_11 = new JComboBox(); + this.jcb_FZ_MD_11 = new JCheckBox(); + this.txt_FZ_MD_11 = new JTextField(); + this.jLabel_SXS_MD_11 = new JLabel(); + this.jToggleButton_JXSZ_MD_11 = new JToggleButton(); + this.jcb_TZM_MD_11 = new JComboBox(); + this.jPanel_NRCS_MD_11 = new JPanel(); + this.jsp_NR_MD_11 = new JScrollPane(); + this.jtb_NR_MD_11 = new JTable(); + this.jPanelMDContain_MD_12 = new JPanel(); + this.jPanelMDM_Sub_MD_12 = new JPanel(); + this.jPanel_Title_MD_12 = new JPanel(); + this.jLabel_Title_MD_12 = new JLabel(); + this.txt_Title_MD_12 = new JTextField(); + this.jcb_WGZMD_MD_12 = new JCheckBox(); + this.jPanel_CS2_MD_12 = new JPanel(); + this.jLabel_Style_MD_12 = new JLabel(); + this.jcb_LX_MD_12 = new JComboBox(); + this.jcb_FZ_MD_12 = new JCheckBox(); + this.txt_FZ_MD_12 = new JTextField(); + this.jLabel_SXS_MD_12 = new JLabel(); + this.jToggleButton_JXSZ_MD_12 = new JToggleButton(); + this.jcb_TZM_MD_12 = new JComboBox(); + this.jPanel_NRCS_MD_12 = new JPanel(); + this.jsp_NR_MD_12 = new JScrollPane(); + this.jtb_NR_MD_12 = new JTable(); + this.jLabelMainInfo = new JLabel(); + this.jPanelMainContain_2 = new JPanel(); + + + this.jPanelMDContain_MD_13 = new JPanel(); + this.jPanelMDM_Sub_MD_13 = new JPanel(); + this.jPanel_Title_MD_13 = new JPanel(); + this.jLabel_Title_MD_13 = new JLabel(); + this.txt_Title_MD_13 = new JTextField(); + this.jcb_WGZMD_MD_13 = new JCheckBox(); + this.jPanel_CS2_MD_13 = new JPanel(); + this.jLabel_Style_MD_13 = new JLabel(); + this.jcb_LX_MD_13 = new JComboBox(); + this.jcb_FZ_MD_13 = new JCheckBox(); + this.txt_FZ_MD_13 = new JTextField(); + this.jLabel_SXS_MD_13 = new JLabel(); + this.jToggleButton_JXSZ_MD_13 = new JToggleButton(); + this.jcb_TZM_MD_13 = new JComboBox(); + this.jPanel_NRCS_MD_13 = new JPanel(); + this.jsp_NR_MD_13 = new JScrollPane(); + this.jtb_NR_MD_13 = new JTable(); + + + this.jMenuItemClearAll.setFont(new Font("", 0, 12)); + + this.jMenuItemClearAll.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/ClearAll_16.png"))); + this.jMenuItemSingle.setText("Ŵ"); + this.jMenuItemClearAll.setText(""); + this.jMenuItemClearAll + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jMenuItemClearAllActionPerformed(evt); + } + }); + this.jPopupMenuForJTable.add(this.jMenuItemClearAll); + + this.jMenuItemSingle.setFont(new Font("", 0, 12)); + this.jMenuItemSingle + .setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/FangDaBiaoGe_16.png"))); + this.jMenuItemSingle.setText("Ŵ"); + this.jMenuItemSingle.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jMenuItemSingleActionPerformed(evt); + } + }); + this.jPopupMenuForJTable.add(this.jMenuItemSingle); + + setBackground(new Color(255, 255, 255)); + addAncestorListener(new AncestorListener() + { + public void ancestorMoved(AncestorEvent evt) {} + + public void ancestorAdded(AncestorEvent evt) + { + AutoCodeMainPanel.this.formAncestorAdded(evt); + } + + public void ancestorRemoved(AncestorEvent evt) {} + }); + this.jTabbedPaneMain.setBackground(new Color(255, 255, 255)); + this.jTabbedPaneMain.setTabPlacement(3); + + this.jPanelMainContain_1.setBackground(new Color(255, 255, 255)); + this.jPanelMainContain_1.setBorder( + BorderFactory.createTitledBorder("򴴽")); + + this.jSplitPaneMainContain_1 + .setBackground(new Color(255, 255, 255)); + this.jSplitPaneMainContain_1.setDividerLocation(168); + + this.jPanelItemTypes.setBackground(new Color(255, 255, 255)); + this.jPanelItemTypes.setBorder( + BorderFactory.createBevelBorder(0)); + + this.jPanelOriginLogo.setBackground(new Color(255, 255, 255)); + + this.jLabelOriginLogo.setBackground(new Color(255, 255, 255)); + this.jLabelOriginLogo.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/origin_log.jpg"))); + + GroupLayout jPanelOriginLogoLayout = new GroupLayout( + this.jPanelOriginLogo); + this.jPanelOriginLogo.setLayout(jPanelOriginLogoLayout); + jPanelOriginLogoLayout.setHorizontalGroup(jPanelOriginLogoLayout + .createParallelGroup(1) + .add( + jPanelOriginLogoLayout.createSequentialGroup().add( + this.jLabelOriginLogo, + -2, + 152, + -2) + .addContainerGap(11, 32767))); + jPanelOriginLogoLayout.setVerticalGroup(jPanelOriginLogoLayout + .createParallelGroup(1) + .add(this.jLabelOriginLogo, + -1, 41, + 32767)); + + this.jPanelItemTypeNameList.setBackground(new Color(255, 255, 255)); + this.jPanelItemTypeNameList.setBorder( + BorderFactory.createTitledBorder(null, "б", + 0, + 0, + new Font("", 0, 12))); + + this.jListItemTypeNames.setFont(new Font("", 0, 12)); + + + this.jLabelMainInfo.setText("бѡ봴. "); + originInit(); + + + this.jScrollPane1.setViewportView(this.jListItemTypeNames); + + GroupLayout jPanelItemTypeNameListLayout = new GroupLayout( + this.jPanelItemTypeNameList); + this.jPanelItemTypeNameList.setLayout(jPanelItemTypeNameListLayout); + jPanelItemTypeNameListLayout + .setHorizontalGroup(jPanelItemTypeNameListLayout + .createParallelGroup( + 1).add( + this.jScrollPane1, + -1, + 151, 32767)); + jPanelItemTypeNameListLayout + .setVerticalGroup(jPanelItemTypeNameListLayout + .createParallelGroup( + 1).add( + this.jScrollPane1, + -1, + 380, 32767)); + + GroupLayout jPanelItemTypesLayout = new GroupLayout( + this.jPanelItemTypes); + this.jPanelItemTypes.setLayout(jPanelItemTypesLayout); + jPanelItemTypesLayout.setHorizontalGroup(jPanelItemTypesLayout + .createParallelGroup(1) + .add(this.jPanelOriginLogo, + -1, + -1, + 32767).add(this.jPanelItemTypeNameList, + -1, + -1, + 32767)); + jPanelItemTypesLayout + .setVerticalGroup(jPanelItemTypesLayout + .createParallelGroup( + 1) + .add( + jPanelItemTypesLayout + .createSequentialGroup() + .add( + this.jPanelOriginLogo, + -2, + -1, + -2) + .addPreferredGap( + 0) + .add( + this.jPanelItemTypeNameList, + -1, + -1, + 32767))); + + this.jSplitPaneMainContain_1.setLeftComponent(this.jPanelItemTypes); + + this.jPanelMainOptions.setBackground(new Color(255, 255, 255)); + + this.jPanelMainOptions_sub3.setBackground(new Color(255, 255, 255)); + this.jPanelMainOptions_sub3.setBorder( + BorderFactory.createTitledBorder("")); + + this.jLabelFinish.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/n_Finish1.gif"))); + this.jLabelFinish.addMouseListener(new MouseAdapter() + { + public void mouseEntered(MouseEvent evt) + { + AutoCodeMainPanel.this.jLabelFinishMouseEntered(evt); + } + + public void mouseExited(MouseEvent evt) + { + AutoCodeMainPanel.this.jLabelFinishMouseExited(evt); + } + + public void mousePressed(MouseEvent evt) + { + AutoCodeMainPanel.this.jLabelFinishMousePressed(evt); + } + }); + this.jButtonBack.setBackground(new Color(255, 255, 255)); + this.jButtonBack.setFont(new Font("", 0, 12)); + this.jButtonBack.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/back_16.png"))); + this.jButtonBack.setText("һҳ"); + this.jButtonBack.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jButtonBackActionPerformed(evt); + } + }); + this.jButtonBack1.setBackground(new Color(255, 255, 255)); + this.jButtonBack1.setFont(new Font("", 0, 12)); + this.jButtonBack1.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/next_16.png"))); + this.jButtonBack1.setText("һҳ"); + this.jButtonBack1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jButtonBack1ActionPerformed(evt); + } + }); + this.jButtonBackClose.setBackground(new Color(255, 255, 255)); + this.jButtonBackClose.setFont(new Font("", 0, 12)); + this.jButtonBackClose.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/close_16.png"))); + this.jButtonBackClose.setText("ر"); + this.jButtonBackClose.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jButtonBackCloseActionPerformed(evt); + } + }); + GroupLayout jPanelMainOptions_sub3Layout = new GroupLayout( + this.jPanelMainOptions_sub3); + this.jPanelMainOptions_sub3.setLayout(jPanelMainOptions_sub3Layout); + jPanelMainOptions_sub3Layout + .setHorizontalGroup(jPanelMainOptions_sub3Layout + .createParallelGroup( + 1) + .add( + 2, + jPanelMainOptions_sub3Layout + .createSequentialGroup() + .addContainerGap() + .add(this.jButtonBack) + .addPreferredGap( + 0) + .add(this.jButtonBack1) + .addPreferredGap( + 0, + 21, 32767) + .add(this.jLabelFinish) + .addPreferredGap( + 0) + .add( + this.jButtonBackClose, + -2, + 79, + -2))); + jPanelMainOptions_sub3Layout + .setVerticalGroup(jPanelMainOptions_sub3Layout + .createParallelGroup( + 1) + .add( + jPanelMainOptions_sub3Layout + .createSequentialGroup() + .addContainerGap() + .add( + jPanelMainOptions_sub3Layout + .createParallelGroup( + 1) + .add(this.jLabelFinish) + .add( + 2, + this.jButtonBackClose, + -1, + 28, + 32767) + .add( + jPanelMainOptions_sub3Layout + .createParallelGroup( + 3) + .add( + this.jButtonBack, + -1, + 28, + 32767) + .add( + this.jButtonBack1, + -1, + 28, + 32767))) + .addContainerGap())); + + this.jPanelMainOptions_sub2.setBackground(new Color(255, 255, 255)); + this.jPanelMainOptions_sub2.setBorder( + BorderFactory.createTitledBorder(null, "ŷ-Զ򴴽", + 0, + 0, + new Font("", 0, 12))); + + this.jTabbedPaneMainOption_sub2.setBackground(new Color(255, 255, + 255)); + this.jTabbedPaneMainOption_sub2.setBorder( + BorderFactory.createTitledBorder("")); + this.jTabbedPaneMainOption_sub2 + .setTabPlacement(4); + this.jTabbedPaneMainOption_sub2.setToolTipText(""); + + this.jPanelMainOptionContain + .setBackground(new Color(255, 255, 255)); + + this.jPanelZhuCanShu_Sub.setBackground(new Color(255, 255, 255)); + + this.jPanelMD_CSPZ.setBackground(new Color(255, 255, 255)); + this.jPanelMD_CSPZ.setBorder(BorderFactory.createTitledBorder( + null, "β", + 0, + 0, + new Font("", 0, 12))); + + this.jLabelMDS.setFont(new Font("", 0, 12)); + this.jLabelMDS.setText(""); + + this.jComboBoxMDS.setModel(new DefaultComboBoxModel( + new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", + "10", "11", "12", "13" })); + this.jComboBoxMDS.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jComboBoxMDSActionPerformed(evt); + } + });this.jComboBoxMDS + .addAncestorListener(new AncestorListener() + { + public void ancestorMoved(AncestorEvent evt) {} + + public void ancestorAdded(AncestorEvent evt) + { + AutoCodeMainPanel.this.jComboBoxMDSAncestorAdded(evt); + } + + public void ancestorRemoved(AncestorEvent evt) {} + }); + this.jLabelLSHBFWZ.setFont(new Font("", 0, 12)); + this.jLabelLSHBFWZ.setText("ˮλã"); + + this.jComboBoxLSHBFWZ.setEditable(true); + this.jComboBoxLSHBFWZ.setFont(new Font("", 0, 12)); + this.jComboBoxLSHBFWZ.setModel(new DefaultComboBoxModel( + new String[] { "1", "2", "3", "4", "5", "6", "" })); + this.jComboBoxLSHBFWZ.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jComboBoxLSHBFWZActionPerformed(evt); + } + }); + GroupLayout jPanelMD_CSPZLayout = new GroupLayout( + this.jPanelMD_CSPZ); + this.jPanelMD_CSPZ.setLayout(jPanelMD_CSPZLayout); + jPanelMD_CSPZLayout + .setHorizontalGroup(jPanelMD_CSPZLayout + .createParallelGroup( + 1) + .add( + jPanelMD_CSPZLayout + .createSequentialGroup() + .addContainerGap() + .add(this.jLabelMDS) + .addPreferredGap( + 0) + .add( + this.jComboBoxMDS, + -2, + 56, + -2) + .add(8, 8, 8) + .add(this.jLabelLSHBFWZ) + .addPreferredGap( + 0) + .add(this.jComboBoxLSHBFWZ, 0, 101, + 32767) + .addContainerGap())); + jPanelMD_CSPZLayout + .setVerticalGroup(jPanelMD_CSPZLayout + .createParallelGroup( + 1) + .add( + jPanelMD_CSPZLayout + .createSequentialGroup() + .addContainerGap() + .add( + jPanelMD_CSPZLayout + .createParallelGroup( + 3) + .add(this.jLabelMDS) + .add(this.jLabelLSHBFWZ) + .add( + this.jComboBoxLSHBFWZ, + -2, + -1, + -2) + .add( + this.jComboBoxMDS, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel3.setBackground(new Color(255, 255, 255)); + this.jPanel3.setBorder(BorderFactory.createTitledBorder(null, + "ˮŲ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabelWS.setFont(new Font("", 0, 12)); + this.jLabelWS.setText("λ "); + + this.jComboBoxWS.setEditable(true); + this.jComboBoxWS.setModel(new DefaultComboBoxModel(new String[] { + "1", "2", "3", "4", "5", "6", "7", "8", "9" })); + + this.jLabelBC.setFont(new Font("", 0, 12)); + this.jLabelBC.setText(" "); + + this.jComboBoxBC.setEditable(true); + this.jComboBoxBC.setModel(new DefaultComboBoxModel(new String[] { + "1", "2", "3", "4", "5", "6", "7", "8", "9" })); + + this.jLabelQSZ.setFont(new Font("", 0, 12)); + this.jLabelQSZ.setText("ʼֵ"); + + this.jComboBoxWS1.setEditable(true); + this.jComboBoxWS1.setModel(new DefaultComboBoxModel( + new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", + "10", "101", "201" })); + + this.jLabelZZZ.setFont(new Font("", 0, 12)); + this.jLabelZZZ.setText("ֵֹ"); + + this.jComboBoxZZZ.setEditable(true); + this.jComboBoxZZZ.setModel(new DefaultComboBoxModel( + new String[] { "9", "99", "999", "9999", "99999", "999999" })); + + GroupLayout jPanel3Layout = new GroupLayout( + this.jPanel3); + this.jPanel3.setLayout(jPanel3Layout); + jPanel3Layout + .setHorizontalGroup(jPanel3Layout + .createParallelGroup( + 1) + .add( + jPanel3Layout + .createSequentialGroup() + .addContainerGap() + .add( + jPanel3Layout + .createParallelGroup( + 1, + false) + .add( + jPanel3Layout + .createSequentialGroup() + .add( + this.jLabelWS) + .addPreferredGap( + 0) + .add( + this.jComboBoxWS, + 0, + 0, + 32767)) + .add( + jPanel3Layout + .createSequentialGroup() + .add( + this.jLabelBC) + .addPreferredGap( + 0) + .add( + this.jComboBoxBC, + -2, + 57, + -2))) + .add(29, 29, 29) + .add( + jPanel3Layout + .createParallelGroup( + 1) + .add(this.jLabelQSZ).add( + this.jLabelZZZ)) + .addPreferredGap( + 0) + .add( + jPanel3Layout + .createParallelGroup( + 1) + .add(this.jComboBoxZZZ, 0, + 113, + 32767) + .add(this.jComboBoxWS1, 0, + 113, + 32767)))); + jPanel3Layout + .setVerticalGroup(jPanel3Layout + .createParallelGroup( + 1) + .add( + jPanel3Layout + .createSequentialGroup() + .add( + jPanel3Layout + .createParallelGroup( + 3) + .add(this.jLabelWS) + .add( + this.jComboBoxWS, + -2, + -1, + -2) + .add(this.jLabelQSZ) + .add( + this.jComboBoxWS1, + -2, + -1, + -2)) + .addPreferredGap( + 0) + .add( + jPanel3Layout + .createParallelGroup( + 3) + .add(this.jLabelBC) + .add( + this.jComboBoxBC, + -2, + -1, + -2) + .add(this.jLabelZZZ) + .add( + this.jComboBoxZZZ, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel4.setBackground(new Color(255, 255, 255)); + this.jPanel4.setBorder(BorderFactory.createTitledBorder(null, + "", + 0, + 0, + new Font("", 0, 12))); + + this.jCheckBoxItemIDKBJ.setBackground(new Color(255, 255, 255)); + this.jCheckBoxItemIDKBJ.setFont(new Font("", 0, 12)); + this.jCheckBoxItemIDKBJ.setText("ItemIDɱ༭"); + + this.jCheckBoxSDBM.setBackground(new Color(255, 255, 255)); + this.jCheckBoxSDBM.setFont(new Font("", 0, 12)); + this.jCheckBoxSDBM.setText("ֶ"); + this.jCheckBoxSDBM.addItemListener(new ItemListener() + { + public void itemStateChanged(ItemEvent evt) + { + AutoCodeMainPanel.this.jCheckBoxSDBMItemStateChanged(evt); + } + }); + this.jCheckBoxItemName.setBackground(new Color(255, 255, 255)); + this.jCheckBoxItemName.setFont(new Font("", 0, 12)); + this.jCheckBoxItemName.setText("Item NameֵRevForm"); + this.jCheckBoxItemName.addItemListener(new ItemListener() + { + public void itemStateChanged(ItemEvent evt) + { + AutoCodeMainPanel.this.setRevForTextField(evt); + } + }); + this.jTextFieldRevFormPro.setToolTipText("д汾ϵij"); + this.jTextFieldRevFormPro.setEnabled(false); + this.jTextFieldRevFormPro + .addAncestorListener(new AncestorListener() + { + public void ancestorMoved(AncestorEvent evt) {} + + public void ancestorAdded(AncestorEvent evt) + { + AutoCodeMainPanel.this.jTextFieldRevFormProAncestorAdded(evt); + } + + public void ancestorRemoved(AncestorEvent evt) {} + }); + this.jLabelUp.setFont(new Font("", 0, 12)); + this.jLabelUp.setText(""); + + GroupLayout jPanel4Layout = new GroupLayout( + this.jPanel4); + this.jPanel4.setLayout(jPanel4Layout); + jPanel4Layout + .setHorizontalGroup(jPanel4Layout + .createParallelGroup( + 1) + .add( + jPanel4Layout + .createSequentialGroup() + .add( + jPanel4Layout + .createParallelGroup( + 1) + .add( + jPanel4Layout + .createSequentialGroup() + .add( + this.jCheckBoxItemIDKBJ) + .add( + 18, + 18, + 18) + .add( + this.jCheckBoxSDBM)) + .add( + jPanel4Layout + .createSequentialGroup() + .add( + this.jCheckBoxItemName) + .addPreferredGap( + 0) + .add( + this.jTextFieldRevFormPro, + -1, + 104, + 32767) + .addPreferredGap( + 0) + .add( + this.jLabelUp))) + .addContainerGap())); + jPanel4Layout + .setVerticalGroup(jPanel4Layout + .createParallelGroup( + 1) + .add( + jPanel4Layout + .createSequentialGroup() + .add( + jPanel4Layout + .createParallelGroup( + 3) + .add(this.jCheckBoxItemIDKBJ) + .add(this.jCheckBoxSDBM)) + .addPreferredGap( + 0) + .add( + jPanel4Layout + .createParallelGroup( + 3) + .add(this.jCheckBoxItemName) + .add(this.jLabelUp) + .add( + this.jTextFieldRevFormPro, + -2, + -1, + -2)) + .addContainerGap(11, 32767))); + + GroupLayout jPanelZhuCanShu_SubLayout = new GroupLayout( + this.jPanelZhuCanShu_Sub); + this.jPanelZhuCanShu_Sub.setLayout(jPanelZhuCanShu_SubLayout); + jPanelZhuCanShu_SubLayout.setHorizontalGroup(jPanelZhuCanShu_SubLayout + .createParallelGroup(1) + .add(this.jPanelMD_CSPZ, + -1, + -1, + 32767).add(this.jPanel3, + -1, + -1, + 32767).add(this.jPanel4, + -1, + -1, + 32767)); + jPanelZhuCanShu_SubLayout + .setVerticalGroup(jPanelZhuCanShu_SubLayout + .createParallelGroup( + 1) + .add( + jPanelZhuCanShu_SubLayout + .createSequentialGroup() + .add( + this.jPanelMD_CSPZ, + -2, + -1, + -2) + .add(18, 18, 18) + .add( + this.jPanel3, + -2, + -1, + -2) + .add(18, 18, 18) + .add( + this.jPanel4, + -2, + -1, + -2) + .addContainerGap( + -1, + 32767))); + + GroupLayout jPanelMainOptionContainLayout = new GroupLayout( + this.jPanelMainOptionContain); + this.jPanelMainOptionContain.setLayout(jPanelMainOptionContainLayout); + jPanelMainOptionContainLayout + .setHorizontalGroup(jPanelMainOptionContainLayout + .createParallelGroup( + 1).add( + this.jPanelZhuCanShu_Sub, + -1, + -1, + 32767)); + jPanelMainOptionContainLayout + .setVerticalGroup(jPanelMainOptionContainLayout + .createParallelGroup( + 1).add( + this.jPanelZhuCanShu_Sub, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("", + new ImageIcon(getClass().getResource("/com/origin/images/ZhuCanShu_16.png")), + this.jPanelMainOptionContain, ""); + + this.jPanelMDContain_MD_1.setToolTipText("1"); + + this.jPanelMDM_Sub_MD_1.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_1.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_1.setBorder( + BorderFactory.createTitledBorder(null, "1 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_1.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_1.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_1.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_1.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_1.setText("*⣺"); + + this.txt_Title_MD_1.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_1.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_1.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_1.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_1Layout = new GroupLayout( + this.jPanel_Title_MD_1); + this.jPanel_Title_MD_1.setLayout(jPanel_Title_MD_1Layout); + jPanel_Title_MD_1Layout.setHorizontalGroup(jPanel_Title_MD_1Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_1Layout.createSequentialGroup().add( + this.jLabel_Title_MD_1).addPreferredGap( + 0).add( + this.txt_Title_MD_1, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_1))); + jPanel_Title_MD_1Layout + .setVerticalGroup(jPanel_Title_MD_1Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_1Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_1Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_1) + .add(this.jcb_WGZMD_MD_1) + .add( + this.txt_Title_MD_1, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_1.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_1.setBorder(BorderFactory.createTitledBorder( + null, "1 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_1.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_1.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_1.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_1.setText("ͣ"); + + this.jcb_LX_MD_1.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_1.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_1, AutoCodeMainPanel.this.jsp_NR_MD_1, + AutoCodeMainPanel.this.jtb_NR_MD_1, 1); + } + }); + this.jcb_FZ_MD_1.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_1.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_1.setText("ֵRevision Master"); + this.jcb_FZ_MD_1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_1ActionPerformed(evt); + } + }); + this.txt_FZ_MD_1.setEditable(false); + this.txt_FZ_MD_1.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_1.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_1.setText(""); + + this.jToggleButton_JXSZ_MD_1 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_1.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_1.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_1 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_1ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_1.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_1.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_1 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_1Layout = new GroupLayout( + this.jPanel_CS2_MD_1); + this.jPanel_CS2_MD_1.setLayout(jPanel_CS2_MD_1Layout); + jPanel_CS2_MD_1Layout + .setHorizontalGroup(jPanel_CS2_MD_1Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_1Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_1, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_1, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_1Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_1, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_1)) + .add( + jPanel_CS2_MD_1Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_1) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_1, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_1, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_1Layout + .setVerticalGroup(jPanel_CS2_MD_1Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_1Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_1Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_1) + .add( + this.jcb_TZM_MD_1, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_1, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_1Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_1) + .add( + this.jToggleButton_JXSZ_MD_1, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_1Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_1) + .add( + this.txt_FZ_MD_1, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_1.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_1.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 51, 51))); + + this.jsp_NR_MD_1.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_1 + .setHorizontalScrollBarPolicy(31); + this.jsp_NR_MD_1.setAutoscrolls(true); + this.jsp_NR_MD_1.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_1.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_1.setModel(new DefaultTableModel( + new Object[][] { { "", "" } }, new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_1.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_1MouseReleased(evt); + } + });this.jtb_NR_MD_1 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_1PropertyChange(evt); + } + }); + this.jsp_NR_MD_1.setViewportView(this.jtb_NR_MD_1); + + GroupLayout jPanel_NRCS_MD_1Layout = new GroupLayout( + this.jPanel_NRCS_MD_1); + this.jPanel_NRCS_MD_1.setLayout(jPanel_NRCS_MD_1Layout); + jPanel_NRCS_MD_1Layout.setHorizontalGroup(jPanel_NRCS_MD_1Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_1, -1, + 313, 32767)); + jPanel_NRCS_MD_1Layout.setVerticalGroup(jPanel_NRCS_MD_1Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_1, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_1Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_1); + this.jPanelMDM_Sub_MD_1.setLayout(jPanelMDM_Sub_MD_1Layout); + jPanelMDM_Sub_MD_1Layout.setHorizontalGroup(jPanelMDM_Sub_MD_1Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_1, + -1, + -1, + 32767).add(this.jPanel_Title_MD_1, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_1, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_1Layout + .setVerticalGroup(jPanelMDM_Sub_MD_1Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_1Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_1, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_1, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_1, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_1Layout = new GroupLayout( + this.jPanelMDContain_MD_1); + this.jPanelMDContain_MD_1.setLayout(jPanelMDContain_MD_1Layout); + jPanelMDContain_MD_1Layout + .setHorizontalGroup(jPanelMDContain_MD_1Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_1, + -1, + -1, + 32767)); + jPanelMDContain_MD_1Layout.setVerticalGroup(jPanelMDContain_MD_1Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_1, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("1", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_1, ""); + + this.jPanelMDContain_MD_2.setToolTipText("2"); + + this.jPanelMDM_Sub_MD_2.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_2.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_2.setBorder( + BorderFactory.createTitledBorder(null, "2 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_2.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_2.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_2.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_2.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_2.setText("*⣺"); + + this.txt_Title_MD_2.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_2.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_2.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_2.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_2Layout = new GroupLayout( + this.jPanel_Title_MD_2); + this.jPanel_Title_MD_2.setLayout(jPanel_Title_MD_2Layout); + jPanel_Title_MD_2Layout.setHorizontalGroup(jPanel_Title_MD_2Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_2Layout.createSequentialGroup().add( + this.jLabel_Title_MD_2).addPreferredGap( + 0).add( + this.txt_Title_MD_2, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_2))); + jPanel_Title_MD_2Layout + .setVerticalGroup(jPanel_Title_MD_2Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_2Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_2Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_2) + .add(this.jcb_WGZMD_MD_2) + .add( + this.txt_Title_MD_2, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_2.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_2.setBorder(BorderFactory.createTitledBorder( + null, "2 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_2.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_2.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_2.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_2.setText("ͣ"); + + this.jcb_LX_MD_2.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_2.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_2, AutoCodeMainPanel.this.jsp_NR_MD_2, + AutoCodeMainPanel.this.jtb_NR_MD_2, 2); + } + }); + this.jcb_FZ_MD_2.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_2.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_2.setText("ֵRevision Master"); + this.jcb_FZ_MD_2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_2ActionPerformed(evt); + } + }); + this.txt_FZ_MD_2.setEditable(false); + this.txt_FZ_MD_2.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_2.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_2.setText(""); + + this.jToggleButton_JXSZ_MD_2 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_2.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_2.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_2 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_2ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_2.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_2.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_2 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_2Layout = new GroupLayout( + this.jPanel_CS2_MD_2); + this.jPanel_CS2_MD_2.setLayout(jPanel_CS2_MD_2Layout); + jPanel_CS2_MD_2Layout + .setHorizontalGroup(jPanel_CS2_MD_2Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_2Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_2, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_2, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_2Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_2, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_2)) + .add( + jPanel_CS2_MD_2Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_2) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_2, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_2, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_2Layout + .setVerticalGroup(jPanel_CS2_MD_2Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_2Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_2Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_2) + .add( + this.jcb_TZM_MD_2, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_2, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_2Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_2) + .add( + this.jToggleButton_JXSZ_MD_2, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_2Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_2) + .add( + this.txt_FZ_MD_2, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_2.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_2.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_2.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_2.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_2.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_2.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_2.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_2MouseReleased(evt); + } + });this.jtb_NR_MD_2 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_2PropertyChange(evt); + } + }); + this.jsp_NR_MD_2.setViewportView(this.jtb_NR_MD_2); + + GroupLayout jPanel_NRCS_MD_2Layout = new GroupLayout( + this.jPanel_NRCS_MD_2); + this.jPanel_NRCS_MD_2.setLayout(jPanel_NRCS_MD_2Layout); + jPanel_NRCS_MD_2Layout.setHorizontalGroup(jPanel_NRCS_MD_2Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_2, -1, + 313, 32767)); + jPanel_NRCS_MD_2Layout.setVerticalGroup(jPanel_NRCS_MD_2Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_2, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_2Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_2); + this.jPanelMDM_Sub_MD_2.setLayout(jPanelMDM_Sub_MD_2Layout); + jPanelMDM_Sub_MD_2Layout.setHorizontalGroup(jPanelMDM_Sub_MD_2Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_2, + -1, + -1, + 32767).add(this.jPanel_Title_MD_2, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_2, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_2Layout + .setVerticalGroup(jPanelMDM_Sub_MD_2Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_2Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_2, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_2, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_2, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_2Layout = new GroupLayout( + this.jPanelMDContain_MD_2); + this.jPanelMDContain_MD_2.setLayout(jPanelMDContain_MD_2Layout); + jPanelMDContain_MD_2Layout + .setHorizontalGroup(jPanelMDContain_MD_2Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_2, + -1, + -1, + 32767)); + jPanelMDContain_MD_2Layout.setVerticalGroup(jPanelMDContain_MD_2Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_2, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("2", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_2, "2"); + + this.jPanelMDContain_MD_3.setToolTipText("3"); + + this.jPanelMDM_Sub_MD_3.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_3.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_3.setBorder( + BorderFactory.createTitledBorder(null, "3 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_3.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_3.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_3.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_3.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_3.setText("*⣺"); + + this.txt_Title_MD_3.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_3.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_3.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_3.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_3Layout = new GroupLayout( + this.jPanel_Title_MD_3); + this.jPanel_Title_MD_3.setLayout(jPanel_Title_MD_3Layout); + jPanel_Title_MD_3Layout.setHorizontalGroup(jPanel_Title_MD_3Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_3Layout.createSequentialGroup().add( + this.jLabel_Title_MD_3).addPreferredGap( + 0).add( + this.txt_Title_MD_3, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_3))); + jPanel_Title_MD_3Layout + .setVerticalGroup(jPanel_Title_MD_3Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_3Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_3Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_3) + .add(this.jcb_WGZMD_MD_3) + .add( + this.txt_Title_MD_3, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_3.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_3.setBorder(BorderFactory.createTitledBorder( + null, "3 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_3.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_3.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_3.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_3.setText("ͣ"); + + this.jcb_LX_MD_3.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_3.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_3, AutoCodeMainPanel.this.jsp_NR_MD_3, + AutoCodeMainPanel.this.jtb_NR_MD_3, 3); + } + }); + this.jcb_FZ_MD_3.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_3.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_3.setText("ֵRevision Master"); + this.jcb_FZ_MD_3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_3ActionPerformed(evt); + } + }); + this.txt_FZ_MD_3.setEditable(false); + this.txt_FZ_MD_3.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_3.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_3.setText(""); + + this.jToggleButton_JXSZ_MD_3 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_3.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_3.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_3 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_3ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_3.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_3.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_3 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_3Layout = new GroupLayout( + this.jPanel_CS2_MD_3); + this.jPanel_CS2_MD_3.setLayout(jPanel_CS2_MD_3Layout); + jPanel_CS2_MD_3Layout + .setHorizontalGroup(jPanel_CS2_MD_3Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_3Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_3, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_3, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_3Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_3, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_3)) + .add( + jPanel_CS2_MD_3Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_3) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_3, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_3, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_3Layout + .setVerticalGroup(jPanel_CS2_MD_3Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_3Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_3Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_3) + .add( + this.jcb_TZM_MD_3, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_3, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_3Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_3) + .add( + this.jToggleButton_JXSZ_MD_3, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_3Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_3) + .add( + this.txt_FZ_MD_3, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_3.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_3.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 51))); + + this.jsp_NR_MD_3.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_3.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_3.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_3.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_3.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_3MouseReleased(evt); + } + });this.jtb_NR_MD_3 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_3PropertyChange(evt); + } + }); + this.jsp_NR_MD_3.setViewportView(this.jtb_NR_MD_3); + + GroupLayout jPanel_NRCS_MD_3Layout = new GroupLayout( + this.jPanel_NRCS_MD_3); + this.jPanel_NRCS_MD_3.setLayout(jPanel_NRCS_MD_3Layout); + jPanel_NRCS_MD_3Layout.setHorizontalGroup(jPanel_NRCS_MD_3Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_3, -1, + 313, 32767)); + jPanel_NRCS_MD_3Layout.setVerticalGroup(jPanel_NRCS_MD_3Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_3, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_3Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_3); + this.jPanelMDM_Sub_MD_3.setLayout(jPanelMDM_Sub_MD_3Layout); + jPanelMDM_Sub_MD_3Layout.setHorizontalGroup(jPanelMDM_Sub_MD_3Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_3, + -1, + -1, + 32767).add(this.jPanel_Title_MD_3, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_3, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_3Layout + .setVerticalGroup(jPanelMDM_Sub_MD_3Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_3Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_3, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_3, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_3, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_3Layout = new GroupLayout( + this.jPanelMDContain_MD_3); + this.jPanelMDContain_MD_3.setLayout(jPanelMDContain_MD_3Layout); + jPanelMDContain_MD_3Layout + .setHorizontalGroup(jPanelMDContain_MD_3Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_3, + -1, + -1, + 32767)); + jPanelMDContain_MD_3Layout.setVerticalGroup(jPanelMDContain_MD_3Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_3, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("3", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_3, "3"); + + this.jPanelMDContain_MD_4.setToolTipText("4"); + + this.jPanelMDM_Sub_MD_4.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_4.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_4.setBorder( + BorderFactory.createTitledBorder(null, "4 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_4.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_4.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_4.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_4.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_4.setText("*⣺"); + + this.txt_Title_MD_4.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_4.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_4.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_4.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_4Layout = new GroupLayout( + this.jPanel_Title_MD_4); + this.jPanel_Title_MD_4.setLayout(jPanel_Title_MD_4Layout); + jPanel_Title_MD_4Layout.setHorizontalGroup(jPanel_Title_MD_4Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_4Layout.createSequentialGroup().add( + this.jLabel_Title_MD_4).addPreferredGap( + 0).add( + this.txt_Title_MD_4, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_4))); + jPanel_Title_MD_4Layout + .setVerticalGroup(jPanel_Title_MD_4Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_4Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_4Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_4) + .add(this.jcb_WGZMD_MD_4) + .add( + this.txt_Title_MD_4, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_4.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_4.setBorder(BorderFactory.createTitledBorder( + null, "4 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_4.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_4.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_4.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_4.setText("ͣ"); + + this.jcb_LX_MD_4.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_4.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_4, AutoCodeMainPanel.this.jsp_NR_MD_4, + AutoCodeMainPanel.this.jtb_NR_MD_4, 4); + } + }); + this.jcb_FZ_MD_4.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_4.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_4.setText("ֵRevision Master"); + this.jcb_FZ_MD_4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_4ActionPerformed(evt); + } + }); + this.txt_FZ_MD_4.setEditable(false); + this.txt_FZ_MD_4.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_4.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_4.setText(""); + + this.jToggleButton_JXSZ_MD_4 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_4.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_4.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_4 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_4ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_4.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_4.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_4 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_4Layout = new GroupLayout( + this.jPanel_CS2_MD_4); + this.jPanel_CS2_MD_4.setLayout(jPanel_CS2_MD_4Layout); + jPanel_CS2_MD_4Layout + .setHorizontalGroup(jPanel_CS2_MD_4Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_4Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_4, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_4, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_4Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_4, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_4)) + .add( + jPanel_CS2_MD_4Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_4) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_4, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_4, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_4Layout + .setVerticalGroup(jPanel_CS2_MD_4Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_4Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_4Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_4) + .add( + this.jcb_TZM_MD_4, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_4, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_4Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_4) + .add( + this.jToggleButton_JXSZ_MD_4, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_4Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_4) + .add( + this.txt_FZ_MD_4, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_4.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_4.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 51, 51))); + + this.jsp_NR_MD_4.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_4.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_4.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_4.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_4.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_4MouseReleased(evt); + } + });this.jtb_NR_MD_4 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_4PropertyChange(evt); + } + }); + this.jsp_NR_MD_4.setViewportView(this.jtb_NR_MD_4); + + GroupLayout jPanel_NRCS_MD_4Layout = new GroupLayout( + this.jPanel_NRCS_MD_4); + this.jPanel_NRCS_MD_4.setLayout(jPanel_NRCS_MD_4Layout); + jPanel_NRCS_MD_4Layout.setHorizontalGroup(jPanel_NRCS_MD_4Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_4, -1, + 313, 32767)); + jPanel_NRCS_MD_4Layout.setVerticalGroup(jPanel_NRCS_MD_4Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_4, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_4Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_4); + this.jPanelMDM_Sub_MD_4.setLayout(jPanelMDM_Sub_MD_4Layout); + jPanelMDM_Sub_MD_4Layout.setHorizontalGroup(jPanelMDM_Sub_MD_4Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_4, + -1, + -1, + 32767).add(this.jPanel_Title_MD_4, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_4, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_4Layout + .setVerticalGroup(jPanelMDM_Sub_MD_4Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_4Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_4, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_4, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_4, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_4Layout = new GroupLayout( + this.jPanelMDContain_MD_4); + this.jPanelMDContain_MD_4.setLayout(jPanelMDContain_MD_4Layout); + jPanelMDContain_MD_4Layout + .setHorizontalGroup(jPanelMDContain_MD_4Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_4, + -1, + -1, + 32767)); + jPanelMDContain_MD_4Layout.setVerticalGroup(jPanelMDContain_MD_4Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_4, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("4", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_4, "4"); + + this.jPanelMDContain_MD_5.setToolTipText("5"); + + this.jPanelMDM_Sub_MD_5.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_5.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_5.setBorder( + BorderFactory.createTitledBorder(null, "5 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_5.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_5.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_5.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_5.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_5.setText("*⣺"); + + this.txt_Title_MD_5.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_5.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_5.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_5.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_5Layout = new GroupLayout( + this.jPanel_Title_MD_5); + this.jPanel_Title_MD_5.setLayout(jPanel_Title_MD_5Layout); + jPanel_Title_MD_5Layout.setHorizontalGroup(jPanel_Title_MD_5Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_5Layout.createSequentialGroup().add( + this.jLabel_Title_MD_5).addPreferredGap( + 0).add( + this.txt_Title_MD_5, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_5))); + jPanel_Title_MD_5Layout + .setVerticalGroup(jPanel_Title_MD_5Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_5Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_5Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_5) + .add(this.jcb_WGZMD_MD_5) + .add( + this.txt_Title_MD_5, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_5.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_5.setBorder(BorderFactory.createTitledBorder( + null, "5 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_5.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_5.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_5.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_5.setText("ͣ"); + + this.jcb_LX_MD_5.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_5.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_5.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_5, AutoCodeMainPanel.this.jsp_NR_MD_5, + AutoCodeMainPanel.this.jtb_NR_MD_5, 5); + } + }); + this.jcb_FZ_MD_5.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_5.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_5.setText("ֵRevision Master"); + this.jcb_FZ_MD_5.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_5ActionPerformed(evt); + } + }); + this.txt_FZ_MD_5.setEditable(false); + this.txt_FZ_MD_5.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_5.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_5.setText(""); + + this.jToggleButton_JXSZ_MD_5 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_5.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_5.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_5 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_5ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_5.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_5.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_5 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_5Layout = new GroupLayout( + this.jPanel_CS2_MD_5); + this.jPanel_CS2_MD_5.setLayout(jPanel_CS2_MD_5Layout); + jPanel_CS2_MD_5Layout + .setHorizontalGroup(jPanel_CS2_MD_5Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_5Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_5, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_5, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_5Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_5, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_5)) + .add( + jPanel_CS2_MD_5Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_5) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_5, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_5, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_5Layout + .setVerticalGroup(jPanel_CS2_MD_5Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_5Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_5Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_5) + .add( + this.jcb_TZM_MD_5, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_5, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_5Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_5) + .add( + this.jToggleButton_JXSZ_MD_5, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_5Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_5) + .add( + this.txt_FZ_MD_5, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_5.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_5.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 51))); + + this.jsp_NR_MD_5.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_5.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_5.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_5.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_5.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_5MouseReleased(evt); + } + });this.jtb_NR_MD_5 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_5PropertyChange(evt); + } + }); + this.jsp_NR_MD_5.setViewportView(this.jtb_NR_MD_5); + + GroupLayout jPanel_NRCS_MD_5Layout = new GroupLayout( + this.jPanel_NRCS_MD_5); + this.jPanel_NRCS_MD_5.setLayout(jPanel_NRCS_MD_5Layout); + jPanel_NRCS_MD_5Layout.setHorizontalGroup(jPanel_NRCS_MD_5Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_5, -1, + 313, 32767)); + jPanel_NRCS_MD_5Layout.setVerticalGroup(jPanel_NRCS_MD_5Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_5, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_5Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_5); + this.jPanelMDM_Sub_MD_5.setLayout(jPanelMDM_Sub_MD_5Layout); + jPanelMDM_Sub_MD_5Layout.setHorizontalGroup(jPanelMDM_Sub_MD_5Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_5, + -1, + -1, + 32767).add(this.jPanel_Title_MD_5, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_5, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_5Layout + .setVerticalGroup(jPanelMDM_Sub_MD_5Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_5Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_5, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_5, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_5, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_5Layout = new GroupLayout( + this.jPanelMDContain_MD_5); + this.jPanelMDContain_MD_5.setLayout(jPanelMDContain_MD_5Layout); + jPanelMDContain_MD_5Layout + .setHorizontalGroup(jPanelMDContain_MD_5Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_5, + -1, + -1, + 32767)); + jPanelMDContain_MD_5Layout.setVerticalGroup(jPanelMDContain_MD_5Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_5, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("5", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_5, "5"); + + this.jPanelMDContain_MD_6.setToolTipText("6"); + + this.jPanelMDM_Sub_MD_6.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_6.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_6.setBorder( + BorderFactory.createTitledBorder(null, "6 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_6.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_6.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_6.setForeground(new Color(255, 0, 51)); + this.jLabel_Title_MD_6.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_6.setText("*⣺"); + + this.txt_Title_MD_6.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_6.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_6.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_6.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_6Layout = new GroupLayout( + this.jPanel_Title_MD_6); + this.jPanel_Title_MD_6.setLayout(jPanel_Title_MD_6Layout); + jPanel_Title_MD_6Layout.setHorizontalGroup(jPanel_Title_MD_6Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_6Layout.createSequentialGroup().add( + this.jLabel_Title_MD_6).addPreferredGap( + 0).add( + this.txt_Title_MD_6, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_6))); + jPanel_Title_MD_6Layout + .setVerticalGroup(jPanel_Title_MD_6Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_6Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_6Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_6) + .add(this.jcb_WGZMD_MD_6) + .add( + this.txt_Title_MD_6, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_6.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_6.setBorder(BorderFactory.createTitledBorder( + null, "6 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_6.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_6.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_6.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_6.setText("ͣ"); + + this.jcb_LX_MD_6.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_6.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_6.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_6, AutoCodeMainPanel.this.jsp_NR_MD_6, + AutoCodeMainPanel.this.jtb_NR_MD_6, 6); + } + }); + this.jcb_FZ_MD_6.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_6.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_6.setText("ֵRevision Master"); + this.jcb_FZ_MD_6.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_6ActionPerformed(evt); + } + }); + this.txt_FZ_MD_6.setEditable(false); + this.txt_FZ_MD_6.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_6.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_6.setText(""); + + this.jToggleButton_JXSZ_MD_6 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_6.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_6.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_6 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_6ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_6.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_6.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_6 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_6Layout = new GroupLayout( + this.jPanel_CS2_MD_6); + this.jPanel_CS2_MD_6.setLayout(jPanel_CS2_MD_6Layout); + jPanel_CS2_MD_6Layout + .setHorizontalGroup(jPanel_CS2_MD_6Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_6Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_6, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_6, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_6Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_6, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_6)) + .add( + jPanel_CS2_MD_6Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_6) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_6, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_6, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_6Layout + .setVerticalGroup(jPanel_CS2_MD_6Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_6Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_6Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_6) + .add( + this.jcb_TZM_MD_6, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_6, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_6Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_6) + .add( + this.jToggleButton_JXSZ_MD_6, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_6Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_6) + .add( + this.txt_FZ_MD_6, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_6.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_6.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_6.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_6.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_6.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_6.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_6.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_6MouseReleased(evt); + } + });this.jtb_NR_MD_6 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_6PropertyChange(evt); + } + }); + this.jsp_NR_MD_6.setViewportView(this.jtb_NR_MD_6); + + GroupLayout jPanel_NRCS_MD_6Layout = new GroupLayout( + this.jPanel_NRCS_MD_6); + this.jPanel_NRCS_MD_6.setLayout(jPanel_NRCS_MD_6Layout); + jPanel_NRCS_MD_6Layout.setHorizontalGroup(jPanel_NRCS_MD_6Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_6, -1, + 313, 32767)); + jPanel_NRCS_MD_6Layout.setVerticalGroup(jPanel_NRCS_MD_6Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_6, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_6Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_6); + this.jPanelMDM_Sub_MD_6.setLayout(jPanelMDM_Sub_MD_6Layout); + jPanelMDM_Sub_MD_6Layout.setHorizontalGroup(jPanelMDM_Sub_MD_6Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_6, + -1, + -1, + 32767).add(this.jPanel_Title_MD_6, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_6, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_6Layout + .setVerticalGroup(jPanelMDM_Sub_MD_6Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_6Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_6, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_6, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_6, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_6Layout = new GroupLayout( + this.jPanelMDContain_MD_6); + this.jPanelMDContain_MD_6.setLayout(jPanelMDContain_MD_6Layout); + jPanelMDContain_MD_6Layout + .setHorizontalGroup(jPanelMDContain_MD_6Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_6, + -1, + -1, + 32767)); + jPanelMDContain_MD_6Layout.setVerticalGroup(jPanelMDContain_MD_6Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_6, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("6", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_6, "6"); + + this.jPanelMDContain_MD_7.setToolTipText("7"); + + this.jPanelMDM_Sub_MD_7.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_7.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_7.setBorder( + BorderFactory.createTitledBorder(null, "7 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_7.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_7.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_7.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_7.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_7.setText("*⣺"); + + this.txt_Title_MD_7.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_7.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_7.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_7.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_7Layout = new GroupLayout( + this.jPanel_Title_MD_7); + this.jPanel_Title_MD_7.setLayout(jPanel_Title_MD_7Layout); + jPanel_Title_MD_7Layout.setHorizontalGroup(jPanel_Title_MD_7Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_7Layout.createSequentialGroup().add( + this.jLabel_Title_MD_7).addPreferredGap( + 0).add( + this.txt_Title_MD_7, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_7))); + jPanel_Title_MD_7Layout + .setVerticalGroup(jPanel_Title_MD_7Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_7Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_7Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_7) + .add(this.jcb_WGZMD_MD_7) + .add( + this.txt_Title_MD_7, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_7.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_7.setBorder(BorderFactory.createTitledBorder( + null, "7 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_7.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_7.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_7.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_7.setText("ͣ"); + + this.jcb_LX_MD_7.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_7.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_7.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_7, AutoCodeMainPanel.this.jsp_NR_MD_7, + AutoCodeMainPanel.this.jtb_NR_MD_7, 7); + } + }); + this.jcb_FZ_MD_7.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_7.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_7.setText("ֵRevision Master"); + this.jcb_FZ_MD_7.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_7ActionPerformed(evt); + } + }); + this.txt_FZ_MD_7.setEditable(false); + this.txt_FZ_MD_7.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_7.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_7.setText(""); + + this.jToggleButton_JXSZ_MD_7 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_7.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_7.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_7 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_7ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_7.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_7.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_7 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_7Layout = new GroupLayout( + this.jPanel_CS2_MD_7); + this.jPanel_CS2_MD_7.setLayout(jPanel_CS2_MD_7Layout); + jPanel_CS2_MD_7Layout + .setHorizontalGroup(jPanel_CS2_MD_7Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_7Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_7, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_7, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_7Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_7, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_7)) + .add( + jPanel_CS2_MD_7Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_7) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_7, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_7, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_7Layout + .setVerticalGroup(jPanel_CS2_MD_7Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_7Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_7Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_7) + .add( + this.jcb_TZM_MD_7, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_7, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_7Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_7) + .add( + this.jToggleButton_JXSZ_MD_7, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_7Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_7) + .add( + this.txt_FZ_MD_7, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_7.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_7.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_7.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_7.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_7.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_7.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_7.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_7MouseReleased(evt); + } + });this.jtb_NR_MD_7 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_7PropertyChange(evt); + } + }); + this.jsp_NR_MD_7.setViewportView(this.jtb_NR_MD_7); + + GroupLayout jPanel_NRCS_MD_7Layout = new GroupLayout( + this.jPanel_NRCS_MD_7); + this.jPanel_NRCS_MD_7.setLayout(jPanel_NRCS_MD_7Layout); + jPanel_NRCS_MD_7Layout.setHorizontalGroup(jPanel_NRCS_MD_7Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_7, -1, + 313, 32767)); + jPanel_NRCS_MD_7Layout.setVerticalGroup(jPanel_NRCS_MD_7Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_7, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_7Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_7); + this.jPanelMDM_Sub_MD_7.setLayout(jPanelMDM_Sub_MD_7Layout); + jPanelMDM_Sub_MD_7Layout.setHorizontalGroup(jPanelMDM_Sub_MD_7Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_7, + -1, + -1, + 32767).add(this.jPanel_Title_MD_7, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_7, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_7Layout + .setVerticalGroup(jPanelMDM_Sub_MD_7Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_7Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_7, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_7, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_7, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_7Layout = new GroupLayout( + this.jPanelMDContain_MD_7); + this.jPanelMDContain_MD_7.setLayout(jPanelMDContain_MD_7Layout); + jPanelMDContain_MD_7Layout + .setHorizontalGroup(jPanelMDContain_MD_7Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_7, + -1, + -1, + 32767)); + jPanelMDContain_MD_7Layout.setVerticalGroup(jPanelMDContain_MD_7Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_7, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("7", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_7, "7"); + + this.jPanelMDContain_MD_8.setToolTipText("8"); + + this.jPanelMDM_Sub_MD_8.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_8.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_8.setBorder( + BorderFactory.createTitledBorder(null, "8 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_8.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_8.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_8.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_8.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_8.setText("*⣺"); + + this.txt_Title_MD_8.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_8.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_8.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_8.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_8Layout = new GroupLayout( + this.jPanel_Title_MD_8); + this.jPanel_Title_MD_8.setLayout(jPanel_Title_MD_8Layout); + jPanel_Title_MD_8Layout.setHorizontalGroup(jPanel_Title_MD_8Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_8Layout.createSequentialGroup().add( + this.jLabel_Title_MD_8).addPreferredGap( + 0).add( + this.txt_Title_MD_8, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_8))); + jPanel_Title_MD_8Layout + .setVerticalGroup(jPanel_Title_MD_8Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_8Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_8Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_8) + .add(this.jcb_WGZMD_MD_8) + .add( + this.txt_Title_MD_8, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_8.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_8.setBorder(BorderFactory.createTitledBorder( + null, "8 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_8.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_8.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_8.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_8.setText("ͣ"); + + this.jcb_LX_MD_8.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_8.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_8.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_8, AutoCodeMainPanel.this.jsp_NR_MD_8, + AutoCodeMainPanel.this.jtb_NR_MD_8, 8); + } + }); + this.jcb_FZ_MD_8.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_8.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_8.setText("ֵRevision Master"); + this.jcb_FZ_MD_8.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_8ActionPerformed(evt); + } + }); + this.txt_FZ_MD_8.setEditable(false); + this.txt_FZ_MD_8.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_8.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_8.setText(""); + + this.jToggleButton_JXSZ_MD_8 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_8.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_8.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_8 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_8ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_8.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_8.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_8 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_8Layout = new GroupLayout( + this.jPanel_CS2_MD_8); + this.jPanel_CS2_MD_8.setLayout(jPanel_CS2_MD_8Layout); + jPanel_CS2_MD_8Layout + .setHorizontalGroup(jPanel_CS2_MD_8Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_8Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_8, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_8, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_8Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_8, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_8)) + .add( + jPanel_CS2_MD_8Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_8) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_8, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_8, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_8Layout + .setVerticalGroup(jPanel_CS2_MD_8Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_8Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_8Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_8) + .add( + this.jcb_TZM_MD_8, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_8, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_8Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_8) + .add( + this.jToggleButton_JXSZ_MD_8, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_8Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_8) + .add( + this.txt_FZ_MD_8, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_8.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_8.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_8.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_8.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_8.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_8.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_8.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_8MouseReleased(evt); + } + });this.jtb_NR_MD_8 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_8PropertyChange(evt); + } + }); + this.jsp_NR_MD_8.setViewportView(this.jtb_NR_MD_8); + + GroupLayout jPanel_NRCS_MD_8Layout = new GroupLayout( + this.jPanel_NRCS_MD_8); + this.jPanel_NRCS_MD_8.setLayout(jPanel_NRCS_MD_8Layout); + jPanel_NRCS_MD_8Layout.setHorizontalGroup(jPanel_NRCS_MD_8Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_8, -1, + 313, 32767)); + jPanel_NRCS_MD_8Layout.setVerticalGroup(jPanel_NRCS_MD_8Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_8, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_8Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_8); + this.jPanelMDM_Sub_MD_8.setLayout(jPanelMDM_Sub_MD_8Layout); + jPanelMDM_Sub_MD_8Layout.setHorizontalGroup(jPanelMDM_Sub_MD_8Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_8, + -1, + -1, + 32767).add(this.jPanel_Title_MD_8, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_8, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_8Layout + .setVerticalGroup(jPanelMDM_Sub_MD_8Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_8Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_8, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_8, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_8, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_8Layout = new GroupLayout( + this.jPanelMDContain_MD_8); + this.jPanelMDContain_MD_8.setLayout(jPanelMDContain_MD_8Layout); + jPanelMDContain_MD_8Layout + .setHorizontalGroup(jPanelMDContain_MD_8Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_8, + -1, + -1, + 32767)); + jPanelMDContain_MD_8Layout.setVerticalGroup(jPanelMDContain_MD_8Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_8, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("8", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_8, "8"); + + this.jPanelMDContain_MD_9.setToolTipText("9"); + + this.jPanelMDM_Sub_MD_9.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_9.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_9.setBorder( + BorderFactory.createTitledBorder(null, "9 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_9.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_9.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_9.setForeground(new Color(255, 0, 51)); + this.jLabel_Title_MD_9.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_9.setText("*⣺"); + + this.txt_Title_MD_9.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_9.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_9.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_9.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_9Layout = new GroupLayout( + this.jPanel_Title_MD_9); + this.jPanel_Title_MD_9.setLayout(jPanel_Title_MD_9Layout); + jPanel_Title_MD_9Layout.setHorizontalGroup(jPanel_Title_MD_9Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_9Layout.createSequentialGroup().add( + this.jLabel_Title_MD_9).addPreferredGap( + 0).add( + this.txt_Title_MD_9, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_9))); + jPanel_Title_MD_9Layout + .setVerticalGroup(jPanel_Title_MD_9Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_9Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_9Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_9) + .add(this.jcb_WGZMD_MD_9) + .add( + this.txt_Title_MD_9, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_9.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_9.setBorder(BorderFactory.createTitledBorder( + null, "9 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_9.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_9.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_9.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_9.setText("ͣ"); + + this.jcb_LX_MD_9.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_9.setModel(new DefaultComboBoxModel(new String[] { + "ͼע", "׼", "׼", "IMAN", "OriginTree", "ָ" })); + this.jcb_LX_MD_9.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_9, AutoCodeMainPanel.this.jsp_NR_MD_9, + AutoCodeMainPanel.this.jtb_NR_MD_9, 9); + } + }); + this.jcb_FZ_MD_9.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_9.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_9.setText("ֵRevision Master"); + this.jcb_FZ_MD_9.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_9ActionPerformed(evt); + } + }); + this.txt_FZ_MD_9.setEditable(false); + this.txt_FZ_MD_9.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_9.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_9.setText(""); + + this.jToggleButton_JXSZ_MD_9 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_9.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_9.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_9 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_9ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_9.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_9.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_9 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_9Layout = new GroupLayout( + this.jPanel_CS2_MD_9); + this.jPanel_CS2_MD_9.setLayout(jPanel_CS2_MD_9Layout); + jPanel_CS2_MD_9Layout + .setHorizontalGroup(jPanel_CS2_MD_9Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_9Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_9, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_9, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_9Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_9, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_9)) + .add( + jPanel_CS2_MD_9Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_9) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_9, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_9, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_9Layout + .setVerticalGroup(jPanel_CS2_MD_9Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_9Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_9Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_9) + .add( + this.jcb_TZM_MD_9, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_9, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_9Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_9) + .add( + this.jToggleButton_JXSZ_MD_9, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_9Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_9) + .add( + this.txt_FZ_MD_9, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_9.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_9.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_9.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_9.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_9.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_9.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_9.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_9MouseReleased(evt); + } + });this.jtb_NR_MD_9 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_9PropertyChange(evt); + } + }); + this.jsp_NR_MD_9.setViewportView(this.jtb_NR_MD_9); + + GroupLayout jPanel_NRCS_MD_9Layout = new GroupLayout( + this.jPanel_NRCS_MD_9); + this.jPanel_NRCS_MD_9.setLayout(jPanel_NRCS_MD_9Layout); + jPanel_NRCS_MD_9Layout.setHorizontalGroup(jPanel_NRCS_MD_9Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_9, -1, + 313, 32767)); + jPanel_NRCS_MD_9Layout.setVerticalGroup(jPanel_NRCS_MD_9Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_9, -1, + 83, 32767)); + + GroupLayout jPanelMDM_Sub_MD_9Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_9); + this.jPanelMDM_Sub_MD_9.setLayout(jPanelMDM_Sub_MD_9Layout); + jPanelMDM_Sub_MD_9Layout.setHorizontalGroup(jPanelMDM_Sub_MD_9Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_9, + -1, + -1, + 32767).add(this.jPanel_Title_MD_9, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_9, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_9Layout + .setVerticalGroup(jPanelMDM_Sub_MD_9Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_9Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_9, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_9, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_9, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_9Layout = new GroupLayout( + this.jPanelMDContain_MD_9); + this.jPanelMDContain_MD_9.setLayout(jPanelMDContain_MD_9Layout); + jPanelMDContain_MD_9Layout + .setHorizontalGroup(jPanelMDContain_MD_9Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_9, + -1, + -1, + 32767)); + jPanelMDContain_MD_9Layout.setVerticalGroup(jPanelMDContain_MD_9Layout + .createParallelGroup(1) + .add(this.jPanelMDM_Sub_MD_9, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("9", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_9, "9"); + + this.jPanelMDContain_MD_10.setToolTipText("10"); + + this.jPanelMDM_Sub_MD_10.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_10.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_10.setBorder( + BorderFactory.createTitledBorder(null, "10 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_10.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_10.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_10.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_10.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_10.setText("*⣺"); + + this.txt_Title_MD_10.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_10.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_10.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_10.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_10Layout = new GroupLayout( + this.jPanel_Title_MD_10); + this.jPanel_Title_MD_10.setLayout(jPanel_Title_MD_10Layout); + jPanel_Title_MD_10Layout.setHorizontalGroup(jPanel_Title_MD_10Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_10Layout.createSequentialGroup().add( + this.jLabel_Title_MD_10).addPreferredGap( + 0).add( + this.txt_Title_MD_10, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_10))); + jPanel_Title_MD_10Layout + .setVerticalGroup(jPanel_Title_MD_10Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_10Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_10Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_10) + .add(this.jcb_WGZMD_MD_10) + .add( + this.txt_Title_MD_10, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_10.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_10.setBorder( + BorderFactory.createTitledBorder(null, "10 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_10.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_10.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_10.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_10.setText("ͣ"); + + this.jcb_LX_MD_10.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_10.setModel(new DefaultComboBoxModel( + new String[] { "ͼע", "׼", "׼", "IMAN", + "OriginTree", "ָ" })); + this.jcb_LX_MD_10.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_10, AutoCodeMainPanel.this.jsp_NR_MD_10, + AutoCodeMainPanel.this.jtb_NR_MD_10, 10); + } + }); + this.jcb_FZ_MD_10.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_10.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_10.setText("ֵRevision Master"); + this.jcb_FZ_MD_10.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_10ActionPerformed(evt); + } + }); + this.txt_FZ_MD_10.setEditable(false); + this.txt_FZ_MD_10.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_10.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_10.setText(""); + + this.jToggleButton_JXSZ_MD_10 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_10.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_10.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_10 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_10ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_10.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_10.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_10 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_10Layout = new GroupLayout( + this.jPanel_CS2_MD_10); + this.jPanel_CS2_MD_10.setLayout(jPanel_CS2_MD_10Layout); + jPanel_CS2_MD_10Layout + .setHorizontalGroup(jPanel_CS2_MD_10Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_10Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_10, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_10, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_10Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_10, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_10)) + .add( + jPanel_CS2_MD_10Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_10) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_10, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_10, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_10Layout + .setVerticalGroup(jPanel_CS2_MD_10Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_10Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_10Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_10) + .add( + this.jcb_TZM_MD_10, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_10, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_10Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_10) + .add( + this.jToggleButton_JXSZ_MD_10, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_10Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_10) + .add( + this.txt_FZ_MD_10, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_10.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_10.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_10.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_10.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_10.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_10.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_10.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_10MouseReleased(evt); + } + });this.jtb_NR_MD_10 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_10PropertyChange(evt); + } + }); + this.jsp_NR_MD_10.setViewportView(this.jtb_NR_MD_10); + + GroupLayout jPanel_NRCS_MD_10Layout = new GroupLayout( + this.jPanel_NRCS_MD_10); + this.jPanel_NRCS_MD_10.setLayout(jPanel_NRCS_MD_10Layout); + jPanel_NRCS_MD_10Layout.setHorizontalGroup(jPanel_NRCS_MD_10Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_10, + -1, 313, + 32767)); + jPanel_NRCS_MD_10Layout.setVerticalGroup(jPanel_NRCS_MD_10Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_10, + -1, 83, + 32767)); + + GroupLayout jPanelMDM_Sub_MD_10Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_10); + this.jPanelMDM_Sub_MD_10.setLayout(jPanelMDM_Sub_MD_10Layout); + jPanelMDM_Sub_MD_10Layout.setHorizontalGroup(jPanelMDM_Sub_MD_10Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_10, + -1, + -1, + 32767).add(this.jPanel_Title_MD_10, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_10, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_10Layout + .setVerticalGroup(jPanelMDM_Sub_MD_10Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_10Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_10, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_10, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_10, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_10Layout = new GroupLayout( + this.jPanelMDContain_MD_10); + this.jPanelMDContain_MD_10.setLayout(jPanelMDContain_MD_10Layout); + jPanelMDContain_MD_10Layout + .setHorizontalGroup(jPanelMDContain_MD_10Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_10, + -1, + -1, + 32767)); + jPanelMDContain_MD_10Layout + .setVerticalGroup(jPanelMDContain_MD_10Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_10, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("10", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_10, "10"); + + this.jPanelMDContain_MD_11.setToolTipText("11"); + + this.jPanelMDM_Sub_MD_11.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_11.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_11.setBorder( + BorderFactory.createTitledBorder(null, "11 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_11.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_11.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_11.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_11.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_11.setText("*⣺"); + + this.txt_Title_MD_11.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_11.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_11.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_11.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_11Layout = new GroupLayout( + this.jPanel_Title_MD_11); + this.jPanel_Title_MD_11.setLayout(jPanel_Title_MD_11Layout); + jPanel_Title_MD_11Layout.setHorizontalGroup(jPanel_Title_MD_11Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_11Layout.createSequentialGroup().add( + this.jLabel_Title_MD_11).addPreferredGap( + 0).add( + this.txt_Title_MD_11, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_11))); + jPanel_Title_MD_11Layout + .setVerticalGroup(jPanel_Title_MD_11Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_11Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_11Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_11) + .add(this.jcb_WGZMD_MD_11) + .add( + this.txt_Title_MD_11, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_11.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_11.setBorder( + BorderFactory.createTitledBorder(null, "11 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_11.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_11.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_11.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_11.setText("ͣ"); + + this.jcb_LX_MD_11.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_11.setModel(new DefaultComboBoxModel( + new String[] { "ͼע", "׼", "׼", "IMAN", + "OriginTree", "ָ" })); + this.jcb_LX_MD_11.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_11, AutoCodeMainPanel.this.jsp_NR_MD_11, + AutoCodeMainPanel.this.jtb_NR_MD_11, 11); + } + }); + this.jcb_FZ_MD_11.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_11.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_11.setText("ֵRevision Master"); + this.jcb_FZ_MD_11.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_11ActionPerformed(evt); + } + }); + this.txt_FZ_MD_11.setEditable(false); + this.txt_FZ_MD_11.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_11.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_11.setText(""); + + this.jToggleButton_JXSZ_MD_11 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_11.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_11.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_11 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_11ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_11.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_11.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_11 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_11Layout = new GroupLayout( + this.jPanel_CS2_MD_11); + this.jPanel_CS2_MD_11.setLayout(jPanel_CS2_MD_11Layout); + jPanel_CS2_MD_11Layout + .setHorizontalGroup(jPanel_CS2_MD_11Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_11Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_11, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_11, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_11Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_11, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_11)) + .add( + jPanel_CS2_MD_11Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_11) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_11, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_11, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_11Layout + .setVerticalGroup(jPanel_CS2_MD_11Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_11Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_11Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_11) + .add( + this.jcb_TZM_MD_11, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_11, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_11Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_11) + .add( + this.jToggleButton_JXSZ_MD_11, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_11Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_11) + .add( + this.txt_FZ_MD_11, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_11.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_11.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_11.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_11.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_11.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_11.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_11.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_11MouseReleased(evt); + } + });this.jtb_NR_MD_11 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_11PropertyChange(evt); + } + }); + this.jsp_NR_MD_11.setViewportView(this.jtb_NR_MD_11); + + GroupLayout jPanel_NRCS_MD_11Layout = new GroupLayout( + this.jPanel_NRCS_MD_11); + this.jPanel_NRCS_MD_11.setLayout(jPanel_NRCS_MD_11Layout); + jPanel_NRCS_MD_11Layout.setHorizontalGroup(jPanel_NRCS_MD_11Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_11, + -1, 313, + 32767)); + jPanel_NRCS_MD_11Layout.setVerticalGroup(jPanel_NRCS_MD_11Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_11, + -1, 83, + 32767)); + + GroupLayout jPanelMDM_Sub_MD_11Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_11); + this.jPanelMDM_Sub_MD_11.setLayout(jPanelMDM_Sub_MD_11Layout); + jPanelMDM_Sub_MD_11Layout.setHorizontalGroup(jPanelMDM_Sub_MD_11Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_11, + -1, + -1, + 32767).add(this.jPanel_Title_MD_11, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_11, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_11Layout + .setVerticalGroup(jPanelMDM_Sub_MD_11Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_11Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_11, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_11, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_11, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_11Layout = new GroupLayout( + this.jPanelMDContain_MD_11); + this.jPanelMDContain_MD_11.setLayout(jPanelMDContain_MD_11Layout); + jPanelMDContain_MD_11Layout + .setHorizontalGroup(jPanelMDContain_MD_11Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_11, + -1, + -1, + 32767)); + jPanelMDContain_MD_11Layout + .setVerticalGroup(jPanelMDContain_MD_11Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_11, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("11", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_11, "11"); + + this.jPanelMDContain_MD_12.setToolTipText("12"); + + this.jPanelMDM_Sub_MD_12.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_12.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_12.setBorder( + BorderFactory.createTitledBorder(null, "12 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_12.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_12.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_12.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_12.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_12.setText("*⣺"); + + this.txt_Title_MD_12.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_12.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_12.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_12.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_12Layout = new GroupLayout( + this.jPanel_Title_MD_12); + this.jPanel_Title_MD_12.setLayout(jPanel_Title_MD_12Layout); + jPanel_Title_MD_12Layout.setHorizontalGroup(jPanel_Title_MD_12Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_12Layout.createSequentialGroup().add( + this.jLabel_Title_MD_12).addPreferredGap( + 0).add( + this.txt_Title_MD_12, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_12))); + jPanel_Title_MD_12Layout + .setVerticalGroup(jPanel_Title_MD_12Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_12Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_12Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_12) + .add(this.jcb_WGZMD_MD_12) + .add( + this.txt_Title_MD_12, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_12.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_12.setBorder( + BorderFactory.createTitledBorder(null, "12 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_12.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_12.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_12.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_12.setText("ͣ"); + + this.jcb_LX_MD_12.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_12.setModel(new DefaultComboBoxModel( + new String[] { "ͼע", "׼", "׼", "IMAN", + "OriginTree", "ָ" })); + this.jcb_LX_MD_12.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_12, AutoCodeMainPanel.this.jsp_NR_MD_12, + AutoCodeMainPanel.this.jtb_NR_MD_12, 12); + } + }); + this.jcb_FZ_MD_12.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_12.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_12.setText("ֵRevision Master"); + this.jcb_FZ_MD_12.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_12ActionPerformed(evt); + } + }); + this.txt_FZ_MD_12.setEditable(false); + this.txt_FZ_MD_12.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_12.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_12.setText(""); + + this.jToggleButton_JXSZ_MD_12 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_12.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_12.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_12 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_12ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_12.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_12.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_12 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_12Layout = new GroupLayout( + this.jPanel_CS2_MD_12); + this.jPanel_CS2_MD_12.setLayout(jPanel_CS2_MD_12Layout); + jPanel_CS2_MD_12Layout + .setHorizontalGroup(jPanel_CS2_MD_12Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_12Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_12, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_12, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_12Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_12, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_12)) + .add( + jPanel_CS2_MD_12Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_12) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_12, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_12, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_12Layout + .setVerticalGroup(jPanel_CS2_MD_12Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_12Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_12Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_12) + .add( + this.jcb_TZM_MD_12, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_12, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_12Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_12) + .add( + this.jToggleButton_JXSZ_MD_12, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_12Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_12) + .add( + this.txt_FZ_MD_12, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_12.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_12.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 51, 0))); + this.jPanel_NRCS_MD_12.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jPanel_NRCS_MD_12MouseReleased(evt); + } + }); + this.jsp_NR_MD_12.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_12.setFont(new Font("", 0, 12)); + this.jsp_NR_MD_12.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jsp_NR_MD_12MouseReleased(evt); + } + }); + this.jtb_NR_MD_12.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_12.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_12.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_12MouseReleased(evt); + } + });this.jtb_NR_MD_12 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_12PropertyChange(evt); + } + }); + this.jsp_NR_MD_12.setViewportView(this.jtb_NR_MD_12); + + GroupLayout jPanel_NRCS_MD_12Layout = new GroupLayout( + this.jPanel_NRCS_MD_12); + this.jPanel_NRCS_MD_12.setLayout(jPanel_NRCS_MD_12Layout); + jPanel_NRCS_MD_12Layout.setHorizontalGroup(jPanel_NRCS_MD_12Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_12, + -1, 313, + 32767)); + jPanel_NRCS_MD_12Layout.setVerticalGroup(jPanel_NRCS_MD_12Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_12, + -1, 83, + 32767)); + + GroupLayout jPanelMDM_Sub_MD_12Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_12); + this.jPanelMDM_Sub_MD_12.setLayout(jPanelMDM_Sub_MD_12Layout); + jPanelMDM_Sub_MD_12Layout.setHorizontalGroup(jPanelMDM_Sub_MD_12Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_12, + -1, + -1, + 32767).add(this.jPanel_Title_MD_12, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_12, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_12Layout + .setVerticalGroup(jPanelMDM_Sub_MD_12Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_12Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_12, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_12, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_12, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_12Layout = new GroupLayout( + this.jPanelMDContain_MD_12); + this.jPanelMDContain_MD_12.setLayout(jPanelMDContain_MD_12Layout); + jPanelMDContain_MD_12Layout + .setHorizontalGroup(jPanelMDContain_MD_12Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_12, + -1, + -1, + 32767)); + jPanelMDContain_MD_12Layout + .setVerticalGroup(jPanelMDContain_MD_12Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_12, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("12", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_12, "12"); + + + this.jPanelMDContain_MD_13.setToolTipText("13"); + + this.jPanelMDM_Sub_MD_13.setBackground(new Color(255, 255, 255)); + + this.jPanel_Title_MD_13.setBackground(new Color(255, 255, 255)); + this.jPanel_Title_MD_13.setBorder( + BorderFactory.createTitledBorder(null, "13 һ", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Title_MD_13.setBackground(new Color(255, 255, 255)); + this.jLabel_Title_MD_13.setFont(new Font("", 0, 12)); + this.jLabel_Title_MD_13.setForeground(new Color(255, 0, 0)); + this.jLabel_Title_MD_13.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/BiaoTi_16.png"))); + this.jLabel_Title_MD_13.setText("*⣺"); + + this.txt_Title_MD_13.setFont(new Font("", 0, 12)); + + this.jcb_WGZMD_MD_13.setBackground(new Color(255, 255, 255)); + this.jcb_WGZMD_MD_13.setFont(new Font("", 0, 12)); + this.jcb_WGZMD_MD_13.setText("Ϊ"); + + GroupLayout jPanel_Title_MD_13Layout = new GroupLayout( + this.jPanel_Title_MD_13); + this.jPanel_Title_MD_13.setLayout(jPanel_Title_MD_13Layout); + jPanel_Title_MD_13Layout.setHorizontalGroup(jPanel_Title_MD_13Layout + .createParallelGroup(1) + .add( + jPanel_Title_MD_13Layout.createSequentialGroup().add( + this.jLabel_Title_MD_13).addPreferredGap( + 0).add( + this.txt_Title_MD_13, + -1, + 160, 32767).addPreferredGap( + 0).add( + this.jcb_WGZMD_MD_13))); + jPanel_Title_MD_13Layout + .setVerticalGroup(jPanel_Title_MD_13Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_Title_MD_13Layout + .createSequentialGroup() + .add( + jPanel_Title_MD_13Layout + .createParallelGroup( + 3) + .add(this.jLabel_Title_MD_13) + .add(this.jcb_WGZMD_MD_13) + .add( + this.txt_Title_MD_13, + -2, + -1, + -2)) + .addContainerGap( + -1, + 32767))); + + this.jPanel_CS2_MD_13.setBackground(new Color(255, 255, 255)); + this.jPanel_CS2_MD_13.setBorder( + BorderFactory.createTitledBorder(null, "13 ö", + 0, + 0, + new Font("", 0, 12))); + + this.jLabel_Style_MD_13.setBackground(new Color(255, 255, 255)); + this.jLabel_Style_MD_13.setFont(new Font("", 0, 12)); + this.jLabel_Style_MD_13.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/LeiXing_16.png"))); + this.jLabel_Style_MD_13.setText("ͣ"); + + this.jcb_LX_MD_13.setFont(new Font("", 0, 12)); + this.jcb_LX_MD_13.setModel(new DefaultComboBoxModel( + new String[] { "ͼע", "׼", "׼", "IMAN", + "OriginTree", "ָ" })); + this.jcb_LX_MD_13.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_LX_MD_1ActionPerformed(evt, AutoCodeMainPanel.this.jcb_LX_MD_13, AutoCodeMainPanel.this.jsp_NR_MD_13, + AutoCodeMainPanel.this.jtb_NR_MD_13, 13); + } + }); + this.jcb_FZ_MD_13.setBackground(new Color(255, 255, 255)); + this.jcb_FZ_MD_13.setFont(new Font("", 0, 12)); + this.jcb_FZ_MD_13.setText("ֵRevision Master"); + this.jcb_FZ_MD_13.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jcb_FZ_MD_13ActionPerformed(evt); + } + }); + this.txt_FZ_MD_13.setEditable(false); + this.txt_FZ_MD_13.setFont(new Font("", 0, 12)); + + this.jLabel_SXS_MD_13.setFont(new Font("", 0, 12)); + this.jLabel_SXS_MD_13.setText(""); + + this.jToggleButton_JXSZ_MD_13 + .setBackground(new Color(255, 255, 255)); + this.jToggleButton_JXSZ_MD_13.setFont(new Font("", 0, 12)); + this.jToggleButton_JXSZ_MD_13.setText("ʾֵ"); + this.jToggleButton_JXSZ_MD_13 + .addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + AutoCodeMainPanel.this.jToggleButton_JXSZ_MD_13ActionPerformed(evt); + } + }); + this.jcb_TZM_MD_13.setFont(new Font("", 0, 12)); + this.jcb_TZM_MD_13.setModel(new DefaultComboBoxModel( + new String[] { "&ʾ", "&ʾ", "&ʾ" })); + this.jcb_TZM_MD_13 + .setToolTipText("Ƿ=yes \n(һ:yesΪijЩγΪ.޴˱ǩĬβ;\nڶ:noɵIDʾ;\n:no and do not displayҲIDʾ)"); + + GroupLayout jPanel_CS2_MD_13Layout = new GroupLayout( + this.jPanel_CS2_MD_13); + this.jPanel_CS2_MD_13.setLayout(jPanel_CS2_MD_13Layout); + jPanel_CS2_MD_13Layout + .setHorizontalGroup(jPanel_CS2_MD_13Layout + .createParallelGroup( + 1) + .add( + 2, + jPanel_CS2_MD_13Layout + .createSequentialGroup() + .add( + this.txt_FZ_MD_13, + -1, + 263, 32767) + .addPreferredGap( + 0) + .add( + this.jLabel_SXS_MD_13, + -2, + 46, + -2)) + .add( + 2, + jPanel_CS2_MD_13Layout + .createSequentialGroup() + .add( + this.jToggleButton_JXSZ_MD_13, + -1, + 124, 32767) + .addPreferredGap( + 0) + .add(this.jcb_FZ_MD_13)) + .add( + jPanel_CS2_MD_13Layout + .createSequentialGroup() + .add(this.jLabel_Style_MD_13) + .addPreferredGap( + 0) + .add( + this.jcb_LX_MD_13, + -2, + 119, + -2) + .addPreferredGap( + 1) + .add(this.jcb_TZM_MD_13, 0, 114, + 32767) + .addContainerGap())); + jPanel_CS2_MD_13Layout + .setVerticalGroup(jPanel_CS2_MD_13Layout + .createParallelGroup( + 1) + .add( + jPanel_CS2_MD_13Layout + .createSequentialGroup() + .add( + jPanel_CS2_MD_13Layout + .createParallelGroup( + 3) + .add(this.jLabel_Style_MD_13) + .add( + this.jcb_TZM_MD_13, + -2, + -1, + -2) + .add( + this.jcb_LX_MD_13, + -2, + -1, + -2)) + .add(3, 3, 3) + .add( + jPanel_CS2_MD_13Layout + .createParallelGroup( + 3) + .add(this.jcb_FZ_MD_13) + .add( + this.jToggleButton_JXSZ_MD_13, + -2, + 19, + -2)) + .addPreferredGap( + 0) + .add( + jPanel_CS2_MD_13Layout + .createParallelGroup( + 3) + .add(this.jLabel_SXS_MD_13) + .add( + this.txt_FZ_MD_13, + -2, + -1, + -2)))); + + this.jPanel_NRCS_MD_13.setBackground(new Color(255, 255, 255)); + this.jPanel_NRCS_MD_13.setBorder( + BorderFactory.createTitledBorder(null, "*ݲ", + 0, + 0, + new Font("", 0, 12), new Color( + 255, 0, 0))); + + this.jsp_NR_MD_13.setBackground(new Color(255, 255, 255)); + this.jsp_NR_MD_13.setFont(new Font("", 0, 12)); + + this.jtb_NR_MD_13.setFont(new Font("", 0, 12)); + this.jtb_NR_MD_13.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jtb_NR_MD_13.addMouseListener(new MouseAdapter() + { + public void mouseReleased(MouseEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_13MouseReleased(evt); + } + });this.jtb_NR_MD_13 + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + AutoCodeMainPanel.this.jtb_NR_MD_13PropertyChange(evt); + } + }); + this.jsp_NR_MD_13.setViewportView(this.jtb_NR_MD_13); + + GroupLayout jPanel_NRCS_MD_13Layout = new GroupLayout( + this.jPanel_NRCS_MD_13); + this.jPanel_NRCS_MD_13.setLayout(jPanel_NRCS_MD_13Layout); + jPanel_NRCS_MD_13Layout.setHorizontalGroup(jPanel_NRCS_MD_13Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_13, + -1, 313, + 32767)); + jPanel_NRCS_MD_13Layout.setVerticalGroup(jPanel_NRCS_MD_13Layout + .createParallelGroup(1) + .add(this.jsp_NR_MD_13, + -1, 83, + 32767)); + + GroupLayout jPanelMDM_Sub_MD_13Layout = new GroupLayout( + this.jPanelMDM_Sub_MD_13); + this.jPanelMDM_Sub_MD_13.setLayout(jPanelMDM_Sub_MD_13Layout); + jPanelMDM_Sub_MD_13Layout.setHorizontalGroup(jPanelMDM_Sub_MD_13Layout + .createParallelGroup(1) + .add(this.jPanel_CS2_MD_13, + -1, + -1, + 32767).add(this.jPanel_Title_MD_13, + -1, + -1, + 32767).add(this.jPanel_NRCS_MD_13, + -1, + -1, + 32767)); + jPanelMDM_Sub_MD_13Layout + .setVerticalGroup(jPanelMDM_Sub_MD_13Layout + .createParallelGroup( + 1) + .add( + jPanelMDM_Sub_MD_13Layout + .createSequentialGroup() + .add( + this.jPanel_Title_MD_13, + -2, + 53, + -2) + .add(1, 1, 1) + .add( + this.jPanel_CS2_MD_13, + -2, + 100, + -2) + .addPreferredGap( + 0) + .add( + this.jPanel_NRCS_MD_13, + -1, + -1, + 32767) + .addContainerGap())); + + GroupLayout jPanelMDContain_MD_13Layout = new GroupLayout( + this.jPanelMDContain_MD_13); + this.jPanelMDContain_MD_13.setLayout(jPanelMDContain_MD_13Layout); + jPanelMDContain_MD_13Layout + .setHorizontalGroup(jPanelMDContain_MD_13Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_13, + -1, + -1, + 32767)); + jPanelMDContain_MD_13Layout + .setVerticalGroup(jPanelMDContain_MD_13Layout + .createParallelGroup( + 1).add( + this.jPanelMDM_Sub_MD_13, + -1, + -1, + 32767)); + + this.jTabbedPaneMainOption_sub2.addTab("13", + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jPanelMDContain_MD_13, "13"); + + + + GroupLayout jPanelMainOptions_sub2Layout = new GroupLayout( + this.jPanelMainOptions_sub2); + this.jPanelMainOptions_sub2.setLayout(jPanelMainOptions_sub2Layout); + jPanelMainOptions_sub2Layout + .setHorizontalGroup(jPanelMainOptions_sub2Layout + .createParallelGroup( + 1).add( + this.jTabbedPaneMainOption_sub2, + -2, + 410, 32767)); + jPanelMainOptions_sub2Layout + .setVerticalGroup(jPanelMainOptions_sub2Layout + .createParallelGroup( + 1) + .add( + jPanelMainOptions_sub2Layout + .createSequentialGroup() + .add( + this.jTabbedPaneMainOption_sub2, + -1, + 296, 32767) + .addContainerGap())); + + this.jLabelMainInfo.setBackground(new Color(255, 255, 255)); + this.jLabelMainInfo.setFont(new Font("", 0, 12)); + this.jLabelMainInfo.setIcon( + new ImageIcon(getClass().getResource("/com/origin/images/info_24.png"))); + this.jLabelMainInfo.setText("бѡ봴. "); + + GroupLayout jPanelMainOptionsLayout = new GroupLayout( + this.jPanelMainOptions); + this.jPanelMainOptions.setLayout(jPanelMainOptionsLayout); + jPanelMainOptionsLayout + .setHorizontalGroup(jPanelMainOptionsLayout + .createParallelGroup( + 1) + .add( + jPanelMainOptionsLayout + .createSequentialGroup() + .add(20, 20, 20) + .add( + this.jLabelMainInfo, + -2, + 352, + -2) + .addContainerGap(50, 32767)) + .add(this.jPanelMainOptions_sub2, + -1, + -1, + 32767) + .add( + jPanelMainOptionsLayout + .createSequentialGroup() + .addContainerGap() + .add( + this.jPanelMainOptions_sub3, + -1, + -1, + 32767) + .addContainerGap())); + jPanelMainOptionsLayout + .setVerticalGroup(jPanelMainOptionsLayout + .createParallelGroup( + 1) + .add( + jPanelMainOptionsLayout + .createSequentialGroup() + .add(11, 11, 11) + .add( + this.jLabelMainInfo, + -2, + 34, + -2) + .addPreferredGap( + 0) + .add( + this.jPanelMainOptions_sub2, + -1, + 321, 32767) + .addPreferredGap( + 1) + .add( + this.jPanelMainOptions_sub3, + -2, + -1, + -2) + .add(11, 11, 11))); + + this.jSplitPaneMainContain_1.setRightComponent(this.jPanelMainOptions); + + GroupLayout jPanelMainContain_1Layout = new GroupLayout( + this.jPanelMainContain_1); + this.jPanelMainContain_1.setLayout(jPanelMainContain_1Layout); + jPanelMainContain_1Layout.setHorizontalGroup(jPanelMainContain_1Layout + .createParallelGroup(1) + .add(this.jSplitPaneMainContain_1, + -1, 596, + 32767)); + jPanelMainContain_1Layout.setVerticalGroup(jPanelMainContain_1Layout + .createParallelGroup(1) + .add(this.jSplitPaneMainContain_1)); + + + this.jTabbedPaneMain + .addTab("Զ򴴽", new ImageIcon( + getClass().getResource( + "/com/origin/images/main_16.png")), + this.jPanelMainContain_1); + + this.jPanelMainContain_2.setBackground(new Color(255, 255, 255)); + this.jPanelMainContain_2.setBorder( + BorderFactory.createTitledBorder("Ҫʹ˵(ʾ)")); + + GroupLayout jPanelMainContain_2Layout = new GroupLayout( + this.jPanelMainContain_2); + this.jPanelMainContain_2.setLayout(jPanelMainContain_2Layout); + jPanelMainContain_2Layout.setHorizontalGroup(jPanelMainContain_2Layout + .createParallelGroup(1) + .add(0, 596, 32767)); + jPanelMainContain_2Layout.setVerticalGroup(jPanelMainContain_2Layout + .createParallelGroup(1) + .add(0, 458, 32767)); + + this.jTabbedPaneMain.addTab("ʹ˵", + new ImageIcon(getClass().getResource("/com/origin/images/help_16.png")), + this.jPanelMainContain_2); + + GroupLayout layout = new GroupLayout( + this); + setLayout(layout); + layout.setHorizontalGroup(layout.createParallelGroup( + 1).add(this.jTabbedPaneMain)); + layout.setVerticalGroup(layout.createParallelGroup( + 1).add(this.jTabbedPaneMain)); + } + + private void setRevForTextField(ItemEvent evt) + { + if (this.jCheckBoxItemName.isSelected()) + { + this.jTextFieldRevFormPro.setEnabled(true); + } + else + { + this.jTextFieldRevFormPro.setText(""); + this.jTextFieldRevFormPro.setEnabled(false); + } + } + + private void formAncestorAdded(AncestorEvent evt) {} + + private void jLabelFinishMouseEntered(MouseEvent evt) + { + this.bFinish = checkEnterInfo(this.jTabbedPaneMainOption_sub2); + if (this.bFinish) { + this.jLabelFinish.setIcon(this.iconFinish); + } else { + this.jLabelFinish.setIcon(new ImageIcon(getClass() + .getResource("/com/origin/images/n_Finish1.gif"))); + } + } + + private void jLabelFinishMouseExited(MouseEvent evt) + { + if (this.bFinish) { + this.jLabelFinish.setIcon(new ImageIcon(getClass() + .getResource("/com/origin/images/p_Finish1.gif"))); + } else { + this.jLabelFinish.setIcon(new ImageIcon(getClass() + .getResource("/com/origin/images/n_Finish1.gif"))); + } + } + + private void jCheckBoxSDBMItemStateChanged(ItemEvent evt) + { + if (!this.jCheckBoxSDBM.isSelected()) { + this.jLabelFinish.setIcon(new ImageIcon(getClass() + .getResource("/com/origin/images/n_Finish1.gif"))); + } + } + + private void jButtonBackActionPerformed(ActionEvent evt) + { + int intCurr = this.jTabbedPaneMainOption_sub2.getSelectedIndex(); + if (intCurr >= 1) { + this.jTabbedPaneMainOption_sub2.setSelectedIndex(intCurr - 1); + } + } + + private void jButtonBack1ActionPerformed(ActionEvent evt) + { + int intCount = this.jTabbedPaneMainOption_sub2.getTabCount(); + int intCurr = this.jTabbedPaneMainOption_sub2.getSelectedIndex(); + if (intCurr < intCount - 1) { + this.jTabbedPaneMainOption_sub2.setSelectedIndex(intCurr + 1); + } + } + + private void jcb_FZ_MD_1ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_1.isSelected()) { + this.txt_FZ_MD_1.setEditable(true); + } else { + this.txt_FZ_MD_1.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_1ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_1.isSelected()) { + this.jToggleButton_JXSZ_MD_1.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_1.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_2ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_2.isSelected()) { + this.txt_FZ_MD_2.setEditable(true); + } else { + this.txt_FZ_MD_2.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_2ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_2.isSelected()) { + this.jToggleButton_JXSZ_MD_2.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_2.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_3ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_3.isSelected()) { + this.txt_FZ_MD_3.setEditable(true); + } else { + this.txt_FZ_MD_3.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_3ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_3.isSelected()) { + this.jToggleButton_JXSZ_MD_3.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_3.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_4ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_4.isSelected()) { + this.txt_FZ_MD_4.setEditable(true); + } else { + this.txt_FZ_MD_4.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_4ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_4.isSelected()) { + this.jToggleButton_JXSZ_MD_4.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_4.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_5ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_5.isSelected()) { + this.txt_FZ_MD_5.setEditable(true); + } else { + this.txt_FZ_MD_5.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_5ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_5.isSelected()) { + this.jToggleButton_JXSZ_MD_5.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_5.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_6ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_6.isSelected()) { + this.txt_FZ_MD_6.setEditable(true); + } else { + this.txt_FZ_MD_6.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_6ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_6.isSelected()) { + this.jToggleButton_JXSZ_MD_6.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_6.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_7ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_7.isSelected()) { + this.txt_FZ_MD_7.setEditable(true); + } else { + this.txt_FZ_MD_7.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_7ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_7.isSelected()) { + this.jToggleButton_JXSZ_MD_7.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_7.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_8ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_8.isSelected()) { + this.txt_FZ_MD_8.setEditable(true); + } else { + this.txt_FZ_MD_8.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_8ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_8.isSelected()) { + this.jToggleButton_JXSZ_MD_8.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_8.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_9ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_9.isSelected()) { + this.txt_FZ_MD_9.setEditable(true); + } else { + this.txt_FZ_MD_9.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_9ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_9.isSelected()) { + this.jToggleButton_JXSZ_MD_9.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_9.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_10ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_10.isSelected()) { + this.txt_FZ_MD_10.setEditable(true); + } else { + this.txt_FZ_MD_10.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_10ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_10.isSelected()) { + this.jToggleButton_JXSZ_MD_10.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_10.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_11ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_11.isSelected()) { + this.txt_FZ_MD_11.setEditable(true); + } else { + this.txt_FZ_MD_11.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_11ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_11.isSelected()) { + this.jToggleButton_JXSZ_MD_11.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_11.setText("ʾֵ"); + } + } + + private void jcb_FZ_MD_12ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_12.isSelected()) { + this.txt_FZ_MD_12.setEditable(true); + } else { + this.txt_FZ_MD_12.setEditable(false); + } + } + + private void jcb_FZ_MD_13ActionPerformed(ActionEvent evt) + { + if (this.jcb_FZ_MD_13.isSelected()) { + this.txt_FZ_MD_13.setEditable(true); + } else { + this.txt_FZ_MD_13.setEditable(false); + } + } + + private void jToggleButton_JXSZ_MD_12ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_12.isSelected()) { + this.jToggleButton_JXSZ_MD_12.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_12.setText("ʾֵ"); + } + } + + private void jToggleButton_JXSZ_MD_13ActionPerformed(ActionEvent evt) + { + if (this.jToggleButton_JXSZ_MD_13.isSelected()) { + this.jToggleButton_JXSZ_MD_13.setText("ڲֵ"); + } else { + this.jToggleButton_JXSZ_MD_13.setText("ʾֵ"); + } + } + + private void jComboBoxLSHBFWZActionPerformed(ActionEvent evt) {} + + private void jLabelFinishMousePressed(MouseEvent evt) + { + if (this.jLabelFinish.getIcon() == this.iconFinish) + { + Object[] selectedValue = (Object[])this.jListItemTypeNames + .getSelectedValue(); + String str_SelectItemType = (String)selectedValue[1]; + boolean b_Flag = checkAndRegistOption(str_SelectItemType); + if (b_Flag) + { + Vector v = getManageAllDatas(); + makeOptions(v); + selectedValue[2] = + ("Ϊ" + (String)selectedValue[1] + "Ѱ󶨱"); + this.jListItemTypeNames.repaint(); + } + else if (JOptionPane.showConfirmDialog(this.dialog, "ѴǷ£", "", + 2, 2) == 0) + { + Vector v = getManageAllDatas(); + makeOptions(v); + selectedValue[2] = + ("Ϊ" + (String)selectedValue[1] + "Ѱ󶨱"); + this.jListItemTypeNames.repaint(); + } + TreeInputOptionsStart(); + } + } + + private void jComboBoxMDSAncestorAdded(AncestorEvent evt) + { + int intT = this.jTabbedPaneMainOption_sub2.getComponentCount(); + int intSubTabCount = 0; + intSubTabCount = Integer.parseInt((String)this.jComboBoxMDS + .getSelectedItem()); + if (intT > 1) + { + for (int i = 0; i < intT - 1; i++) { + this.jTabbedPaneMainOption_sub2.remove(this.jTabbedPaneMainOption_sub2 + .getComponentCount() - 1); + } + for (int i = 1; i <= intSubTabCount; i++) { + this.jTabbedPaneMainOption_sub2.addTab( + this.jpane_aAllJTabbedPaneSub[i].getToolTipText(), + + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jpane_aAllJTabbedPaneSub[i], + this.jpane_aAllJTabbedPaneSub[i].getToolTipText()); + } + } + } + + private void jComboBoxMDSActionPerformed(ActionEvent evt) + { + this.jTabbedPaneMainOption_sub2.getComponentCount(); + int intSubTabCount = 0; + intSubTabCount = Integer.parseInt((String)this.jComboBoxMDS + .getSelectedItem()); + this.jTabbedPaneMainOption_sub2.removeAll(); + if ((this.jpane_aAllJTabbedPaneSub != null) && + (this.jpane_aAllJTabbedPaneSub.length > 1)) + { + this.jTabbedPaneMainOption_sub2.addTab( + "", + + new ImageIcon(getClass().getResource("/com/origin/images/ZhuCanShu_16.png")), + this.jpane_aAllJTabbedPaneSub[0], ""); + for (int i = 1; i <= intSubTabCount; i++) { + this.jTabbedPaneMainOption_sub2.addTab( + this.jpane_aAllJTabbedPaneSub[i].getToolTipText(), + + new ImageIcon(getClass().getResource("/com/origin/images/MaDuan_16.png")), + this.jpane_aAllJTabbedPaneSub[i], + this.jpane_aAllJTabbedPaneSub[i].getToolTipText()); + } + } + } + + private void jtb_NR_MD_1PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_1); + removeNotFinalDatas(this.jtb_NR_MD_1); + } + + private void jtb_NR_MD_2PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_2); + removeNotFinalDatas(this.jtb_NR_MD_2); + } + + private void jtb_NR_MD_3PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_3); + removeNotFinalDatas(this.jtb_NR_MD_3); + } + + private void jtb_NR_MD_4PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_4); + removeNotFinalDatas(this.jtb_NR_MD_4); + } + + private void jtb_NR_MD_5PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_5); + removeNotFinalDatas(this.jtb_NR_MD_5); + } + + private void jtb_NR_MD_6PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_6); + removeNotFinalDatas(this.jtb_NR_MD_6); + } + + private void jtb_NR_MD_7PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_7); + removeNotFinalDatas(this.jtb_NR_MD_7); + } + + private void jtb_NR_MD_8PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_8); + removeNotFinalDatas(this.jtb_NR_MD_8); + } + + private void jtb_NR_MD_9PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_9); + removeNotFinalDatas(this.jtb_NR_MD_9); + } + + private void jtb_NR_MD_10PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_10); + removeNotFinalDatas(this.jtb_NR_MD_10); + } + + private void jtb_NR_MD_11PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_11); + removeNotFinalDatas(this.jtb_NR_MD_11); + } + + private void jtb_NR_MD_12PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_12); + removeNotFinalDatas(this.jtb_NR_MD_12); + } + + private void jtb_NR_MD_13PropertyChange(PropertyChangeEvent evt) + { + controlTheTable(this.jtb_NR_MD_13); + removeNotFinalDatas(this.jtb_NR_MD_13); + } + + private void jtb_NR_MD_1MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_2MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_3MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_4MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_5MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_6MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_7MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_8MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_9MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_10MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_11MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_13MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jtb_NR_MD_12MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jsp_NR_MD_12MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jPanel_NRCS_MD_12MouseReleased(MouseEvent evt) + { + kShowPopupMenu(evt, this.jPopupMenuForJTable); + } + + private void jMenuItemClearAllActionPerformed(ActionEvent evt) + { + clearAllData(this.jtable_aAllMustInsertContain[ + (this.jTabbedPaneMainOption_sub2.getSelectedIndex() - 1)]); + } + + private void jMenuItemSingleActionPerformed(ActionEvent evt) + { + showSingleTable(this.jtable_aAllMustInsertContain[ + (this.jTabbedPaneMainOption_sub2.getSelectedIndex() - 1)]); + } + + private void jButtonBackCloseActionPerformed(ActionEvent evt) + { + this.dialog.dispose(); + } + + private void jTextFieldRevFormProAncestorAdded(AncestorEvent evt) + { + try + { + if (this.i_MySearchDialog == 0) + { + Object[] obja = (Object[])this.jListItemTypeNames + .getSelectedValue(); + String str_TypeRevisionMaster; + //String str_TypeRevisionMaster; + if (((String)obja[1]).equals("Item")) { + str_TypeRevisionMaster = + (String)obja[1] + "RevisionMaster"; + } else { + str_TypeRevisionMaster = + (String)obja[1] + "RevisionMaster"; + } + String[] stra_AllProperties = this.acb + .getStraREVMasterPro(str_TypeRevisionMaster); + if (stra_AllProperties != null) + { + startKSearch(this.dialog, this.jTextFieldRevFormPro, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_1, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_2, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_3, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_4, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_5, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_6, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_7, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_8, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_9, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_10, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_11, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_12, stra_AllProperties, this.reg, false); + startKSearch(this.dialog, this.txt_FZ_MD_13, stra_AllProperties, this.reg, false); + this.i_MySearchDialog += 1; + } + else + { + System.out.println("ȡ" + str_TypeRevisionMaster + + "͵ʱ ַ鷵ؿգ"); + } + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public void startKSearch(JDialog d, JTextField txtK, String[] stra_Main, Registry fappReg, boolean bFlag) + { + new KSearchDialog(d, txtK, stra_Main, fappReg, bFlag); + } + + public void kShowPopupMenu(MouseEvent evt, JPopupMenu jpm) + { + if (evt.isPopupTrigger()) { + jpm.show(evt.getComponent(), evt.getX(), evt.getY()); + } + } + + public void showSingleTable(JTable table) + { + OriginSingleTableDialog qstd = new OriginSingleTableDialog(this.dialog, + true, table, this); + qstd.setVisible(true); + } + + public void controlTheTable(JTable table) + { + try + { + DefaultTableModel tm = (DefaultTableModel)table.getModel(); + int int_Count = tm.getRowCount(); + String str_Value_1 = ""; + str_Value_1 = (String)tm.getValueAt(int_Count - 1, 0); + if (str_Value_1 != null) { + if (!str_Value_1.equals("")) { + if (str_Value_1 != null) { + if (!str_Value_1.equals("null")) { + tm.insertRow(int_Count, new String[] { "", "" }); + } + } + } + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public void clearAllData(JTable table) + { + DefaultTableModel tmd = (DefaultTableModel)table.getModel(); + int int_RowCount = tmd.getRowCount(); + for (int i = 0; i < int_RowCount - 1; i++) { + tmd.removeRow(0); + } + } + + public void removeNotFinalDatas(JTable table) + { + boolean b_all_null = false; + DefaultTableModel dtm = (DefaultTableModel)table.getModel(); + Vector v_AllDatas = dtm.getDataVector(); + for (int i = 0; i < v_AllDatas.size() - 1; i++) + { + Vector v_sub = (Vector)v_AllDatas.get(i); + if ((v_sub.get(0).equals("")) && (v_sub.get(1).equals(""))) { + b_all_null = true; + } + if (b_all_null) + { + dtm.removeRow(i); + b_all_null = false; + } + } + } + + public JPanel[] getAllJTabbedPaneSub() + { + this.jpane_aAllJTabbedPaneSub = new JPanel[14]; + this.jpane_aAllJTabbedPaneSub[0] = this.jPanelMainOptionContain; + this.jpane_aAllJTabbedPaneSub[1] = this.jPanelMDContain_MD_1; + this.jpane_aAllJTabbedPaneSub[2] = this.jPanelMDContain_MD_2; + this.jpane_aAllJTabbedPaneSub[3] = this.jPanelMDContain_MD_3; + this.jpane_aAllJTabbedPaneSub[4] = this.jPanelMDContain_MD_4; + this.jpane_aAllJTabbedPaneSub[5] = this.jPanelMDContain_MD_5; + this.jpane_aAllJTabbedPaneSub[6] = this.jPanelMDContain_MD_6; + this.jpane_aAllJTabbedPaneSub[7] = this.jPanelMDContain_MD_7; + this.jpane_aAllJTabbedPaneSub[8] = this.jPanelMDContain_MD_8; + this.jpane_aAllJTabbedPaneSub[9] = this.jPanelMDContain_MD_9; + this.jpane_aAllJTabbedPaneSub[10] = this.jPanelMDContain_MD_10; + this.jpane_aAllJTabbedPaneSub[11] = this.jPanelMDContain_MD_11; + this.jpane_aAllJTabbedPaneSub[12] = this.jPanelMDContain_MD_12; + this.jpane_aAllJTabbedPaneSub[13] = this.jPanelMDContain_MD_13; + return this.jpane_aAllJTabbedPaneSub; + } + + public JTextField[] getAllJTextMustInsertTitle() + { + this.jtext_aAllMustInsertTitle = new JTextField[13]; + this.jtext_aAllMustInsertTitle[0] = this.txt_Title_MD_1; + this.jtext_aAllMustInsertTitle[1] = this.txt_Title_MD_2; + this.jtext_aAllMustInsertTitle[2] = this.txt_Title_MD_3; + this.jtext_aAllMustInsertTitle[3] = this.txt_Title_MD_4; + this.jtext_aAllMustInsertTitle[4] = this.txt_Title_MD_5; + this.jtext_aAllMustInsertTitle[5] = this.txt_Title_MD_6; + this.jtext_aAllMustInsertTitle[6] = this.txt_Title_MD_7; + this.jtext_aAllMustInsertTitle[7] = this.txt_Title_MD_8; + this.jtext_aAllMustInsertTitle[8] = this.txt_Title_MD_9; + this.jtext_aAllMustInsertTitle[9] = this.txt_Title_MD_10; + this.jtext_aAllMustInsertTitle[10] = this.txt_Title_MD_11; + this.jtext_aAllMustInsertTitle[11] = this.txt_Title_MD_12; + this.jtext_aAllMustInsertTitle[12] = this.txt_Title_MD_13; + return this.jtext_aAllMustInsertTitle; + } + + public JTable[] getAllJTableMustInsertContain() + { + this.jtable_aAllMustInsertContain = new JTable[13]; + this.jtable_aAllMustInsertContain[0] = this.jtb_NR_MD_1; + this.jtable_aAllMustInsertContain[1] = this.jtb_NR_MD_2; + this.jtable_aAllMustInsertContain[2] = this.jtb_NR_MD_3; + this.jtable_aAllMustInsertContain[3] = this.jtb_NR_MD_4; + this.jtable_aAllMustInsertContain[4] = this.jtb_NR_MD_5; + this.jtable_aAllMustInsertContain[5] = this.jtb_NR_MD_6; + this.jtable_aAllMustInsertContain[6] = this.jtb_NR_MD_7; + this.jtable_aAllMustInsertContain[7] = this.jtb_NR_MD_8; + this.jtable_aAllMustInsertContain[8] = this.jtb_NR_MD_9; + this.jtable_aAllMustInsertContain[9] = this.jtb_NR_MD_10; + this.jtable_aAllMustInsertContain[10] = this.jtb_NR_MD_11; + this.jtable_aAllMustInsertContain[11] = this.jtb_NR_MD_12; + this.jtable_aAllMustInsertContain[12] = this.jtb_NR_MD_13; + return this.jtable_aAllMustInsertContain; + } + + public JScrollPane[] getAllJScrollPaneTableOrTree() + { + this.getAllJScrollPaneTableOrTree = new JScrollPane[13]; + this.getAllJScrollPaneTableOrTree[0] = this.jsp_NR_MD_1; + this.getAllJScrollPaneTableOrTree[1] = this.jsp_NR_MD_2; + this.getAllJScrollPaneTableOrTree[2] = this.jsp_NR_MD_3; + this.getAllJScrollPaneTableOrTree[3] = this.jsp_NR_MD_4; + this.getAllJScrollPaneTableOrTree[4] = this.jsp_NR_MD_5; + this.getAllJScrollPaneTableOrTree[5] = this.jsp_NR_MD_6; + this.getAllJScrollPaneTableOrTree[6] = this.jsp_NR_MD_7; + this.getAllJScrollPaneTableOrTree[7] = this.jsp_NR_MD_8; + this.getAllJScrollPaneTableOrTree[8] = this.jsp_NR_MD_9; + this.getAllJScrollPaneTableOrTree[9] = this.jsp_NR_MD_10; + this.getAllJScrollPaneTableOrTree[10] = this.jsp_NR_MD_11; + this.getAllJScrollPaneTableOrTree[11] = this.jsp_NR_MD_12; + this.getAllJScrollPaneTableOrTree[12] = this.jsp_NR_MD_13; + return this.getAllJScrollPaneTableOrTree; + } + + public JCheckBox[] getAllJCheckWGZZD() + { + this.jcb_aAllWGZZD = new JCheckBox[13]; + this.jcb_aAllWGZZD[0] = this.jcb_WGZMD_MD_1; + this.jcb_aAllWGZZD[1] = this.jcb_WGZMD_MD_2; + this.jcb_aAllWGZZD[2] = this.jcb_WGZMD_MD_3; + this.jcb_aAllWGZZD[3] = this.jcb_WGZMD_MD_4; + this.jcb_aAllWGZZD[4] = this.jcb_WGZMD_MD_5; + this.jcb_aAllWGZZD[5] = this.jcb_WGZMD_MD_6; + this.jcb_aAllWGZZD[6] = this.jcb_WGZMD_MD_7; + this.jcb_aAllWGZZD[7] = this.jcb_WGZMD_MD_8; + this.jcb_aAllWGZZD[8] = this.jcb_WGZMD_MD_9; + this.jcb_aAllWGZZD[9] = this.jcb_WGZMD_MD_10; + this.jcb_aAllWGZZD[10] = this.jcb_WGZMD_MD_11; + this.jcb_aAllWGZZD[11] = this.jcb_WGZMD_MD_12; + this.jcb_aAllWGZZD[12] = this.jcb_WGZMD_MD_13; + return this.jcb_aAllWGZZD; + } + + public JComboBox[] getAllJComboBoxLX() + { + this.jcomb_aAllLX = new JComboBox[13]; + this.jcomb_aAllLX[0] = this.jcb_LX_MD_1; + this.jcomb_aAllLX[1] = this.jcb_LX_MD_2; + this.jcomb_aAllLX[2] = this.jcb_LX_MD_3; + this.jcomb_aAllLX[3] = this.jcb_LX_MD_4; + this.jcomb_aAllLX[4] = this.jcb_LX_MD_5; + this.jcomb_aAllLX[5] = this.jcb_LX_MD_6; + this.jcomb_aAllLX[6] = this.jcb_LX_MD_7; + this.jcomb_aAllLX[7] = this.jcb_LX_MD_8; + this.jcomb_aAllLX[8] = this.jcb_LX_MD_9; + this.jcomb_aAllLX[9] = this.jcb_LX_MD_10; + this.jcomb_aAllLX[10] = this.jcb_LX_MD_11; + this.jcomb_aAllLX[11] = this.jcb_LX_MD_12; + this.jcomb_aAllLX[12] = this.jcb_LX_MD_13; + return this.jcomb_aAllLX; + } + + public JComboBox[] getAllJComboBoxTZM() + { + this.jcomb_aAllTZM = new JComboBox[13]; + this.jcomb_aAllTZM[0] = this.jcb_TZM_MD_1; + this.jcomb_aAllTZM[1] = this.jcb_TZM_MD_2; + this.jcomb_aAllTZM[2] = this.jcb_TZM_MD_3; + this.jcomb_aAllTZM[3] = this.jcb_TZM_MD_4; + this.jcomb_aAllTZM[4] = this.jcb_TZM_MD_5; + this.jcomb_aAllTZM[5] = this.jcb_TZM_MD_6; + this.jcomb_aAllTZM[6] = this.jcb_TZM_MD_7; + this.jcomb_aAllTZM[7] = this.jcb_TZM_MD_8; + this.jcomb_aAllTZM[8] = this.jcb_TZM_MD_9; + this.jcomb_aAllTZM[9] = this.jcb_TZM_MD_10; + this.jcomb_aAllTZM[10] = this.jcb_TZM_MD_11; + this.jcomb_aAllTZM[11] = this.jcb_TZM_MD_12; + this.jcomb_aAllTZM[12] = this.jcb_TZM_MD_13; + return this.jcomb_aAllTZM; + } + + public JToggleButton[] getAllJToggleButtonXSZ() + { + this.jtogglebutton_aAllXSZ = new JToggleButton[13]; + this.jtogglebutton_aAllXSZ[0] = this.jToggleButton_JXSZ_MD_1; + this.jtogglebutton_aAllXSZ[1] = this.jToggleButton_JXSZ_MD_2; + this.jtogglebutton_aAllXSZ[2] = this.jToggleButton_JXSZ_MD_3; + this.jtogglebutton_aAllXSZ[3] = this.jToggleButton_JXSZ_MD_4; + this.jtogglebutton_aAllXSZ[4] = this.jToggleButton_JXSZ_MD_5; + this.jtogglebutton_aAllXSZ[5] = this.jToggleButton_JXSZ_MD_6; + this.jtogglebutton_aAllXSZ[6] = this.jToggleButton_JXSZ_MD_7; + this.jtogglebutton_aAllXSZ[7] = this.jToggleButton_JXSZ_MD_8; + this.jtogglebutton_aAllXSZ[8] = this.jToggleButton_JXSZ_MD_9; + this.jtogglebutton_aAllXSZ[9] = this.jToggleButton_JXSZ_MD_10; + this.jtogglebutton_aAllXSZ[10] = this.jToggleButton_JXSZ_MD_11; + this.jtogglebutton_aAllXSZ[11] = this.jToggleButton_JXSZ_MD_12; + this.jtogglebutton_aAllXSZ[12] = this.jToggleButton_JXSZ_MD_13; + + return this.jtogglebutton_aAllXSZ; + } + + public JCheckBox[] getAllJCheckBoxFZ() + { + this.jcb_aAllFZ = new JCheckBox[13]; + this.jcb_aAllFZ[0] = this.jcb_FZ_MD_1; + this.jcb_aAllFZ[1] = this.jcb_FZ_MD_2; + this.jcb_aAllFZ[2] = this.jcb_FZ_MD_3; + this.jcb_aAllFZ[3] = this.jcb_FZ_MD_4; + this.jcb_aAllFZ[4] = this.jcb_FZ_MD_5; + this.jcb_aAllFZ[5] = this.jcb_FZ_MD_6; + this.jcb_aAllFZ[6] = this.jcb_FZ_MD_7; + this.jcb_aAllFZ[7] = this.jcb_FZ_MD_8; + this.jcb_aAllFZ[8] = this.jcb_FZ_MD_9; + this.jcb_aAllFZ[9] = this.jcb_FZ_MD_10; + this.jcb_aAllFZ[10] = this.jcb_FZ_MD_11; + this.jcb_aAllFZ[11] = this.jcb_FZ_MD_12; + this.jcb_aAllFZ[12] = this.jcb_FZ_MD_13; + return this.jcb_aAllFZ; + } + + public JTextField[] getAllJTextFieldFZ() + { + this.txt_aAllFZ = new JTextField[13]; + this.txt_aAllFZ[0] = this.txt_FZ_MD_1; + this.txt_aAllFZ[1] = this.txt_FZ_MD_2; + this.txt_aAllFZ[2] = this.txt_FZ_MD_3; + this.txt_aAllFZ[3] = this.txt_FZ_MD_4; + this.txt_aAllFZ[4] = this.txt_FZ_MD_5; + this.txt_aAllFZ[5] = this.txt_FZ_MD_6; + this.txt_aAllFZ[6] = this.txt_FZ_MD_7; + this.txt_aAllFZ[7] = this.txt_FZ_MD_8; + this.txt_aAllFZ[8] = this.txt_FZ_MD_9; + this.txt_aAllFZ[9] = this.txt_FZ_MD_10; + this.txt_aAllFZ[10] = this.txt_FZ_MD_11; + this.txt_aAllFZ[11] = this.txt_FZ_MD_12; + this.txt_aAllFZ[12] = this.txt_FZ_MD_13; + return this.txt_aAllFZ; + } + + public Vector getManageAllDatas() + { + Object[] selectedValue = (Object[])this.jListItemTypeNames + .getSelectedValue(); + String str_SelectItemType = (String)selectedValue[1]; + Vector v_AllOptions = new Vector(); + + + + + Vector v_origin_SelectItemType_field = new Vector(); + String str_origin_SelectItemType_field = "origin_" + str_SelectItemType + + "_field"; + String[] stra_origin_SelectItemType_field = {"field_countoj" + + this.jComboBoxMDS.getSelectedItem().toString() }; + v_origin_SelectItemType_field.add(str_origin_SelectItemType_field); + v_origin_SelectItemType_field.add(stra_origin_SelectItemType_field); + + Vector v_origin_SelectItemType_other_info = new Vector(); + String str_origin_SelectItemType_other_info = "origin_" + + str_SelectItemType + "_other_info"; + String strTemp = ""; + for (int i = 0; i < this.jTabbedPaneMainOption_sub2.getTabCount() - 1; i++) { + if (i == this.jTabbedPaneMainOption_sub2.getTabCount() - 2) { + strTemp = strTemp + this.jtext_aAllMustInsertTitle[i].getText(); + } else { + strTemp = + strTemp + this.jtext_aAllMustInsertTitle[i].getText() + "/"; + } + } + String[] stra_origin_SelectItemType_other_info = {"SelectItemTypeConfigTitleoj" + + strTemp }; + v_origin_SelectItemType_other_info + .add(str_origin_SelectItemType_other_info); + v_origin_SelectItemType_other_info + .add(stra_origin_SelectItemType_other_info); + + Vector v_origin_SelectItemType_options = new Vector(); + String str_origin_SelectItemType_options = "origin_" + + str_SelectItemType + "_options"; + String[] stra_origin_SelectItemType_options = new String[6]; + String str_sfkqsdsr = "yes"; + if (this.jCheckBoxItemIDKBJ.isSelected()) { + str_sfkqsdsr = "yes"; + } else { + str_sfkqsdsr = "no"; + } + stra_origin_SelectItemType_options[0] = ("Ƿֶ롾oj" + str_sfkqsdsr); + String str_lshxx = "6/1/999999/1"; + String str_lshxxTemp = ""; + str_lshxxTemp = this.jComboBoxWS.getSelectedItem().toString() + "/" + + this.jComboBoxWS1.getSelectedItem().toString() + "/" + + this.jComboBoxZZZ.getSelectedItem().toString() + "/" + + this.jComboBoxBC.getSelectedItem().toString(); + str_lshxx = str_lshxxTemp; + + stra_origin_SelectItemType_options[1] = ("ˮϢoj" + str_lshxx); + String str_sfblzjmzfzdjtsx = "no"; + if (this.jCheckBoxItemName.isSelected()) { + str_sfblzjmzfzdjtsx = "yes"; + } else { + str_sfblzjmzfzdjtsx = "no"; + } + String str_SX = this.jTextFieldRevFormPro.getText(); + stra_origin_SelectItemType_options[2] = + ("Ƿֵָԡoj" + str_sfblzjmzfzdjtsx + "/" + str_SX); + String str_sdbmmrgs = "no"; + if (this.jCheckBoxSDBM.isSelected()) { + str_sdbmmrgs = "yes"; + } else { + str_sdbmmrgs = "no"; + } + stra_origin_SelectItemType_options[3] = ("ֶĬϹϡoj" + str_sdbmmrgs); + String str_sfkqlshwzpzgn = "no/0"; + if (this.jComboBoxLSHBFWZ.getSelectedItem().equals("")) { + str_sfkqlshwzpzgn = "no/1"; + } else { + str_sfkqlshwzpzgn = + "yes/" + this.jComboBoxLSHBFWZ.getSelectedItem().toString(); + } + stra_origin_SelectItemType_options[4] = + ("Ƿˮλù(/λ)oj" + str_sfkqlshwzpzgn); + if (str_SelectItemType.equals("sgitem")) { + stra_origin_SelectItemType_options[5] = "ǷIDֵԡojyes/sgmatcode"; + } else { + stra_origin_SelectItemType_options[5] = + ("ǷIDֵԡojno/" + str_sfkqlshwzpzgn); + } + v_origin_SelectItemType_options.add(str_origin_SelectItemType_options); + v_origin_SelectItemType_options.add(stra_origin_SelectItemType_options); + + v_AllOptions.add(v_origin_SelectItemType_field); + v_AllOptions.add(v_origin_SelectItemType_other_info); + v_AllOptions.add(v_origin_SelectItemType_options); + + Vector[] va_Type = new Vector[this.jTabbedPaneMainOption_sub2.getTabCount() - 1]; + Vector[] va_Contain = new Vector[this.jTabbedPaneMainOption_sub2 + .getTabCount() - 1]; + for (int k = 0; k < va_Type.length; k++) + { + va_Type[k] = new Vector(); + String str_ItemType_style = "origin_" + str_SelectItemType + "_" + ( + k + 1) + "_"; + String[] stra_ItemType_style = new String[4]; + String str_MDLX = "0"; + if (this.jcomb_aAllLX[k].getSelectedItem().equals("ͼע")) { + str_MDLX = "0"; + } else if (this.jcomb_aAllLX[k].getSelectedItem().equals("׼")) { + str_MDLX = "1"; + } else if (this.jcomb_aAllLX[k].getSelectedItem().equals("IMAN")) { + str_MDLX = "3"; + } else if (this.jcomb_aAllLX[k].getSelectedItem().equals("OriginTree")) { + str_MDLX = "4"; + } else if (this.jcomb_aAllLX[k].getSelectedItem().equals("ָ")) { + str_MDLX = "5"; + } else { + str_MDLX = "2"; + } + stra_ItemType_style[0] = ("͡oj" + str_MDLX); + String str_WGZZD = "no"; + if (this.jcb_aAllWGZZD[k].isSelected()) { + str_WGZZD = "yes"; + } else { + str_WGZZD = "no"; + } + stra_ItemType_style[1] = ("ǷΪֶΡoj" + str_WGZZD); + String str_SXFZ_KG = "no"; + String str_SXFZ_ItemType = "*"; + String str_SXFZ_SX = "user_data1"; + String str_SXFZ_ZY = ""; + if (this.jcb_aAllFZ[k].isSelected()) { + str_SXFZ_KG = "yes"; + } else { + str_SXFZ_KG = "no"; + } + str_SXFZ_ItemType = "*"; + str_SXFZ_SX = this.txt_aAllFZ[k].getText(); + if (this.jtogglebutton_aAllXSZ[k].getText().equals("ʾֵ")) { + str_SXFZ_ZY = ""; + } else { + str_SXFZ_ZY = ""; + } + stra_ItemType_style[2] = + ("ԸֵϢ(/)oj" + str_SXFZ_KG + "/" + str_SXFZ_ItemType + "/" + str_SXFZ_SX + "/" + str_SXFZ_ZY); + String str_TZM = "yes"; + if (this.jcomb_aAllTZM[k].getSelectedItem().equals("&ʾ")) { + str_TZM = "no and do not display"; + } else if (this.jcomb_aAllTZM[k].getSelectedItem().equals("&ʾ")) { + str_TZM = "no"; + } else { + str_TZM = "yes"; + } + stra_ItemType_style[3] = ("Ƿ롾oj" + str_TZM); + va_Type[k].add(str_ItemType_style); + va_Type[k].add(stra_ItemType_style); + v_AllOptions.add(va_Type[k]); + + + va_Contain[k] = new Vector(); + String str_ItemType_contain = "origin_" + str_SelectItemType + "_" + ( + k + 1) + "_"; + String[] stra_ItemType_contain = getTheTableDatas(k); + if ((str_SelectItemType.equals("sgitem")) && + (str_ItemType_contain.equals("origin_sgitem_3_"))) + { + va_Contain[k].add(str_ItemType_contain); + va_Contain[k] + .add(new String[] { "OriginTree~ojOriginTree_sgitem_2_" }); + } + else + { + va_Contain[k].add(str_ItemType_contain); + va_Contain[k].add(stra_ItemType_contain); + } + v_AllOptions.add(va_Contain[k]); + } + return v_AllOptions; + } + + public void makeOptions(Vector v_AllDatas) + { + for (int i = 0; i < v_AllDatas.size(); i++) + { + Vector v_main = (Vector)v_AllDatas.get(i); + String str_Option_Title = (String)v_main.get(0); + String[] stra_Option_values = (String[])v_main.get(1); + addOptionsPreference(this.session, 4, str_Option_Title, + stra_Option_values); + } + JOptionPane.showMessageDialog(this.dialog, "򴴽ɹ"); + } + + public void addOptionsPreference(TCSession session, int int_scope, String str_Option_Title, String[] stra_Option_values) + { + try + { + TCPreferenceService preferenceService = session + .getPreferenceService(); + preferenceService.setStringArray(int_scope, str_Option_Title, + stra_Option_values); + System.out.println("Optionsֵӳɹ"); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public String[] getOptionsPreference(TCSession session, int int_scope, String str_Option_Title) + { + String[] stra_result = (String[])null; + try + { + TCPreferenceService preferenceService = session + .getPreferenceService(); + stra_result = preferenceService.getStringArray(int_scope, + str_Option_Title); + } + catch (Exception e) + { + e.printStackTrace(); + } + return stra_result; + } + + public void deleteOptionPreference(TCSession session, int int_scope, String str_Option_Title) + { + try + { + TCPreferenceService preferenceService = session + .getPreferenceService(); + preferenceService.removeEntry(int_scope, str_Option_Title); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public boolean checkAndRegistOption(String str_SelectItemName) + { + boolean b_result = true; + String[] stra_get = getOptionsPreference(this.session, 4, + "origin_item_names"); + String[] stra_new_origin_item_names = new String[stra_get.length + 1]; + for (int i = 0; i < stra_get.length; i++) + { + String str_temp = stra_get[i]; + stra_new_origin_item_names[i] = str_temp; + if (str_temp.equals(str_SelectItemName)) { + b_result = false; + } + } + if (b_result) + { + stra_new_origin_item_names[(stra_new_origin_item_names.length - 1)] = str_SelectItemName; + deleteOptionPreference(this.session, 4, "origin_item_names"); + addOptionsPreference(this.session, 4, "origin_item_names", + stra_new_origin_item_names); + System.out.println("µ㲿ע˹" + str_SelectItemName); + } + return b_result; + } + + public String[] getTheTableDatas(int index) + { + DefaultTableModel tablModel = (DefaultTableModel)this.jtable_aAllMustInsertContain[index] + .getModel(); + Vector v_datas = tablModel.getDataVector(); + String[] stra_FinalDatas = new String[v_datas.size() - 1]; + for (int i = 0; i < v_datas.size() - 1; i++) + { + Vector v_2 = (Vector)v_datas.get(i); + String str_Temp = v_2.get(0) + "oj" + v_2.get(1); + stra_FinalDatas[i] = str_Temp; + } + return stra_FinalDatas; + } + + public boolean checkEnterInfo(JTabbedPane jtbpMain) + { + int intTabCount = jtbpMain.getTabCount(); + if ((this.jtext_aAllMustInsertTitle != null) && + (this.jtable_aAllMustInsertContain != null)) { + for (int i = 0; i < intTabCount - 1; i++) + { + if (this.jtext_aAllMustInsertTitle[i].getText().equals("")) + { + JOptionPane.showMessageDialog(this, "" + (i + 1) + + " ⲻΪ", "", 2); + this.jTabbedPaneMainOption_sub2.setSelectedIndex(i + 1); + this.jtext_aAllMustInsertTitle[i].requestFocus(); + return false; + } + if ((this.jtable_aAllMustInsertContain[i].getModel().getValueAt(0, 0) != null) && + (this.jtable_aAllMustInsertContain[i].getModel() + .getValueAt(0, 1) != null)) + { + if ((this.jtable_aAllMustInsertContain[i].getModel().getValueAt(0, 0).equals("")) || + + (this.jtable_aAllMustInsertContain[i].getModel().getValueAt(0, 1).equals(""))) + { + JOptionPane.showMessageDialog(this.dialog, "" + (i + 1) + + " ݲΪ!!", "", 2); + this.jTabbedPaneMainOption_sub2.setSelectedIndex(i + 1); + this.jtable_aAllMustInsertContain[i].requestFocus(); + return false; + } + } + else + { + JOptionPane.showMessageDialog(this.dialog, "" + (i + 1) + + " ݲΪ", "", 2); + this.jTabbedPaneMainOption_sub2.setSelectedIndex(i + 1); + this.jtable_aAllMustInsertContain[i].requestFocus(); + return false; + } + } + } else { + JOptionPane.showMessageDialog(this.dialog, + "JTextFieldJTableΪNULL", "", 2); + } + return true; + } + + public void initMyTree(String str_OriginTreeKey, int i_index, JScrollPane jsp_in) + { + this.pop_main_array[(i_index - 1)] = new JPopupMenu(); + this.mi_add[(i_index - 1)] = new JMenuItem("", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/add_16.png"))); + this.mi_delete[(i_index - 1)] = new JMenuItem("ɾ", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/delete_16.png"))); + this.mi_modify[(i_index - 1)] = new JMenuItem("޸", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/EDIT_16.png"))); + this.mi_up[(i_index - 1)] = new JMenuItem("ƶ", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/pageup_16.png"))); + this.mi_down[(i_index - 1)] = new JMenuItem("ƶ", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/pagedown_16.png"))); + this.mi_copy[(i_index - 1)] = new JMenuItem("", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/copy_16.png"))); + this.mi_paste[(i_index - 1)] = new JMenuItem("ճ", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/clipboard_16.png"))); + this.mi_big[(i_index - 1)] = new JMenuItem("ڷŴ", new ImageIcon( + getClass().getResource( + "/com/origin/images/treepopupmenu/addother_16.png"))); + + + this.pop_main_array[(i_index - 1)].add(this.mi_add[(i_index - 1)]); + this.pop_main_array[(i_index - 1)].add(this.mi_modify[(i_index - 1)]); + this.pop_main_array[(i_index - 1)].add(this.mi_delete[(i_index - 1)]); + this.pop_main_array[(i_index - 1)].add(this.mi_up[(i_index - 1)]); + this.pop_main_array[(i_index - 1)].add(this.mi_down[(i_index - 1)]); + this.pop_main_array[(i_index - 1)].add(this.mi_copy[(i_index - 1)]); + this.pop_main_array[(i_index - 1)].add(this.mi_paste[(i_index - 1)]); + this.pop_main_array[(i_index - 1)].add(this.mi_big[(i_index - 1)]); + this.t_main_array[(i_index - 1)] = new JTree(this.dmtn_root_array[(i_index - 1)]); + this.t_main_array[(i_index - 1)].setEditable(false); + this.t_main_array[(i_index - 1)].setToolTipText("Test"); + initMyTreeActions(str_OriginTreeKey, i_index, jsp_in); + } + + public void initMyTreeActions(String str_OriginTreeKey, final int i_index, final JScrollPane jsp_in) + { + this.t_main_array[(i_index - 1)].addMouseListener(new MouseListener() + { + public void mouseClicked(MouseEvent e) + { + boolean isDoubleClick = e.getClickCount() == 2; + } + + public void mouseEntered(MouseEvent e) {} + + public void mouseExited(MouseEvent e) {} + + public void mousePressed(MouseEvent e) {} + + public void mouseReleased(MouseEvent e) + { + if (e.isPopupTrigger()) + { + Object comp = AutoCodeMainPanel.this.t_main_array[(i_index - 1)] + .getLastSelectedPathComponent(); + if (comp == null) + { + new MessageBox("δѡκνڵ", "ѡڵ", "ʾ", 2, true).setVisible(true); + return; + } + if (((DefaultMutableTreeNode)comp).isRoot()) + { + AutoCodeMainPanel.this.mi_delete[(i_index - 1)].setEnabled(false); + + AutoCodeMainPanel.this.mi_up[(i_index - 1)].setEnabled(false); + AutoCodeMainPanel.this.mi_down[(i_index - 1)].setEnabled(false); + AutoCodeMainPanel.this.mi_copy[(i_index - 1)].setEnabled(false); + if (AutoCodeMainPanel.this.dmtn_copy == null) { + AutoCodeMainPanel.this.mi_paste[(i_index - 1)].setEnabled(false); + } + } + else + { + AutoCodeMainPanel.this.mi_delete[(i_index - 1)].setEnabled(true); + AutoCodeMainPanel.this.mi_modify[(i_index - 1)].setEnabled(true); + AutoCodeMainPanel.this.mi_up[(i_index - 1)].setEnabled(true); + AutoCodeMainPanel.this.mi_down[(i_index - 1)].setEnabled(true); + AutoCodeMainPanel.this.mi_copy[(i_index - 1)].setEnabled(true); + } + if (AutoCodeMainPanel.this.dmtn_copy != null) { + AutoCodeMainPanel.this.mi_paste[(i_index - 1)].setEnabled(true); + } else { + AutoCodeMainPanel.this.mi_paste[(i_index - 1)].setEnabled(false); + } + AutoCodeMainPanel.this.pop_main_array[(i_index - 1)].show(e.getComponent(), + e.getX(), e.getY()); + } + } + }); + this.mi_add[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + AutoCodeMainPanel.this.kkAdd(i_index, "", ""); + } + }); + this.mi_delete[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + Object comp = AutoCodeMainPanel.this.t_main_array[(i_index - 1)] + .getLastSelectedPathComponent(); + if ((comp instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_target = (DefaultMutableTreeNode)comp; + int i_confirm = JOptionPane.showConfirmDialog( + AutoCodeMainPanel.this, "ȷɾ" + + dmtn_target.getUserObject().toString() + + "ڵ", "ڵɾȷ", 0); + if (i_confirm != 0) { + return; + } + Object get_parent = dmtn_target.getParent(); + if ((get_parent instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_parent = (DefaultMutableTreeNode)get_parent; + dmtn_parent.remove(dmtn_target); + AutoCodeMainPanel.this.t_main_array[(i_index - 1)].requestFocus(); + AutoCodeMainPanel.this.t_main_array[(i_index - 1)].setSelectionRow(0); + } + } + AutoCodeMainPanel.this.t_main_array[(i_index - 1)].updateUI(); + } + }); + this.mi_modify[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + AutoCodeMainPanel.this.kkModify(i_index); + } + }); + this.mi_up[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + Object comp = AutoCodeMainPanel.this.t_main_array[(i_index - 1)] + .getLastSelectedPathComponent(); + if ((comp instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_target = (DefaultMutableTreeNode)comp; + Object get_parent = dmtn_target.getParent(); + if ((get_parent instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_parent = (DefaultMutableTreeNode)get_parent; + DefaultMutableTreeNode dmtn_previous = (DefaultMutableTreeNode)dmtn_parent + .getChildBefore(dmtn_target); + if (dmtn_previous != null) + { + int i_previousindex = dmtn_parent + .getIndex(dmtn_previous); + dmtn_parent.insert(dmtn_target, i_previousindex); + } + else + { + System.out.println("dmtn_previous==nullѾƶڵ"); + } + } + } + AutoCodeMainPanel.this.t_main_array[(i_index - 1)].updateUI(); + } + }); + this.mi_down[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + Object comp = AutoCodeMainPanel.this.t_main_array[(i_index - 1)] + .getLastSelectedPathComponent(); + if ((comp instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_target = (DefaultMutableTreeNode)comp; + Object get_parent = dmtn_target.getParent(); + if ((get_parent instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_parent = (DefaultMutableTreeNode)get_parent; + DefaultMutableTreeNode dmtn_next = (DefaultMutableTreeNode)dmtn_parent + .getChildAfter(dmtn_target); + if (dmtn_next != null) + { + int i_nextindex = dmtn_parent.getIndex(dmtn_next); + dmtn_parent.insert(dmtn_target, i_nextindex); + } + else + { + System.out.println("dmtn_next==nullѾƶڵײ"); + } + } + } + AutoCodeMainPanel.this.t_main_array[(i_index - 1)].updateUI(); + } + }); + this.mi_copy[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + Object comp = AutoCodeMainPanel.this.t_main_array[(i_index - 1)] + .getLastSelectedPathComponent(); + if ((comp instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_target = (DefaultMutableTreeNode)comp; + AutoCodeMainPanel.this.dmtn_copy = new DefaultMutableTreeNode(dmtn_target + .getUserObject(), true); + AutoCodeMainPanel.this.orgCopyNode(AutoCodeMainPanel.this.dmtn_copy, dmtn_target); + } + AutoCodeMainPanel.this.t_main_array[(i_index - 1)].updateUI(); + } + }); + this.mi_paste[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent event) + { + Object comp = AutoCodeMainPanel.this.t_main_array[(i_index - 1)] + .getLastSelectedPathComponent(); + if ((comp instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_target = (DefaultMutableTreeNode)comp; + if (AutoCodeMainPanel.this.dmtn_copy != null) + { + String str_FullNodeName = AutoCodeMainPanel.this.dmtn_copy.getUserObject() + .toString(); + Enumeration children = dmtn_target.children(); + + dmtn_target.getParent(); + + boolean b_same = true; + while (children.hasMoreElements()) + { + DefaultMutableTreeNode element = + (DefaultMutableTreeNode)children.nextElement(); + String str_subfullnodename = element + .getUserObject().toString(); + if (str_subfullnodename.equals(str_FullNodeName)) + { + b_same = false; + break; + } + } + if (b_same) { + dmtn_target.insert(AutoCodeMainPanel.this.dmtn_copy, dmtn_target + .getChildCount()); + } else { + new MessageBox("ͬڵڣ" + str_FullNodeName, "ʾ", "", 2, true).setVisible(true); + } + } + } + AutoCodeMainPanel.this.t_main_array[(i_index - 1)].updateUI(); + } + }); + this.mi_big[(i_index - 1)].addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + AutoCodeMainPanel.this.mi_big[(i_index - 1)].setEnabled(false); + OrgSingleTreeEditDialog osted = new OrgSingleTreeEditDialog( + AutoCodeMainPanel.this.dialog, true, AutoCodeMainPanel.this.t_main_array[(i_index - 1)], + AutoCodeMainPanel.this, i_index, jsp_in); + osted.setVisible(true); + } + }); + } + + public void orgCopyNode(DefaultMutableTreeNode dmtn_new, DefaultMutableTreeNode dmtn_in) + { + Enumeration enumeration = dmtn_in.children(); + while (enumeration.hasMoreElements()) + { + DefaultMutableTreeNode dmtn_unit = + (DefaultMutableTreeNode)enumeration.nextElement(); + DefaultMutableTreeNode dmtn_nuit_new = new DefaultMutableTreeNode( + dmtn_unit.getUserObject(), true); + dmtn_new.add(dmtn_nuit_new); + if (!dmtn_unit.isLeaf()) { + orgCopyNode(dmtn_nuit_new, dmtn_unit); + } + } + } + + public void kkAdd(int i_index, String str_Main_In, String str_Code_in) + { + Object comp = this.t_main_array[(i_index - 1)].getLastSelectedPathComponent(); + String str_Node_Message = ""; + String str_Node_DetailMessage = ""; + if ((comp instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_target = (DefaultMutableTreeNode)comp; + OrgInputDialog oid = new OrgInputDialog(this.dialog, true, + "-->ڵע͡()"); + String str_in = (String)dmtn_target.getUserObject(); + String[] stra_KeyAndCode = orgGetNameAndKey(str_in); + String str_main1 = stra_KeyAndCode[0]; + String str_code1 = stra_KeyAndCode[1]; + oid.txt_main.setText(str_Main_In); + oid.comb_code.setSelectedItem(str_Code_in); + + oid.setLocation( + getLocationOnScreen().x + 250, + getLocationOnScreen().y + 180); + oid.setVisible(true); + if (oid.b_falg) + { + String str_Final = ""; + if (oid.txt_description.getText().trim().equals("")) { + str_Final = + oid.txt_main.getText() + "(" + oid.comb_code.getSelectedItem() + ")"; + } else { + str_Final = + + oid.txt_main.getText() + "" + oid.txt_description.getText().trim() + "(" + oid.comb_code.getSelectedItem() + ")"; + } + boolean b_same = true; + Enumeration children = dmtn_target.children(); + while (children.hasMoreElements()) + { + DefaultMutableTreeNode element = + (DefaultMutableTreeNode)children.nextElement(); + String str_subfullnodename = element.getUserObject() + .toString(); + String str_in2 = str_subfullnodename; + String[] stra_KeyAndCode2 = orgGetNameAndKey(str_in2); + String str_main2 = stra_KeyAndCode2[0]; + if ((str_main2.contains("")) && + (str_main2.contains(""))) + { + String[] stra_d = orgGetNameAndKey(str_main2, '', + ''); + str_main2 = stra_d[0]; + } + String str_code2 = stra_KeyAndCode2[1]; + if ((!str_main1.equals(str_main2)) || + (!str_code1.equals(str_code2))) + { + if (oid.txt_main.getText().equals(str_main2)) + { + b_same = false; + str_Node_Message = "ͬڵڣ" + oid.txt_main.getText() + + "(" + oid.comb_code.getSelectedItem() + ")"; + str_Node_DetailMessage = "ͬ¡ͬơĽڵڣ\nڵ㡿" + + dmtn_target + .toString() + "\nӼڵ㡿" + str_main2 + + "(" + str_code2 + ")"; + + break; + } + if (!oid.comb_code.getSelectedItem().equals("")) { + if (!oid.comb_code.getSelectedItem().equals("N/A")) { + if (oid.comb_code.getSelectedItem().equals(str_code2)) + { + b_same = false; + str_Node_Message = "ͬڵڣ" + oid.txt_main.getText() + + "(" + oid.comb_code.getSelectedItem() + ")"; + str_Node_DetailMessage = "ͬ¡ͬ롿Ľڵڣ\nڵ㡿" + + dmtn_target + .toString() + "\nӼڵ㡿" + str_main2 + + "(" + str_code2 + ")"; + break; + } + } + } + } + } + if (b_same) + { + DefaultMutableTreeNode dmtn_add = new DefaultMutableTreeNode( + str_Final, true); + dmtn_target.add(dmtn_add); + } + else + { + new MessageBox(str_Node_Message, str_Node_DetailMessage, "ʾ", 2, true).setVisible(true); + kkAdd(i_index, oid.txt_main.getText(), oid.comb_code + .getSelectedItem().toString()); + } + } + } + this.t_main_array[(i_index - 1)].updateUI(); + } + + public void kkModify(int i_index) + { + Object comp = this.t_main_array[(i_index - 1)].getLastSelectedPathComponent(); + String str_Node_Message = ""; + String str_Node_DetailMessage = ""; + if ((comp instanceof DefaultMutableTreeNode)) + { + DefaultMutableTreeNode dmtn_target = (DefaultMutableTreeNode)comp; + OrgInputDialog oid = new OrgInputDialog(this.dialog, true, + "޸-->ڵע͡()"); + String str_in = (String)dmtn_target.getUserObject(); + String[] stra_KeyAndCode = orgGetNameAndKey(str_in); + String str_main1 = stra_KeyAndCode[0]; + String str_code1 = stra_KeyAndCode[1]; + KCharacterStringParser kcsp = new KCharacterStringParser(); + + oid.txt_main.setText(kcsp.orgContentFromLeftMarker("", str_main1)); + oid.txt_description.setText(kcsp.orgContentFromTowMarker("", "", + str_main1)); + oid.comb_code.setSelectedItem(str_code1); + + oid.setLocation( + getLocationOnScreen().x + 250, + getLocationOnScreen().y + 180); + oid.setVisible(true); + if (oid.b_falg) + { + String str_Final = ""; + if (oid.txt_description.getText().trim().equals("")) { + str_Final = + oid.txt_main.getText() + "(" + oid.comb_code.getSelectedItem() + ")"; + } else { + str_Final = + + oid.txt_main.getText() + "" + oid.txt_description.getText().trim() + "(" + oid.comb_code.getSelectedItem() + ")"; + } + boolean b_same = true; + if (!dmtn_target.isRoot()) + { + Enumeration children = dmtn_target.getParent().children(); + while (children.hasMoreElements()) + { + DefaultMutableTreeNode element = + (DefaultMutableTreeNode)children.nextElement(); + String str_subfullnodename = element.getUserObject() + .toString(); + if (!dmtn_target.getUserObject().toString().equals( + str_subfullnodename)) + { + String str_in2 = str_subfullnodename; + String[] stra_KeyAndCode2 = orgGetNameAndKey(str_in2); + String str_main2 = stra_KeyAndCode2[0]; + if ((str_main2.contains("")) && + (str_main2.contains(""))) + { + String[] stra_d = orgGetNameAndKey(str_main2, + '', ''); + str_main2 = stra_d[0]; + } + String str_code2 = stra_KeyAndCode2[1]; + if ((!str_main1.equals(str_main2)) || + (!str_code1.equals(str_code2))) + { + if (oid.txt_main.getText().equals(str_main2)) + { + b_same = false; + str_Node_Message = "ͬڵڣ" + str_Final; + str_Node_DetailMessage = "ͬ¡ͬơĽڵڣ" + + ((DefaultMutableTreeNode)dmtn_target + .getParent()).toString(); + + break; + } + if (!oid.comb_code.getSelectedItem().equals("")) { + if (!oid.comb_code.getSelectedItem().equals("N/A")) { + if (oid.comb_code.getSelectedItem().equals( + str_code2)) + { + b_same = false; + str_Node_Message = "ͬڵڣ" + str_Final; + str_Node_DetailMessage = "ͬ¡ͬ롿Ľڵڣ" + + ((DefaultMutableTreeNode)dmtn_target + .getParent()).toString(); + break; + } + } + } + } + } + } + } + if (b_same) + { + dmtn_target.setUserObject(str_Final); + } + else + { + new MessageBox(str_Node_Message, str_Node_DetailMessage, "ʾ", 2, true).setVisible(true); + kkModify(i_index); + } + } + } + this.t_main_array[(i_index - 1)].updateUI(); + } + + public boolean isNodeSelfOrChild() + { + return false; + } + + public boolean myCopy(DefaultMutableTreeNode dmtn_copy_new, DefaultMutableTreeNode dmtn_copy_target) + { + return false; + } + + private void jcb_LX_MD_1ActionPerformed(ActionEvent evt, JComboBox jcomb_in, JScrollPane jsp_in, JTable jtb_in, int i_index) + { + String str_select = jcomb_in.getSelectedItem().toString(); + if (str_select.equals("OriginTree")) + { + inOriginTreeOptions(); + + int i_select = this.jTabbedPaneMainOption_sub2.getSelectedIndex(); + Object[] obja_SelectValue = (Object[])this.jListItemTypeNames + .getSelectedValue(); + if (i_select == 0) + { + String str_OriginTreeKey = "OriginTree_" + + String.valueOf(obja_SelectValue[1]) + "_" + i_index + + "_"; + Object[][] obja2 = { { "OriginTree~", + str_OriginTreeKey } }; + Object[] obja = { "ڲֵ", "ʾֵ" }; + DefaultTableModel dft_temp = new DefaultTableModel(obja2, obja); + jtb_in.setModel(dft_temp); + initTreeInfo(i_index); + this.dmtn_root_array[(i_index - 1)] = orgProcessMyTree(this.v_AllNodeName, + this.hm_AllNode, i_index); + initMyTree(str_OriginTreeKey, i_index, jsp_in); + } + else + { + String str_OriginTreeKey = "OriginTree_" + + String.valueOf(obja_SelectValue[1]) + "_" + i_select + + "_"; + Object[][] obja2 = { { "OriginTree~", + str_OriginTreeKey } }; + Object[] obja = { "ڲֵ", "ʾֵ" }; + DefaultTableModel dft_temp = new DefaultTableModel(obja2, obja); + jtb_in.setModel(dft_temp); + initTreeInfo(i_select); + this.dmtn_root_array[(i_select - 1)] = orgProcessMyTree(this.v_AllNodeName, + this.hm_AllNode, i_select); + initMyTree(str_OriginTreeKey, i_select, jsp_in); + } + jsp_in.getViewport().removeAll(); + jsp_in.getViewport().add(this.t_main_array[(i_index - 1)]); + jsp_in.repaint(); + jsp_in.updateUI(); + } + else + { + jsp_in.getViewport().removeAll(); + jsp_in.getViewport().add(jtb_in); + jsp_in.repaint(); + jsp_in.updateUI(); + } + } + + public void initTreeInfo(int i_index) + { + try + { + String str_display = ""; + this.hm_TreeCode = new HashMap(); + this.hm_AllNodeName = new HashMap(); + this.hm_AllNode = new HashMap(); + this.v_AllNodeName = new Vector(); + Object[] obja_SelectValue = (Object[])this.jListItemTypeNames + .getSelectedValue(); + String[] stra = this.session.getPreferenceService() + .getStringArray( + 4, + "OriginTree_" + obja_SelectValue[1] + "_" + i_index + + "_"); + String str_one = ""; + for (int i = 0; i < stra.length; i++) + { + str_one = stra[i]; + if (!str_one.equals("")) + { + str_display = str_display + str_one + "\n"; + String[] split = str_one.split(this.str_Big); + if (split.length >= 3) + { + if (i == 0) { + this.str_RootName = split[0]; + } + String str_one_nodename = split[1] + "(" + split[2] + ")"; + String str_node_key = split[1] + this.str_Small + split[0]; + this.hm_AllNodeName.put(split[0], str_one_nodename); + this.hm_TreeCode.put(str_node_key, split[2]); + DefaultMutableTreeNode dmtn_one = new DefaultMutableTreeNode(str_one_nodename, + true); + this.hm_AllNode.put(str_node_key, dmtn_one); + this.v_AllNodeName.add(str_node_key); + } + } + } + DefaultMutableTreeNode dmtn_one = new DefaultMutableTreeNode(this.str_RootName + "()", true); + this.hm_AllNode.put(this.str_RootName, dmtn_one); + this.v_AllNodeName.add(this.str_RootName); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public void inOriginTreeOptions() + { + try + { + Object[] selectedValue = (Object[])this.jListItemTypeNames + .getSelectedValue(); + String str_SelectItemType = (String)selectedValue[1]; + int i_index = this.jTabbedPaneMainOption_sub2.getSelectedIndex(); + String[] stra = this.session.getPreferenceService().getStringArray(4, + "OriginTree_" + str_SelectItemType + "_" + i_index + "_"); + if ((stra != null) && (stra.length <= 0)) + { + String[] stra_values = { "Rootojʼڵ㡾oj0" }; + this.session.getPreferenceService().setStringArray( + 4, + "OriginTree_" + str_SelectItemType + "_" + i_index + + "_", stra_values); + System.out.println("OptionsɹOriginTree_" + + str_SelectItemType + "_" + i_index + "_"); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public DefaultMutableTreeNode orgProcessMyTree(Vector v_AllNodeName, HashMap hm_MyTree, int i_index) + { + String str_parent_key = ""; + for (int i = 0; i < v_AllNodeName.size(); i++) + { + Object obj_node_key = v_AllNodeName.get(i); + DefaultMutableTreeNode dmtn_son = (DefaultMutableTreeNode)hm_MyTree.get(obj_node_key); + String str_node_key = (String)obj_node_key; + int index = str_node_key.indexOf(this.str_Small); + if (index == -1) + { + this.dmtn_root_array[(i_index - 1)] = dmtn_son; + } + else + { + str_parent_key = str_node_key.substring(index + + this.str_Small.length()); + DefaultMutableTreeNode dmtn_parent = + (DefaultMutableTreeNode)hm_MyTree.get(str_parent_key); + dmtn_parent.add(dmtn_son); + } + } + return this.dmtn_root_array[(i_index - 1)]; + } + + public void TreeInputOptionsStart() + { + this.str_display = ""; + Object[] objaSelectValue = (Object[])this.jListItemTypeNames + .getSelectedValue(); + for (int i_n = 0; i_n < this.dmtn_root_array.length; i_n++) { + if (this.dmtn_root_array[i_n] != null) + { + this.v_OptionValues = new Vector(); + orgShowTree(this.dmtn_root_array[i_n]); + System.out.println(this.str_display); + String[] stra = new String[this.v_OptionValues.size()]; + for (int i = 0; i < this.v_OptionValues.size(); i++) { + stra[i] = ((String)this.v_OptionValues.get(i)); + } + addOptionsPreference(this.session, 4, "OriginTree_" + + objaSelectValue[1] + "_" + (i_n + 1) + "_", stra); + } + } + } + + public void orgShowTree(DefaultMutableTreeNode root) + { + if (root.getChildCount() >= 0) { + for (Enumeration e = root.children(); e.hasMoreElements();) + { + DefaultMutableTreeNode n = + (DefaultMutableTreeNode)e.nextElement(); + this.i_count += 1; + this.str_FinalParentNames = ""; + orgGetAllParent(n); + String str_UserObject = n.getUserObject().toString(); + String str_one = this.str_FinalParentNames + this.str_Big + + orgGetNameAndKey(str_UserObject)[0] + this.str_Big + + orgGetNameAndKey(str_UserObject)[1]; + this.v_OptionValues.add(str_one); + this.str_display = + (this.str_display + this.str_FinalParentNames + str_one + "\n"); + if (n.getChildCount() >= 0) { + orgShowTree(n); + } + } + } + } + + public void orgGetAllParent(DefaultMutableTreeNode root) + { + DefaultMutableTreeNode parent = (DefaultMutableTreeNode)root + .getParent(); + if (parent != null) + { + if (this.str_FinalParentNames.equals("")) { + this.str_FinalParentNames = (this.str_FinalParentNames + orgGetNameAndKey(parent.toString())[0]); + } else { + this.str_FinalParentNames = + (this.str_FinalParentNames + this.str_Small + orgGetNameAndKey(parent.toString())[0]); + } + orgGetAllParent(parent); + } + } + + public static String[] orgGetNameAndKey(String str_in) + { + String[] stra_result = new String[2]; + int i_left = 0; + int i_right = 0; + + char[] chars = str_in.toCharArray(); + for (int i = chars.length - 1; i >= 0; i--) + { + if ((i_left != 0) && (i_right != 0)) { + break; + } + if (chars[i] == ')') { + i_right = i; + } else if (chars[i] == '(') { + i_left = i; + } + } + if (i_left == 0) + { + System.out.println("" + str_in + "ȱ("); + stra_result[0] = str_in; + stra_result[1] = "0"; + return stra_result; + } + if (i_right == 0) + { + System.out.println("" + str_in + "ȱ)"); + stra_result[0] = str_in.substring(0, str_in.length() - 2); + stra_result[1] = "0"; + return stra_result; + } + stra_result[0] = str_in.substring(0, i_left); + if (str_in.length() <= 2) { + stra_result[1] = ""; + } else { + stra_result[1] = str_in.substring(i_left + 1, i_right); + } + return stra_result; + } + + public static String[] orgGetNameAndKey(String str_in, char char_Left, char char_Right) + { + String[] stra_result = new String[2]; + int i_left = 0; + int i_right = 0; + + char[] chars = str_in.toCharArray(); + for (int i = chars.length - 1; i >= 0; i--) + { + if ((i_left != 0) && (i_right != 0)) { + break; + } + if (chars[i] == char_Right) { + i_right = i; + } else if (chars[i] == char_Left) { + i_left = i; + } + } + if (i_left == 0) + { + System.out.println("" + str_in + "ȱ" + char_Left); + stra_result[0] = str_in; + stra_result[1] = "0"; + return stra_result; + } + if (i_right == 0) + { + System.out.println("" + str_in + "ȱ" + char_Right); + stra_result[0] = str_in.substring(0, str_in.length() - 2); + stra_result[1] = "0"; + return stra_result; + } + stra_result[0] = str_in.substring(0, i_left); + if (str_in.length() <= 2) { + stra_result[1] = ""; + } else { + stra_result[1] = str_in.substring(i_left + 1, i_right); + } + return stra_result; + } + + int i_count = 0; + String str_FinalParentNames = ""; + String str_display = ""; + Vector v_OptionValues = new Vector(); + HashMap hm_TreeCode; + HashMap hm_AllNodeName; + HashMap hm_AllNode; + Vector v_AllNodeName; + String str_RootName = "¹ĶϷ"; + String str_Big = "oj"; + String str_Small = "org"; + HashMap hm_OriginTree_option = new HashMap(); + JTree[] t_main_array = new JTree[13]; + DefaultMutableTreeNode[] dmtn_root_array = new DefaultMutableTreeNode[13]; + JPopupMenu[] pop_main_array = new JPopupMenu[13]; + public JMenuItem[] mi_add = new JMenuItem[13]; + public JMenuItem[] mi_delete = new JMenuItem[13]; + public JMenuItem[] mi_modify = new JMenuItem[13]; + public JMenuItem[] mi_up = new JMenuItem[13]; + public JMenuItem[] mi_down = new JMenuItem[13]; + public JMenuItem[] mi_copy = new JMenuItem[13]; + public JMenuItem[] mi_paste = new JMenuItem[13]; + public JMenuItem[] mi_big = new JMenuItem[13]; + DefaultMutableTreeNode dmtn_copy; + Icon iconFinish = new ImageIcon(getClass() + .getResource("/com/origin/images/a_Finish1.gif")); + boolean bFinish = false; + boolean bMD_BiaoTi = false; + JPanel[] jpane_aAllJTabbedPaneSub; + JTable[] jtable_aAllMustInsertContain; + public JScrollPane[] getAllJScrollPaneTableOrTree; + JTextField[] jtext_aAllMustInsertTitle; + JCheckBox[] jcb_aAllWGZZD; + JComboBox[] jcomb_aAllLX; + JComboBox[] jcomb_aAllTZM; + JToggleButton[] jtogglebutton_aAllXSZ; + JCheckBox[] jcb_aAllFZ; + JTextField[] txt_aAllFZ; + int int_click_count = 0; + private JButton jButtonBack; + private JButton jButtonBack1; + private JButton jButtonBackClose; + private JCheckBox jCheckBoxItemIDKBJ; + private JCheckBox jCheckBoxItemName; + private JCheckBox jCheckBoxSDBM; + private JComboBox jComboBoxBC; + private JComboBox jComboBoxLSHBFWZ; + private JComboBox jComboBoxMDS; + private JComboBox jComboBoxWS; + private JComboBox jComboBoxWS1; + private JComboBox jComboBoxZZZ; + private JLabel jLabelBC; + private JLabel jLabelFinish; + private JLabel jLabelLSHBFWZ; + private JLabel jLabelMDS; + private JLabel jLabelMainInfo; + private JLabel jLabelOriginLogo; + private JLabel jLabelQSZ; + private JLabel jLabelUp; + private JLabel jLabelWS; + private JLabel jLabelZZZ; + private JLabel jLabel_SXS_MD_1; + private JLabel jLabel_SXS_MD_10; + private JLabel jLabel_SXS_MD_11; + private JLabel jLabel_SXS_MD_12; + private JLabel jLabel_SXS_MD_13; + private JLabel jLabel_SXS_MD_2; + private JLabel jLabel_SXS_MD_3; + private JLabel jLabel_SXS_MD_4; + private JLabel jLabel_SXS_MD_5; + private JLabel jLabel_SXS_MD_6; + private JLabel jLabel_SXS_MD_7; + private JLabel jLabel_SXS_MD_8; + private JLabel jLabel_SXS_MD_9; + private JLabel jLabel_Style_MD_1; + private JLabel jLabel_Style_MD_10; + private JLabel jLabel_Style_MD_11; + private JLabel jLabel_Style_MD_12; + private JLabel jLabel_Style_MD_13; + private JLabel jLabel_Style_MD_2; + private JLabel jLabel_Style_MD_3; + private JLabel jLabel_Style_MD_4; + private JLabel jLabel_Style_MD_5; + private JLabel jLabel_Style_MD_6; + private JLabel jLabel_Style_MD_7; + private JLabel jLabel_Style_MD_8; + private JLabel jLabel_Style_MD_9; + private JLabel jLabel_Title_MD_1; + private JLabel jLabel_Title_MD_10; + private JLabel jLabel_Title_MD_11; + private JLabel jLabel_Title_MD_12; + private JLabel jLabel_Title_MD_13; + private JLabel jLabel_Title_MD_2; + private JLabel jLabel_Title_MD_3; + private JLabel jLabel_Title_MD_4; + private JLabel jLabel_Title_MD_5; + private JLabel jLabel_Title_MD_6; + private JLabel jLabel_Title_MD_7; + private JLabel jLabel_Title_MD_8; + private JLabel jLabel_Title_MD_9; + private JList jListItemTypeNames; + private JMenuItem jMenuItemClearAll; + private JMenuItem jMenuItemSingle; + private JPanel jPanel3; + private JPanel jPanel4; + private JPanel jPanelItemTypeNameList; + private JPanel jPanelItemTypes; + private JPanel jPanelMDContain_MD_1; + private JPanel jPanelMDContain_MD_10; + private JPanel jPanelMDContain_MD_11; + private JPanel jPanelMDContain_MD_12; + private JPanel jPanelMDContain_MD_13; + private JPanel jPanelMDContain_MD_2; + private JPanel jPanelMDContain_MD_3; + private JPanel jPanelMDContain_MD_4; + private JPanel jPanelMDContain_MD_5; + private JPanel jPanelMDContain_MD_6; + private JPanel jPanelMDContain_MD_7; + private JPanel jPanelMDContain_MD_8; + private JPanel jPanelMDContain_MD_9; + private JPanel jPanelMDM_Sub_MD_1; + private JPanel jPanelMDM_Sub_MD_10; + private JPanel jPanelMDM_Sub_MD_11; + private JPanel jPanelMDM_Sub_MD_12; + private JPanel jPanelMDM_Sub_MD_13; + private JPanel jPanelMDM_Sub_MD_2; + private JPanel jPanelMDM_Sub_MD_3; + private JPanel jPanelMDM_Sub_MD_4; + private JPanel jPanelMDM_Sub_MD_5; + private JPanel jPanelMDM_Sub_MD_6; + private JPanel jPanelMDM_Sub_MD_7; + private JPanel jPanelMDM_Sub_MD_8; + private JPanel jPanelMDM_Sub_MD_9; + private JPanel jPanelMD_CSPZ; + private JPanel jPanelMainContain_1; + private JPanel jPanelMainContain_2; + private JPanel jPanelMainOptionContain; + private JPanel jPanelMainOptions; + private JPanel jPanelMainOptions_sub2; + private JPanel jPanelMainOptions_sub3; + private JPanel jPanelOriginLogo; + private JPanel jPanelZhuCanShu_Sub; + private JPanel jPanel_CS2_MD_1; + private JPanel jPanel_CS2_MD_10; + private JPanel jPanel_CS2_MD_11; + private JPanel jPanel_CS2_MD_12; + private JPanel jPanel_CS2_MD_13; + private JPanel jPanel_CS2_MD_2; + private JPanel jPanel_CS2_MD_3; + private JPanel jPanel_CS2_MD_4; + private JPanel jPanel_CS2_MD_5; + private JPanel jPanel_CS2_MD_6; + private JPanel jPanel_CS2_MD_7; + private JPanel jPanel_CS2_MD_8; + private JPanel jPanel_CS2_MD_9; + private JPanel jPanel_NRCS_MD_1; + private JPanel jPanel_NRCS_MD_10; + private JPanel jPanel_NRCS_MD_11; + private JPanel jPanel_NRCS_MD_12; + private JPanel jPanel_NRCS_MD_13; + private JPanel jPanel_NRCS_MD_2; + private JPanel jPanel_NRCS_MD_3; + private JPanel jPanel_NRCS_MD_4; + private JPanel jPanel_NRCS_MD_5; + private JPanel jPanel_NRCS_MD_6; + private JPanel jPanel_NRCS_MD_7; + private JPanel jPanel_NRCS_MD_8; + private JPanel jPanel_NRCS_MD_9; + private JPanel jPanel_Title_MD_1; + private JPanel jPanel_Title_MD_10; + private JPanel jPanel_Title_MD_11; + private JPanel jPanel_Title_MD_12; + private JPanel jPanel_Title_MD_13; + private JPanel jPanel_Title_MD_2; + private JPanel jPanel_Title_MD_3; + private JPanel jPanel_Title_MD_4; + private JPanel jPanel_Title_MD_5; + private JPanel jPanel_Title_MD_6; + private JPanel jPanel_Title_MD_7; + private JPanel jPanel_Title_MD_8; + private JPanel jPanel_Title_MD_9; + private JPopupMenu jPopupMenuForJTable; + private JScrollPane jScrollPane1; + private JSplitPane jSplitPaneMainContain_1; + private JTabbedPane jTabbedPaneMain; + private JTabbedPane jTabbedPaneMainOption_sub2; + private JTextField jTextFieldRevFormPro; + private JToggleButton jToggleButton_JXSZ_MD_1; + private JToggleButton jToggleButton_JXSZ_MD_10; + private JToggleButton jToggleButton_JXSZ_MD_11; + private JToggleButton jToggleButton_JXSZ_MD_12; + private JToggleButton jToggleButton_JXSZ_MD_13; + private JToggleButton jToggleButton_JXSZ_MD_2; + private JToggleButton jToggleButton_JXSZ_MD_3; + private JToggleButton jToggleButton_JXSZ_MD_4; + private JToggleButton jToggleButton_JXSZ_MD_5; + private JToggleButton jToggleButton_JXSZ_MD_6; + private JToggleButton jToggleButton_JXSZ_MD_7; + private JToggleButton jToggleButton_JXSZ_MD_8; + private JToggleButton jToggleButton_JXSZ_MD_9; + private JCheckBox jcb_FZ_MD_1; + private JCheckBox jcb_FZ_MD_10; + private JCheckBox jcb_FZ_MD_11; + private JCheckBox jcb_FZ_MD_12; + private JCheckBox jcb_FZ_MD_13; + private JCheckBox jcb_FZ_MD_2; + private JCheckBox jcb_FZ_MD_3; + private JCheckBox jcb_FZ_MD_4; + private JCheckBox jcb_FZ_MD_5; + private JCheckBox jcb_FZ_MD_6; + private JCheckBox jcb_FZ_MD_7; + private JCheckBox jcb_FZ_MD_8; + private JCheckBox jcb_FZ_MD_9; + public JComboBox jcb_LX_MD_1; + private JComboBox jcb_LX_MD_10; + private JComboBox jcb_LX_MD_11; + private JComboBox jcb_LX_MD_12; + private JComboBox jcb_LX_MD_13; + private JComboBox jcb_LX_MD_2; + private JComboBox jcb_LX_MD_3; + private JComboBox jcb_LX_MD_4; + private JComboBox jcb_LX_MD_5; + private JComboBox jcb_LX_MD_6; + private JComboBox jcb_LX_MD_7; + private JComboBox jcb_LX_MD_8; + private JComboBox jcb_LX_MD_9; + private JComboBox jcb_TZM_MD_1; + private JComboBox jcb_TZM_MD_10; + private JComboBox jcb_TZM_MD_11; + private JComboBox jcb_TZM_MD_12; + private JComboBox jcb_TZM_MD_13; + private JComboBox jcb_TZM_MD_2; + private JComboBox jcb_TZM_MD_3; + private JComboBox jcb_TZM_MD_4; + private JComboBox jcb_TZM_MD_5; + private JComboBox jcb_TZM_MD_6; + private JComboBox jcb_TZM_MD_7; + private JComboBox jcb_TZM_MD_8; + private JComboBox jcb_TZM_MD_9; + private JCheckBox jcb_WGZMD_MD_1; + private JCheckBox jcb_WGZMD_MD_10; + private JCheckBox jcb_WGZMD_MD_11; + private JCheckBox jcb_WGZMD_MD_12; + private JCheckBox jcb_WGZMD_MD_13; + private JCheckBox jcb_WGZMD_MD_2; + private JCheckBox jcb_WGZMD_MD_3; + private JCheckBox jcb_WGZMD_MD_4; + private JCheckBox jcb_WGZMD_MD_5; + private JCheckBox jcb_WGZMD_MD_6; + private JCheckBox jcb_WGZMD_MD_7; + private JCheckBox jcb_WGZMD_MD_8; + private JCheckBox jcb_WGZMD_MD_9; + public JScrollPane jsp_NR_MD_1; + private JScrollPane jsp_NR_MD_10; + private JScrollPane jsp_NR_MD_11; + private JScrollPane jsp_NR_MD_12; + private JScrollPane jsp_NR_MD_13; + private JScrollPane jsp_NR_MD_2; + private JScrollPane jsp_NR_MD_3; + private JScrollPane jsp_NR_MD_4; + private JScrollPane jsp_NR_MD_5; + private JScrollPane jsp_NR_MD_6; + private JScrollPane jsp_NR_MD_7; + private JScrollPane jsp_NR_MD_8; + private JScrollPane jsp_NR_MD_9; + private JTable jtb_NR_MD_1; + private JTable jtb_NR_MD_10; + private JTable jtb_NR_MD_11; + private JTable jtb_NR_MD_12; + private JTable jtb_NR_MD_13; + private JTable jtb_NR_MD_2; + private JTable jtb_NR_MD_3; + private JTable jtb_NR_MD_4; + private JTable jtb_NR_MD_5; + private JTable jtb_NR_MD_6; + private JTable jtb_NR_MD_7; + private JTable jtb_NR_MD_8; + private JTable jtb_NR_MD_9; + private JTextField txt_FZ_MD_1; + private JTextField txt_FZ_MD_10; + private JTextField txt_FZ_MD_11; + private JTextField txt_FZ_MD_12; + private JTextField txt_FZ_MD_13; + private JTextField txt_FZ_MD_2; + private JTextField txt_FZ_MD_3; + private JTextField txt_FZ_MD_4; + private JTextField txt_FZ_MD_5; + private JTextField txt_FZ_MD_6; + private JTextField txt_FZ_MD_7; + private JTextField txt_FZ_MD_8; + private JTextField txt_FZ_MD_9; + private JTextField txt_Title_MD_1; + private JTextField txt_Title_MD_10; + private JTextField txt_Title_MD_11; + private JTextField txt_Title_MD_12; + private JTextField txt_Title_MD_13; + private JTextField txt_Title_MD_2; + private JTextField txt_Title_MD_3; + private JTextField txt_Title_MD_4; + private JTextField txt_Title_MD_5; + private JTextField txt_Title_MD_6; + private JTextField txt_Title_MD_7; + private JTextField txt_Title_MD_8; + private JTextField txt_Title_MD_9; +} diff --git a/src/com/origin/ui/JPanel_JTabelDataEdit.java b/src/com/origin/ui/JPanel_JTabelDataEdit.java new file mode 100644 index 0000000..7a40535 --- /dev/null +++ b/src/com/origin/ui/JPanel_JTabelDataEdit.java @@ -0,0 +1,190 @@ +package com.origin.ui; + +import java.awt.Color; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTable; +import javax.swing.table.DefaultTableModel; +import org.jdesktop.layout.GroupLayout; +import org.jdesktop.layout.GroupLayout.ParallelGroup; +import org.jdesktop.layout.GroupLayout.SequentialGroup; + +public class JPanel_JTabelDataEdit + extends JPanel +{ + AutoCodeMainPanel acmp; + JTable table; + JDialog dialog; + private JButton jButton1; + private JButton jButton2; + private JButton jButton3; + private JScrollPane jScrollPane1; + private JTable jTableSingle; + + public JPanel_JTabelDataEdit() + { + initComponents(); + } + + public JPanel_JTabelDataEdit(JTable table, AutoCodeMainPanel acmp, JDialog dialog) + { + this.dialog = dialog; + this.acmp = acmp; + this.table = table; + initComponents(); + this.jTableSingle.setModel(table.getModel()); + } + + private void initComponents() + { + this.jScrollPane1 = new JScrollPane(); + this.jTableSingle = new JTable(); + this.jButton1 = new JButton(); + this.jButton2 = new JButton(); + this.jButton3 = new JButton(); + + setBackground(new Color(255, 255, 255)); + setBorder(BorderFactory.createTitledBorder(null, "ݱ༭", + 0, + 0, + new Font("", 0, 12))); + + this.jTableSingle.setFont(new Font("", 0, 12)); + this.jTableSingle.setModel(new DefaultTableModel( + new Object[][] { new Object[2] }, + new String[] { "ڲֵ", "ʾֵ" })); + this.jTableSingle + .addPropertyChangeListener(new PropertyChangeListener() + { + public void propertyChange(PropertyChangeEvent evt) + { + JPanel_JTabelDataEdit.this.jTableSinglePropertyChange(evt); + } + }); + this.jScrollPane1.setViewportView(this.jTableSingle); + + this.jButton1.setBackground(new Color(255, 255, 255)); + this.jButton1.setFont(new Font("", 0, 12)); + this.jButton1.setText("ȷ"); + this.jButton1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + JPanel_JTabelDataEdit.this.jButton1ActionPerformed(evt); + } + }); + this.jButton2.setBackground(new Color(255, 255, 255)); + this.jButton2.setFont(new Font("", 0, 12)); + this.jButton2.setText(""); + this.jButton2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + JPanel_JTabelDataEdit.this.jButton2ActionPerformed(evt); + } + }); + this.jButton3.setBackground(new Color(255, 255, 255)); + this.jButton3.setFont(new Font("", 0, 12)); + this.jButton3.setText("ر"); + this.jButton3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + JPanel_JTabelDataEdit.this.jButton3ActionPerformed(evt); + } + }); + GroupLayout layout = new GroupLayout( + this); + setLayout(layout); + layout + .setHorizontalGroup(layout + .createParallelGroup( + 1) + .add( + layout + .createSequentialGroup() + .addContainerGap() + .add( + layout + .createParallelGroup( + 1) + .add( + this.jScrollPane1, + -1, + 614, + 32767) + .add( + 2, + layout + .createSequentialGroup() + .add( + this.jButton1, + -2, + 116, + -2) + .addPreferredGap( + 0, + 370, + 32767) + .add( + this.jButton2) + .addPreferredGap( + 1) + .add( + this.jButton3))) + .addContainerGap())); + layout + .setVerticalGroup(layout + .createParallelGroup( + 1) + .add( + layout + .createSequentialGroup() + .addContainerGap() + .add( + this.jScrollPane1, + -2, + -1, + -2) + .addPreferredGap( + 0, + 11, 32767) + .add( + layout + .createParallelGroup( + 3) + .add(this.jButton2).add( + this.jButton3).add( + this.jButton1)) + .addContainerGap())); + } + + private void jTableSinglePropertyChange(PropertyChangeEvent evt) + { + this.acmp.controlTheTable(this.table); + this.acmp.removeNotFinalDatas(this.table); + } + + private void jButton3ActionPerformed(ActionEvent evt) + { + this.dialog.dispose(); + } + + private void jButton2ActionPerformed(ActionEvent evt) + { + this.acmp.clearAllData(this.table); + } + + private void jButton1ActionPerformed(ActionEvent evt) + { + this.dialog.dispose(); + } +} diff --git a/src/com/origin/ui/KCharacterStringParser.java b/src/com/origin/ui/KCharacterStringParser.java new file mode 100644 index 0000000..36140cd --- /dev/null +++ b/src/com/origin/ui/KCharacterStringParser.java @@ -0,0 +1,39 @@ +package com.origin.ui; + +import java.io.PrintStream; + +public class KCharacterStringParser +{ + public String orgContentFromTowMarker(String str_Left, String str_Right, String str_in) + { + String str_result = null; + int i_left = str_in.indexOf(str_Left); + int i_right = str_in.indexOf(str_Right); + System.out.println("orgContentFromTowMarker\n[i_left]" + + i_left + + "\n[i_right]" + i_right); + if ((i_left == -1) || (i_right == -1)) { + return ""; + } + str_result = str_in.substring(i_left + 1, i_right); + return str_result; + } + + public String orgContentFromLeftMarker(String str_Left, String str_in) + { + String str_result = null; + if (str_in.indexOf(str_Left) == -1) { + return str_in; + } + try + { + str_result = str_in.split(str_Left)[0]; + } + catch (Exception e) + { + e.printStackTrace(); + str_result = ""; + } + return str_result; + } +} diff --git a/src/com/origin/ui/OrgInputDialog.java b/src/com/origin/ui/OrgInputDialog.java new file mode 100644 index 0000000..96ec5c6 --- /dev/null +++ b/src/com/origin/ui/OrgInputDialog.java @@ -0,0 +1,94 @@ +package com.origin.ui; + +import com.teamcenter.rac.aif.AbstractAIFDialog; +import com.teamcenter.rac.util.MessageBox; +import java.awt.BorderLayout; +import java.awt.Container; +import java.awt.Dialog; +import java.awt.GridLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.JButton; +import javax.swing.JComboBox; +import javax.swing.JPanel; +import javax.swing.JTextField; + +public class OrgInputDialog + extends AbstractAIFDialog +{ + JPanel p_main; + public JTextField txt_main; + public JTextField txt_description; + public JComboBox comb_code; + JButton btn_ok; + JButton btn_cancel; + GridLayout gridlayout; + public boolean b_falg = false; + + public OrgInputDialog(Dialog dialog, boolean arg1, String str_title) + { + super(dialog, arg1); + setTitle(str_title); + init(); + } + + public void init() + { + this.gridlayout = new GridLayout(2, 1); + this.p_main = new JPanel(); + this.p_main.setLayout(this.gridlayout); + this.txt_main = new JTextField(35); + this.txt_description = new JTextField(35); + this.comb_code = new JComboBox(new Object[] { "", "" }); + this.comb_code.setEditable(true); + JPanel p_temp2 = new JPanel(); + p_temp2.setLayout(new BorderLayout()); + JPanel p_main_des = new JPanel(); + p_main_des.add(this.txt_main); + p_main_des.add(this.txt_description); + p_temp2.add("Center", p_main_des); + JPanel p_code = new JPanel(); + p_code.add(this.comb_code); + p_temp2.add("East", p_code); + this.p_main.add(p_temp2); + this.btn_ok = new JButton("ȷ"); + this.btn_cancel = new JButton(""); + JPanel p_temp = new JPanel(); + p_temp.add(this.btn_ok); + p_temp.add(this.btn_cancel); + this.p_main.add(p_temp); + getContentPane().add(this.p_main); + pack(); + actioninit(); + } + + public void actioninit() + { + this.btn_ok.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent arg0) + { + if (OrgInputDialog.this.txt_main.getText().trim().equals("")) + { + new MessageBox("ڵֲΪգ", "", "", 2, true).setVisible(true); + } + else if (OrgInputDialog.this.comb_code.getSelectedItem().toString().equals("")) + { + new MessageBox("벻Ϊգ", "", "", 2, true).setVisible(true); + } + else + { + OrgInputDialog.this.b_falg = true; + OrgInputDialog.this.dispose(); + } + } + }); + this.btn_cancel.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) + { + OrgInputDialog.this.dispose(); + } + }); + } +} diff --git a/src/com/origin/ui/OrgSingleTreeEditDialog.java b/src/com/origin/ui/OrgSingleTreeEditDialog.java new file mode 100644 index 0000000..eca97e1 --- /dev/null +++ b/src/com/origin/ui/OrgSingleTreeEditDialog.java @@ -0,0 +1,28 @@ +package com.origin.ui; + +import com.teamcenter.rac.aif.AbstractAIFDialog; +import java.awt.Dialog; +import javax.swing.JOptionPane; +import javax.swing.JScrollPane; +import javax.swing.JTree; + +public class OrgSingleTreeEditDialog + extends AbstractAIFDialog +{ + Dialog dialog; + boolean flag; + JTree t_main; + AutoCodeMainPanel acmp; + + public OrgSingleTreeEditDialog(Dialog dialog, boolean flag, JTree t_main, AutoCodeMainPanel acmp, int i_index, JScrollPane jsp_in) + { + super(dialog, flag); + this.t_main = t_main; + if (t_main == null) { + JOptionPane.showMessageDialog(null, "222222"); + } + add(new SingleTreeEditPanel(t_main, acmp, this, i_index, jsp_in)); + setLocation(150, 150); + pack(); + } +} diff --git a/src/com/origin/ui/OriginAutoCodeMainUI.java b/src/com/origin/ui/OriginAutoCodeMainUI.java new file mode 100644 index 0000000..22f82c8 --- /dev/null +++ b/src/com/origin/ui/OriginAutoCodeMainUI.java @@ -0,0 +1,32 @@ +package com.origin.ui; + +import com.teamcenter.rac.aif.AbstractAIFDialog; +import com.teamcenter.rac.kernel.TCSession; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Toolkit; +import java.util.HashMap; +import javax.swing.DefaultListModel; +import javax.swing.JList; + +public class OriginAutoCodeMainUI + extends AbstractAIFDialog +{ + Dimension dimension; + public JList typeListBox; + TCSession session; + protected HashMap typeToIcon; + public DefaultListModel typeListModel; + + public OriginAutoCodeMainUI(boolean arg0, TCSession session) + { + super(arg0); + this.session = session; + this.dimension = getContentPane().getToolkit().getScreenSize(); + + add(new AutoCodeMainPanel(session, this)); + pack(); + setLocation(150, 150); + setTitle("Զ򴴽"); + } +} diff --git a/src/com/origin/ui/OriginSingleTableDialog.java b/src/com/origin/ui/OriginSingleTableDialog.java new file mode 100644 index 0000000..1558c6f --- /dev/null +++ b/src/com/origin/ui/OriginSingleTableDialog.java @@ -0,0 +1,22 @@ +package com.origin.ui; + +import com.teamcenter.rac.aif.AbstractAIFDialog; +import java.awt.Dialog; +import javax.swing.JTable; + +public class OriginSingleTableDialog + extends AbstractAIFDialog +{ + Dialog dialog; + boolean flag; + JTable table; + AutoCodeMainPanel acmp; + + public OriginSingleTableDialog(Dialog dialog, boolean flag, JTable table, AutoCodeMainPanel acmp) + { + super(dialog, flag); + add(new JPanel_JTabelDataEdit(table, acmp, this)); + setLocation(150, 150); + pack(); + } +} diff --git a/src/com/origin/ui/SingleTreeEditPanel.java b/src/com/origin/ui/SingleTreeEditPanel.java new file mode 100644 index 0000000..99b73ea --- /dev/null +++ b/src/com/origin/ui/SingleTreeEditPanel.java @@ -0,0 +1,149 @@ +package com.origin.ui; + +import java.awt.Color; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTree; +import javax.swing.JViewport; +import javax.swing.event.AncestorEvent; +import javax.swing.event.AncestorListener; +import org.jdesktop.layout.GroupLayout; +import org.jdesktop.layout.GroupLayout.ParallelGroup; +import org.jdesktop.layout.GroupLayout.SequentialGroup; + +public class SingleTreeEditPanel + extends JPanel +{ + AutoCodeMainPanel acmp; + JDialog dialog; + JTree t_main; + int i_index; + JScrollPane jsp_in; + private JButton jButton1; + private JButton jButton2; + private JButton jButton3; + private JScrollPane jScrollPane1; + private JTree t_temp; + + public SingleTreeEditPanel() + { + initComponents(); + + initMyTree(); + } + + public SingleTreeEditPanel(JTree t_main, AutoCodeMainPanel acmp, JDialog dialog, int i_index, JScrollPane jsp_in) + { + this.dialog = dialog; + this.t_main = t_main; + this.acmp = acmp; + this.i_index = i_index; + this.jsp_in = jsp_in; + initComponents(); + initMyTree(); + } + + private void initComponents() + { + this.jButton1 = new JButton(); + this.jButton2 = new JButton(); + this.jButton3 = new JButton(); + this.jScrollPane1 = new JScrollPane(); + this.t_temp = new JTree(); + + setBackground(new Color(255, 255, 255)); + setBorder(BorderFactory.createTitledBorder(null, "ݱ༭", 0, 0, new Font("", 0, 12))); + + this.jButton1.setBackground(new Color(255, 255, 255)); + this.jButton1.setFont(new Font("", 0, 12)); + this.jButton1.setText("ȷ"); + this.jButton1.setVisible(false); + this.jButton2.setBackground(new Color(255, 255, 255)); + this.jButton2.setFont(new Font("", 0, 12)); + this.jButton2.setText(""); + this.jButton2.setVisible(false); + this.jButton3.setBackground(new Color(255, 255, 255)); + this.jButton3.setFont(new Font("", 0, 12)); + this.jButton3.setText("ر"); + this.jButton3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent evt) + { + SingleTreeEditPanel.this.jButton3ActionPerformed(evt); + } + }); + this.jButton3.addAncestorListener(new AncestorListener() + { + public void ancestorMoved(AncestorEvent evt) {} + + public void ancestorAdded(AncestorEvent evt) {} + + public void ancestorRemoved(AncestorEvent evt) + { + SingleTreeEditPanel.this.jButton3AncestorRemoved(evt); + } + }); + this.jScrollPane1.setViewportView(this.t_temp); + + GroupLayout layout = new GroupLayout(this); + setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(1) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(1) + .add(this.jScrollPane1, -1, 614, 32767) + .add(layout.createSequentialGroup() + .add(this.jButton1, -2, 116, -2) + .addPreferredGap(0, 370, 32767) + .add(this.jButton2) + .addPreferredGap(1) + .add(this.jButton3))) + .addContainerGap())); + + layout.setVerticalGroup( + layout.createParallelGroup(1) + .add(2, layout.createSequentialGroup() + .add(this.jScrollPane1, -1, 439, 32767) + .addPreferredGap(0) + .add(layout.createParallelGroup(3) + .add(this.jButton2) + .add(this.jButton3) + .add(this.jButton1)) + .addContainerGap())); + } + + private void jButton3ActionPerformed(ActionEvent evt) + { + this.jsp_in.getViewport().removeAll(); + this.jsp_in.getViewport().add(this.t_main); + this.jsp_in.repaint(); + this.jsp_in.updateUI(); + this.acmp.mi_big[(this.i_index - 1)].setEnabled(true); + this.dialog.dispose(); + } + + private void jButton3AncestorRemoved(AncestorEvent evt) + { + this.jsp_in.getViewport().removeAll(); + this.jsp_in.getViewport().add(this.t_main); + this.jsp_in.repaint(); + this.jsp_in.updateUI(); + this.acmp.mi_big[(this.i_index - 1)].setEnabled(true); + } + + public void initMyTree() + { + this.jScrollPane1.getViewport().removeAll(); + this.jScrollPane1.getViewport().add(this.t_main); + this.jScrollPane1.repaint(); + this.jScrollPane1.updateUI(); + } +} diff --git a/src/com/origin/ui/images/BiaoTi_16.png b/src/com/origin/ui/images/BiaoTi_16.png new file mode 100644 index 0000000..2443c09 Binary files /dev/null and b/src/com/origin/ui/images/BiaoTi_16.png differ diff --git a/src/com/origin/ui/images/Cancel2_16.png b/src/com/origin/ui/images/Cancel2_16.png new file mode 100644 index 0000000..139a0f0 Binary files /dev/null and b/src/com/origin/ui/images/Cancel2_16.png differ diff --git a/src/com/origin/ui/images/Cancel_16.png b/src/com/origin/ui/images/Cancel_16.png new file mode 100644 index 0000000..ff7184c Binary files /dev/null and b/src/com/origin/ui/images/Cancel_16.png differ diff --git a/src/com/origin/ui/images/ClearAll_16.png b/src/com/origin/ui/images/ClearAll_16.png new file mode 100644 index 0000000..f565838 Binary files /dev/null and b/src/com/origin/ui/images/ClearAll_16.png differ diff --git a/src/com/origin/ui/images/Document_16.png b/src/com/origin/ui/images/Document_16.png new file mode 100644 index 0000000..0c0654f Binary files /dev/null and b/src/com/origin/ui/images/Document_16.png differ diff --git a/src/com/origin/ui/images/FangDaBiaoGe_16.png b/src/com/origin/ui/images/FangDaBiaoGe_16.png new file mode 100644 index 0000000..6569be4 Binary files /dev/null and b/src/com/origin/ui/images/FangDaBiaoGe_16.png differ diff --git a/src/com/origin/ui/images/Hand_16.png b/src/com/origin/ui/images/Hand_16.png new file mode 100644 index 0000000..377d49c Binary files /dev/null and b/src/com/origin/ui/images/Hand_16.png differ diff --git a/src/com/origin/ui/images/Item_16.png b/src/com/origin/ui/images/Item_16.png new file mode 100644 index 0000000..6ff9793 Binary files /dev/null and b/src/com/origin/ui/images/Item_16.png differ diff --git a/src/com/origin/ui/images/JY.png b/src/com/origin/ui/images/JY.png new file mode 100644 index 0000000..7cece7e Binary files /dev/null and b/src/com/origin/ui/images/JY.png differ diff --git a/src/com/origin/ui/images/LeiXing_16.png b/src/com/origin/ui/images/LeiXing_16.png new file mode 100644 index 0000000..b654efd Binary files /dev/null and b/src/com/origin/ui/images/LeiXing_16.png differ diff --git a/src/com/origin/ui/images/MaDuan_16.png b/src/com/origin/ui/images/MaDuan_16.png new file mode 100644 index 0000000..d69c659 Binary files /dev/null and b/src/com/origin/ui/images/MaDuan_16.png differ diff --git a/src/com/origin/ui/images/SpecElement_16.png b/src/com/origin/ui/images/SpecElement_16.png new file mode 100644 index 0000000..040d46f Binary files /dev/null and b/src/com/origin/ui/images/SpecElement_16.png differ diff --git a/src/com/origin/ui/images/Sure_16.png b/src/com/origin/ui/images/Sure_16.png new file mode 100644 index 0000000..f7a63ad Binary files /dev/null and b/src/com/origin/ui/images/Sure_16.png differ diff --git a/src/com/origin/ui/images/Title2_16.png b/src/com/origin/ui/images/Title2_16.png new file mode 100644 index 0000000..0a382c2 Binary files /dev/null and b/src/com/origin/ui/images/Title2_16.png differ diff --git a/src/com/origin/ui/images/Title3_16.png b/src/com/origin/ui/images/Title3_16.png new file mode 100644 index 0000000..2443c09 Binary files /dev/null and b/src/com/origin/ui/images/Title3_16.png differ diff --git a/src/com/origin/ui/images/Title_16.png b/src/com/origin/ui/images/Title_16.png new file mode 100644 index 0000000..615fab1 Binary files /dev/null and b/src/com/origin/ui/images/Title_16.png differ diff --git a/src/com/origin/ui/images/WorkspaceObject_16.png b/src/com/origin/ui/images/WorkspaceObject_16.png new file mode 100644 index 0000000..df98919 Binary files /dev/null and b/src/com/origin/ui/images/WorkspaceObject_16.png differ diff --git a/src/com/origin/ui/images/ZhuCanShu_16.png b/src/com/origin/ui/images/ZhuCanShu_16.png new file mode 100644 index 0000000..62e5afe Binary files /dev/null and b/src/com/origin/ui/images/ZhuCanShu_16.png differ diff --git a/src/com/origin/ui/images/a.gif b/src/com/origin/ui/images/a.gif new file mode 100644 index 0000000..5be27cb Binary files /dev/null and b/src/com/origin/ui/images/a.gif differ diff --git a/src/com/origin/ui/images/a_Finish1.gif b/src/com/origin/ui/images/a_Finish1.gif new file mode 100644 index 0000000..113092e Binary files /dev/null and b/src/com/origin/ui/images/a_Finish1.gif differ diff --git a/src/com/origin/ui/images/back_16.png b/src/com/origin/ui/images/back_16.png new file mode 100644 index 0000000..8a1e6bf Binary files /dev/null and b/src/com/origin/ui/images/back_16.png differ diff --git a/src/com/origin/ui/images/bomline_16.png b/src/com/origin/ui/images/bomline_16.png new file mode 100644 index 0000000..d61354a Binary files /dev/null and b/src/com/origin/ui/images/bomline_16.png differ diff --git a/src/com/origin/ui/images/close_16.png b/src/com/origin/ui/images/close_16.png new file mode 100644 index 0000000..52ec28b Binary files /dev/null and b/src/com/origin/ui/images/close_16.png differ diff --git a/src/com/origin/ui/images/deleterule_16.png b/src/com/origin/ui/images/deleterule_16.png new file mode 100644 index 0000000..82b316f Binary files /dev/null and b/src/com/origin/ui/images/deleterule_16.png differ diff --git a/src/com/origin/ui/images/help_16.png b/src/com/origin/ui/images/help_16.png new file mode 100644 index 0000000..4d9be0c Binary files /dev/null and b/src/com/origin/ui/images/help_16.png differ diff --git a/src/com/origin/ui/images/info_24.png b/src/com/origin/ui/images/info_24.png new file mode 100644 index 0000000..48dd7d0 Binary files /dev/null and b/src/com/origin/ui/images/info_24.png differ diff --git a/src/com/origin/ui/images/main_16.png b/src/com/origin/ui/images/main_16.png new file mode 100644 index 0000000..e0c9ac6 Binary files /dev/null and b/src/com/origin/ui/images/main_16.png differ diff --git a/src/com/origin/ui/images/n_Finish1.gif b/src/com/origin/ui/images/n_Finish1.gif new file mode 100644 index 0000000..094f8cd Binary files /dev/null and b/src/com/origin/ui/images/n_Finish1.gif differ diff --git a/src/com/origin/ui/images/next_16.png b/src/com/origin/ui/images/next_16.png new file mode 100644 index 0000000..68c8218 Binary files /dev/null and b/src/com/origin/ui/images/next_16.png differ diff --git a/src/com/origin/ui/images/origin.png b/src/com/origin/ui/images/origin.png new file mode 100644 index 0000000..e93303d Binary files /dev/null and b/src/com/origin/ui/images/origin.png differ diff --git a/src/com/origin/ui/images/origin_assign.png b/src/com/origin/ui/images/origin_assign.png new file mode 100644 index 0000000..c5747be Binary files /dev/null and b/src/com/origin/ui/images/origin_assign.png differ diff --git a/src/com/origin/ui/images/origin_auto_code.png b/src/com/origin/ui/images/origin_auto_code.png new file mode 100644 index 0000000..e434f2d Binary files /dev/null and b/src/com/origin/ui/images/origin_auto_code.png differ diff --git a/src/com/origin/ui/images/origin_field_1_16.png b/src/com/origin/ui/images/origin_field_1_16.png new file mode 100644 index 0000000..7510b03 Binary files /dev/null and b/src/com/origin/ui/images/origin_field_1_16.png differ diff --git a/src/com/origin/ui/images/origin_field_2_16.png b/src/com/origin/ui/images/origin_field_2_16.png new file mode 100644 index 0000000..f2f5233 Binary files /dev/null and b/src/com/origin/ui/images/origin_field_2_16.png differ diff --git a/src/com/origin/ui/images/origin_field_4_16.png b/src/com/origin/ui/images/origin_field_4_16.png new file mode 100644 index 0000000..e434f2d Binary files /dev/null and b/src/com/origin/ui/images/origin_field_4_16.png differ diff --git a/src/com/origin/ui/images/origin_field_5_16.png b/src/com/origin/ui/images/origin_field_5_16.png new file mode 100644 index 0000000..34c88bf Binary files /dev/null and b/src/com/origin/ui/images/origin_field_5_16.png differ diff --git a/src/com/origin/ui/images/origin_field_6_16.png b/src/com/origin/ui/images/origin_field_6_16.png new file mode 100644 index 0000000..61e0457 Binary files /dev/null and b/src/com/origin/ui/images/origin_field_6_16.png differ diff --git a/src/com/origin/ui/images/origin_field_7_16.png b/src/com/origin/ui/images/origin_field_7_16.png new file mode 100644 index 0000000..c61b69c Binary files /dev/null and b/src/com/origin/ui/images/origin_field_7_16.png differ diff --git a/src/com/origin/ui/images/origin_field_8_16.png b/src/com/origin/ui/images/origin_field_8_16.png new file mode 100644 index 0000000..3057ef6 Binary files /dev/null and b/src/com/origin/ui/images/origin_field_8_16.png differ diff --git a/src/com/origin/ui/images/origin_filed_3_16.png b/src/com/origin/ui/images/origin_filed_3_16.png new file mode 100644 index 0000000..5d3ae6c Binary files /dev/null and b/src/com/origin/ui/images/origin_filed_3_16.png differ diff --git a/src/com/origin/ui/images/origin_log.jpg b/src/com/origin/ui/images/origin_log.jpg new file mode 100644 index 0000000..e93303d Binary files /dev/null and b/src/com/origin/ui/images/origin_log.jpg differ diff --git a/src/com/origin/ui/images/other_16.png b/src/com/origin/ui/images/other_16.png new file mode 100644 index 0000000..8c77b6c Binary files /dev/null and b/src/com/origin/ui/images/other_16.png differ diff --git a/src/com/origin/ui/images/p_Finish1.gif b/src/com/origin/ui/images/p_Finish1.gif new file mode 100644 index 0000000..b8baf01 Binary files /dev/null and b/src/com/origin/ui/images/p_Finish1.gif differ diff --git a/src/com/teamcenter/rac/common/actions/SearchAction.java b/src/com/teamcenter/rac/common/actions/SearchAction.java new file mode 100644 index 0000000..d62ff7c --- /dev/null +++ b/src/com/teamcenter/rac/common/actions/SearchAction.java @@ -0,0 +1,36 @@ +package com.teamcenter.rac.common.actions; + +import com.teamcenter.rac.aif.AbstractAIFCommand; +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.aif.common.actions.AbstractAIFAction; +import com.teamcenter.rac.util.Registry; +import java.io.PrintStream; + +public class SearchAction + extends AbstractAIFAction +{ + private AbstractAIFUIApplication app; + + public SearchAction(AbstractAIFUIApplication app, String arg2) + { + super(app, arg2); + this.app = app; + } + + public void run() + { + try + { + System.out.println("************SearchAction***************"); + String commandKey = getCommandKey(); + + AbstractAIFCommand cmd = (AbstractAIFCommand)this.registry + .newInstanceFor(commandKey, new Object[] { this.parent, this.app }); + cmd.executeModal(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } +} diff --git a/src/com/teamcenter/rac/common/actions/SearchCommand.java b/src/com/teamcenter/rac/common/actions/SearchCommand.java new file mode 100644 index 0000000..02f4c1e --- /dev/null +++ b/src/com/teamcenter/rac/common/actions/SearchCommand.java @@ -0,0 +1,52 @@ +package com.teamcenter.rac.common.actions; + +import com.origin.beans.KelsenStartWindow; +import com.origin.ui.OriginAutoCodeMainUI; +import com.teamcenter.rac.aif.AbstractAIFApplication; +import com.teamcenter.rac.aif.AbstractAIFCommand; +import com.teamcenter.rac.aif.kernel.AIFComponentContext; +import com.teamcenter.rac.kernel.TCComponent; +import com.teamcenter.rac.kernel.TCSession; +import java.awt.Frame; + +public class SearchCommand + extends AbstractAIFCommand +{ + public TCSession session; + public AbstractAIFApplication application; + public Frame parentFrame; + public int i = 0; + KelsenStartWindow ksw; + + public SearchCommand(Frame frame, AbstractAIFApplication abstractaifapplication) + { + this.application = abstractaifapplication; + this.session = ((TCSession)this.application.getSession()); + AIFComponentContext[] aifcomponentcontext = this.application.getTargetContexts(); + TCComponent[] targetcomponents = new TCComponent[aifcomponentcontext.length]; + for (int i = 0; i < aifcomponentcontext.length; i++) { + targetcomponents[i] = ((TCComponent)aifcomponentcontext[i].getComponent()); + } + if (this.i == 0) + { + this.ksw = new KelsenStartWindow(33); + this.ksw.start(); + this.i += 1; + } + else + { + this.ksw = new KelsenStartWindow(8); + this.ksw.start(); + } + try + { + OriginAutoCodeMainUI oacmui = new OriginAutoCodeMainUI(true, this.session); + oacmui.setVisible(true); + } + catch (Exception e) + { + e.printStackTrace(); + } + this.ksw.stop(); + } +} diff --git a/src/com/teamcenter/rac/common/actions/SearchDialog.java b/src/com/teamcenter/rac/common/actions/SearchDialog.java new file mode 100644 index 0000000..d09ecb8 --- /dev/null +++ b/src/com/teamcenter/rac/common/actions/SearchDialog.java @@ -0,0 +1,144 @@ + +package com.teamcenter.rac.common.actions; + +import com.teamcenter.rac.aif.AbstractAIFDialog; +import com.teamcenter.rac.aif.InterfaceAIFOperationListener; +import com.teamcenter.rac.kernel.TCComponent; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.util.ButtonLayout; +import com.teamcenter.rac.util.DateButton; +import com.teamcenter.rac.util.PropertyLayout; +import com.teamcenter.rac.util.Separator; +import com.teamcenter.rac.util.VerticalLayout; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Frame; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.PrintStream; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; + +public class SearchDialog + extends AbstractAIFDialog + implements InterfaceAIFOperationListener, ActionListener +{ + private TCSession session; + private TCComponent[] targetTCcomponents; + private JTextField obj_lx; + private JTextField obj_mc; + private DateButton obj_sj; + private JTextField obj_owner; + private String lx; + private String mc; + private String sj; + private String owner; + + public SearchDialog(Frame arg0, TCSession s, TCComponent[] targetComponents) + { + super(true); + this.session = s; + this.targetTCcomponents = targetComponents; + + initDialog(); + } + + public SearchDialog(TCComponent targetComponents) + { + super(true); + System.out.println("SearchDialog========111================"); + initDialog(); + } + + public void initDialog() + { + System.out.println("SearchDialog========================"); + JPanel mainPanel = new JPanel(new VerticalLayout(5, 2, 2, 2, 2)); + getContentPane().add(mainPanel); + JPanel topPanel = new JPanel(new PropertyLayout()); + + + this.obj_lx = new JTextField(23); + this.obj_mc = new JTextField(23); + + + this.obj_owner = new JTextField(23); + this.obj_sj = new DateButton(); + topPanel.add("1.1.center", new JLabel("")); + topPanel.add("1.2.center", this.obj_mc); + topPanel.add("2.1.center", new JLabel("")); + topPanel.add("2.2.center", this.obj_lx); + topPanel.add("3.1.center", new JLabel("")); + topPanel.add("3.2.center", this.obj_owner); + topPanel.add("4.1.center", new JLabel("󴴽ʱ")); + topPanel.add("4.2.center", this.obj_sj); + + JPanel botPanel = new JPanel(); + botPanel.setLayout(new ButtonLayout(1, + 1, 10)); + JButton ok_button = new JButton("ȷ"); + ok_button.setActionCommand("ȷ"); + ok_button.addActionListener(this); + JButton cannel_button = new JButton("ȡ"); + cannel_button.setActionCommand("ȡ"); + cannel_button.addActionListener(this); + botPanel.add(ok_button); + botPanel.add(cannel_button); + mainPanel.add("top.bind", new Separator()); + mainPanel.add("top.bind", topPanel); + mainPanel.add("top.bind", new Separator()); + mainPanel.add("bottom.nobind.center.center", botPanel); + } + + public void setMyCustomLayout() + { + Dimension myDim = new Dimension(300, 180); + setPreferredSize(myDim); + centerToScreen(1.0D, 1.0D); + pack(); + } + + public void endOperation() {} + + public void startOperation(String arg0) {} + + public void startCreateOperation() + { + SearchOperation assignPrintOperation = new SearchOperation(this.session, this.mc, + this.lx, this.sj, this.owner, this.targetTCcomponents); + assignPrintOperation.addOperationListener(this); + this.session.queueOperation(assignPrintOperation); + } + + public void actionPerformed(ActionEvent e) + { + if (e.getActionCommand().equals("ȷ")) + { + setVisible(false); + dispose(); + System.out.println("============search ok======================"); + try + { + this.mc = this.obj_mc.getText().trim(); + + this.sj = this.obj_sj.getDateString(); + + System.out.println("owner===========" + this.owner); + + + startCreateOperation(); + } + catch (Exception e1) + { + e1.printStackTrace(); + } + } + else if (e.getActionCommand().equals("ȡ")) + { + setVisible(false); + dispose(); + } + } +} diff --git a/src/com/teamcenter/rac/common/actions/SearchOperation.java b/src/com/teamcenter/rac/common/actions/SearchOperation.java new file mode 100644 index 0000000..bbd614d --- /dev/null +++ b/src/com/teamcenter/rac/common/actions/SearchOperation.java @@ -0,0 +1,304 @@ +package com.teamcenter.rac.common.actions; + +import com.teamcenter.rac.aif.AbstractAIFOperation; +import com.teamcenter.rac.aif.AbstractAIFUIApplication; +import com.teamcenter.rac.aif.kernel.AIFComponentContext; +import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent; +import com.teamcenter.rac.kernel.TCClassService; +import com.teamcenter.rac.kernel.TCComponent; +import com.teamcenter.rac.kernel.TCComponentFolder; +import com.teamcenter.rac.kernel.TCComponentFolderType; +import com.teamcenter.rac.kernel.TCComponentUser; +import com.teamcenter.rac.kernel.TCException; +import com.teamcenter.rac.kernel.TCSession; +import com.teamcenter.rac.kernel.TCTypeService; +import java.io.PrintStream; +import java.util.Vector; + +public class SearchOperation + extends AbstractAIFOperation +{ + private TCSession session; + private String str_mc = ""; + private String str_lx = ""; + private String str_sj = ""; + private String str_owner = ""; + private TCComponent[] targetComponents; + private String currentUser; + private Vector v2 = new Vector(); + private AbstractAIFUIApplication app; + + public SearchOperation(TCSession session, String str_mc, String str_lx, String str_sj, String str_owner, TCComponent[] targetComponents) + { + this.session = session; + try + { + this.currentUser = session.getUser().toString(); + } + catch (Exception e) + { + e.printStackTrace(); + } + this.str_mc = str_mc; + this.str_lx = str_lx; + if (str_sj == null) { + this.str_sj = ""; + } else { + this.str_sj = formatTimes(str_sj); + } + this.str_owner = str_owner; + this.targetComponents = targetComponents; + } + + public void executeOperation() + throws Exception + { + try + { + System.out.println("strmc======" + this.str_mc); + System.out.println("str_lx======" + this.str_lx); + System.out.println("str_sj======" + this.str_sj); + System.out.println("str_owner======" + this.str_owner); + this.v2.removeAllElements(); + queryObject(this.targetComponents[0]); + System.out.println("v2======" + this.v2); + TCComponentFolder folder = getResultFolder("Ŀ¼ĵѯб"); + removeAllItems(folder); + TCComponent[] result = new TCComponent[this.v2.size()]; + int v2_size = this.v2.size(); + for (int k = 0; k < v2_size; k++) { + result[k] = ((TCComponent)this.v2.get(k)); + } + if (result.length > 0) { + folder.add("contents", result); + } + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public TCComponentFolder getResultFolder(String foldername) + { + TCComponentFolder folder = getFolder(foldername); + try + { + if (folder == null) + { + TCTypeService type = this.session.getTypeService(); + TCComponentFolderType foldertype = (TCComponentFolderType)type + .getTypeComponent("Folder"); + return foldertype.create(foldername, "", + "Folder"); + } + return folder; + } + catch (TCException e) + { + e.printStackTrace(); + } + return folder; + } + + public TCComponentFolder getFolder(String name) + { + TCComponent[] aimancomponent = (TCComponent[])null; + TCComponentFolder item = null; + String searchClass = "Folder"; + String[] searchAttributes = { "object_name" }; + String[] searchStrings = { name }; + try + { + TCClassService imanclassservice = this.session.getClassService(); + aimancomponent = imanclassservice.findByClassMulti(searchClass, + searchAttributes, searchStrings); + if (aimancomponent.length >= 0) { + for (int i = 0; i < aimancomponent.length; i++) + { + TCComponentFolder fo = (TCComponentFolder)aimancomponent[i]; + String folder_user = fo.getProperty("owning_user"); + if (folder_user.equals(this.currentUser)) { + item = (TCComponentFolder)aimancomponent[i]; + } + } + } else { + return null; + } + } + catch (TCException e) + { + e.printStackTrace(); + } + return item; + } + + public void removeAllItems(TCComponentFolder folder) + { + try + { + AIFComponentContext[] context = folder.getChildren(); + TCComponent[] component = new TCComponent[context.length]; + for (int i = 0; i < context.length; i++) { + component[i] = ((TCComponent)context[i].getComponent()); + } + folder.remove("contents", component); + } + catch (TCException e) + { + e.printStackTrace(); + } + } + + public void queryObject(TCComponent tccomponent) + { + try + { + AIFComponentContext[] aif = tccomponent.getChildren(); + for (int i = 0; i < aif.length; i++) + { + InterfaceAIFComponent inter = aif[i].getComponent(); + String object_name = inter.getProperty("object_name"); + String object_type = inter.getProperty("object_type"); + String owning_user = inter.getProperty("owning_user"); + if ((owning_user != null) && (!"".equals(owning_user))) { + owning_user = owning_user.substring(owning_user.indexOf("(") + 1, owning_user.indexOf(")")); + } + String creation_date = formatTimes(inter.getProperty("creation_date")); + if (("".equals(this.str_mc)) || ("*".equals(this.str_mc))) { + object_name = this.str_mc; + } + if (("".equals(this.str_lx)) || ("*".equals(this.str_lx))) { + object_type = this.str_lx; + } + if (("".equals(this.str_owner)) || ("*".equals(this.str_owner))) { + owning_user = this.str_owner; + } + if ((this.str_mc.startsWith("*")) && (this.str_mc.endsWith("*"))) + { + String new_str_mc = this.str_mc.replace("*", " ").trim(); + if ((object_name.indexOf(new_str_mc) >= 0) && (object_type.equals(this.str_lx)) && + (owning_user.equals(this.str_owner)) && ( + (creation_date.equals(this.str_sj)) || ("".equals(this.str_sj)))) { + this.v2.add((TCComponent)inter); + } + } + else if ((this.str_mc.startsWith("*")) && (!this.str_mc.endsWith("*"))) + { + String new_str_mc = this.str_mc.replace("*", " ").trim(); + if ((object_name.endsWith(new_str_mc)) && (object_type.equals(this.str_lx)) && + (owning_user.equals(this.str_owner)) && ( + (creation_date.equals(this.str_sj)) || ("".equals(this.str_sj)))) { + this.v2.add((TCComponent)inter); + } + } + else if ((!this.str_mc.startsWith("*")) && (this.str_mc.endsWith("*"))) + { + String new_str_mc = this.str_mc.replace("*", " ").trim(); + if ((object_name.startsWith(new_str_mc)) && (object_type.equals(this.str_lx)) && + (owning_user.equals(this.str_owner)) && ( + (creation_date.equals(this.str_sj)) || ("".equals(this.str_sj)))) { + this.v2.add((TCComponent)inter); + } + } + else if ((!this.str_mc.startsWith("*")) && (!this.str_mc.endsWith("*")) && + (object_name.equals(this.str_mc)) && (object_type.equals(this.str_lx)) && + (owning_user.equals(this.str_owner)) && ( + (creation_date.equals(this.str_sj)) || ("".equals(this.str_sj)))) + { + this.v2.add((TCComponent)inter); + } + queryObject((TCComponent)inter); + } + } + catch (TCException e) + { + e.printStackTrace(); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + public String formatTimes(String times) + { + if ("".equals(times)) { + return ""; + } + String date = times.split("-")[0]; + String month = times.split("-")[1]; + String year = times.split("-")[2]; + new StringBuilder(String.valueOf(year.split(":")[0])).append(":").append(year.split(":")[1]).toString(); + if ("1".equals(date)) { + date = "01"; + } else if ("2".equals(date)) { + date = "02"; + } else if ("3".equals(date)) { + date = "03"; + } else if ("4".equals(date)) { + date = "04"; + } else if ("5".equals(date)) { + date = "05"; + } else if ("6".equals(date)) { + date = "06"; + } else if ("7".equals(date)) { + date = "07"; + } else if ("8".equals(date)) { + date = "08"; + } else if ("9".equals(date)) { + date = "09"; + } + if ("һ".equals(month)) { + month = "Jan"; + } else if ("".equals(month)) { + month = "Feb"; + } else if ("".equals(month)) { + month = "Mar"; + } else if ("".equals(month)) { + month = "Apr"; + } else if ("".equals(month)) { + month = "May"; + } else if ("".equals(month)) { + month = "Jun"; + } else if ("".equals(month)) { + month = "Jul"; + } else if ("".equals(month)) { + month = "Aug"; + } else if ("".equals(month)) { + month = "Sep"; + } else if ("ʮ".equals(month)) { + month = "Oct"; + } else if ("ʮһ".equals(month)) { + month = "Nov"; + } else if ("ʮ".equals(month)) { + month = "Dec"; + } + if ("1".equals(month)) { + month = "Jan"; + } else if ("2".equals(month)) { + month = "Feb"; + } else if ("3".equals(month)) { + month = "Mar"; + } else if ("4".equals(month)) { + month = "Apr"; + } else if ("5".equals(month)) { + month = "May"; + } else if ("6".equals(month)) { + month = "Jun"; + } else if ("7".equals(month)) { + month = "Jul"; + } else if ("8".equals(month)) { + month = "Aug"; + } else if ("9".equals(month)) { + month = "Sep"; + } else if ("10".equals(month)) { + month = "Oct"; + } else if ("11".equals(month)) { + month = "Nov"; + } else if ("12".equals(month)) { + month = "Dec"; + } + return date + "-" + month; + } +} diff --git a/src/com/teamcenter/rac/common/actions/actions_user.properties b/src/com/teamcenter/rac/common/actions/actions_user.properties new file mode 100644 index 0000000..a6ed1cf --- /dev/null +++ b/src/com/teamcenter/rac/common/actions/actions_user.properties @@ -0,0 +1,15 @@ +gzReport=com.teamcenter.rac.common.actions.GzhzbReportAction +gjReport=com.teamcenter.rac.common.actions.GjhzbReportAction +rjReport=com.teamcenter.rac.common.actions.RjhzbReportAction +ljReport=com.teamcenter.rac.common.actions.LjhzbReportAction +sbReport=com.teamcenter.rac.common.actions.SbhzbReportAction +xyReportBOM=com.teamcenter.rac.common.actions.XyReportBOMAction +xyReportWLSj=com.teamcenter.rac.common.actions.XyReportWLSJAction +xyReportBOMMXB=com.teamcenter.rac.common.actions.XyReportBOMMXBAction +xyReportBOMGX=com.teamcenter.rac.common.actions.XyReportBOMGXAction + +import=com.teamcenter.rac.workflow.common.common,com.teamcenter.rac.workflow.common.actions.actions, com.teamcenter.rac.ecmanagement.dialogs.dialogs,com.teamcenter.rac.ideasnavigator.actions.actions,com.teamcenter.rac.ets.actions.actions,com.teamcenter.rac.schedule.schedule,com.teamcenter.rac.scm.common.actions.actions,com.teamcenter.rac.commands.publish.publish +MyAction=com.teamcenter.rac.common.actions.SearchAction +MyAction.ICON=images/newitem_16.png +MyAction.COMMAND=searchCommand +searchCommand=com.teamcenter.rac.common.actions.SearchCommand \ No newline at end of file diff --git a/src/org/jdesktop/layout/Baseline.java b/src/org/jdesktop/layout/Baseline.java new file mode 100644 index 0000000..2486d2a --- /dev/null +++ b/src/org/jdesktop/layout/Baseline.java @@ -0,0 +1,779 @@ +package org.jdesktop.layout; + +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Insets; +import java.awt.Rectangle; +import java.awt.Toolkit; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Collections; +import java.util.Dictionary; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import javax.swing.AbstractButton; +import javax.swing.ComboBoxEditor; +import javax.swing.Icon; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JProgressBar; +import javax.swing.JScrollPane; +import javax.swing.JSlider; +import javax.swing.JSpinner; +import javax.swing.JSpinner.DefaultEditor; +import javax.swing.JTabbedPane; +import javax.swing.JTable; +import javax.swing.JTextArea; +import javax.swing.JTextField; +import javax.swing.JTree; +import javax.swing.JViewport; +import javax.swing.ListCellRenderer; +import javax.swing.SwingUtilities; +import javax.swing.border.Border; +import javax.swing.border.EmptyBorder; +import javax.swing.border.TitledBorder; +import javax.swing.plaf.TextUI; +import javax.swing.plaf.metal.MetalLookAndFeel; +import javax.swing.text.JTextComponent; +import javax.swing.text.View; + +public class Baseline +{ + private static final Rectangle viewRect = new Rectangle(); + private static final Rectangle textRect = new Rectangle(); + private static final Rectangle iconRect = new Rectangle(); + private static final int EDGE_SPACING = 2; + private static final int TEXT_SPACING = 2; + private static final Insets EMPTY_INSETS = new Insets(0, 0, 0, 0); + private static JLabel TABLE_LABEL; + private static JLabel LIST_LABEL; + private static JLabel TREE_LABEL; + private static Class CLASSIC_WINDOWS; + private static boolean checkedForClassic; + private static final Map BASELINE_MAP = Collections.synchronizedMap(new HashMap()); + private static Method COMPONENT_BASELINE_METHOD = null; + + static + { + try + { + COMPONENT_BASELINE_METHOD = Component.class.getMethod( + "getBaseline", new Class[] { Integer.TYPE, Integer.TYPE }); + } + catch (NoSuchMethodException localNoSuchMethodException) {} + } + + public static int getBaseline(JComponent component) + { + Dimension pref = component.getPreferredSize(); + return getBaseline(component, pref.width, pref.height); + } + + private static Method getBaselineMethod(JComponent component) + { + if (COMPONENT_BASELINE_METHOD != null) { + return COMPONENT_BASELINE_METHOD; + } + Class klass = component.getClass(); + while (klass != null) + { + if (BASELINE_MAP.containsKey(klass)) + { + Method method = (Method)BASELINE_MAP.get(klass); + return method; + } + klass = klass.getSuperclass(); + } + klass = component.getClass(); + Method[] methods = klass.getMethods(); + for (int i = methods.length - 1; i >= 0; i--) + { + Method method = methods[i]; + if ("getBaseline".equals(method.getName())) + { + Class[] params = method.getParameterTypes(); + if ((params.length == 2) && (params[0] == Integer.TYPE) && + (params[1] == Integer.TYPE)) + { + BASELINE_MAP.put(klass, method); + return method; + } + } + } + BASELINE_MAP.put(klass, null); + return null; + } + + private static int invokeBaseline(Method method, JComponent c, int width, int height) + { + int baseline = -1; + try + { + baseline = + + ((Integer)method.invoke(c, new Object[] { new Integer(width), new Integer(height) })).intValue(); + } + catch (IllegalAccessException localIllegalAccessException) {}catch (IllegalArgumentException localIllegalArgumentException) {}catch (InvocationTargetException localInvocationTargetException) {} + return baseline; + } + + public static int getBaseline(JComponent component, int width, int height) + { + return -1; + } + + private static Insets rotateInsets(Insets topInsets, int targetPlacement) + { + switch (targetPlacement) + { + case 2: + return new Insets(topInsets.left, topInsets.top, + topInsets.right, topInsets.bottom); + case 3: + return new Insets(topInsets.bottom, topInsets.left, + topInsets.top, topInsets.right); + case 4: + return new Insets(topInsets.left, topInsets.bottom, + topInsets.right, topInsets.top); + } + return new Insets(topInsets.top, topInsets.left, + topInsets.bottom, topInsets.right); + } + + private static int getMaxTabHeight(JTabbedPane tp) + { + int fontHeight = tp.getFontMetrics(tp.getFont()).getHeight(); + int height = fontHeight; + boolean tallerIcons = false; + for (int counter = tp.getTabCount() - 1; counter >= 0; counter--) + { + Icon icon = tp.getIconAt(counter); + if (icon != null) + { + int iconHeight = icon.getIconHeight(); + height = Math.max(height, iconHeight); + if (iconHeight > fontHeight) { + tallerIcons = true; + } + } + } + Insets tabInsets = new Insets(6, 6, 6, 6); + height += 2; + if ((!isMetal()) || (!tallerIcons)) { + height += tabInsets.top + tabInsets.bottom; + } + return height; + } + + private static int getTabbedPaneBaseline(JTabbedPane tp, int height) + { + if (tp.getTabCount() > 0) + { + if (isAqua()) { + return getAquaTabbedPaneBaseline(tp, height); + } + Insets insets = tp.getInsets(); + new Insets(6, 6, 6, 6); + + Insets tabAreaInsets = rotateInsets(new Insets(6, 6, 6, 6), + + tp.getTabPlacement()); + FontMetrics metrics = tp.getFontMetrics(tp.getFont()); + int maxHeight = getMaxTabHeight(tp); + iconRect.setBounds(0, 0, 0, 0); + textRect.setBounds(0, 0, 0, 0); + viewRect.setBounds(0, 0, 32767, maxHeight); + SwingUtilities.layoutCompoundLabel(tp, metrics, "A", null, + 0, + 0, + 0, + 11, + viewRect, + iconRect, + textRect, + 0); + int baseline = textRect.y + metrics.getAscent(); + switch (tp.getTabPlacement()) + { + case 1: + baseline += insets.top + tabAreaInsets.top; + if (isWindows()) { + if (tp.getTabCount() > 1) { + baseline++; + } else { + baseline--; + } + } + return baseline; + case 3: + baseline = tp.getHeight() - insets.bottom - + tabAreaInsets.bottom - maxHeight + baseline; + if (isWindows()) { + if (tp.getTabCount() > 1) { + baseline--; + } else { + baseline++; + } + } + return baseline; + case 2: + case 4: + if (isAqua()) { + return -1; + } + baseline += insets.top + tabAreaInsets.top; + if (isWindows()) { + baseline += maxHeight % 2; + } + return baseline; + } + } + return -1; + } + + private static int getAquaTabbedPaneBaseline(JTabbedPane tp, int height) + { + Font font = tp.getFont(); + FontMetrics metrics = tp.getFontMetrics(font); + int ascent = metrics.getAscent(); + switch (tp.getTabPlacement()) + { + case 1: + int offset = 5; + if (tp.getFont().getSize() > 12) { + offset = 6; + } + int yOffset = 20 - metrics.getHeight(); + yOffset /= 2; + return offset + yOffset + ascent - 1; + case 3: + // int offset; + // int offset; + if (tp.getFont().getSize() > 12) { + offset = 6; + } else { + offset = 4; + } + return height - (20 - ( + (20 - metrics.getHeight()) / 2 + ascent)) - offset; + case 2: + case 4: + return -1; + } + return -1; + } + + private static int getSliderBaseline(JSlider slider, int height) + { + if (isAqua()) { + return -1; + } + if ((slider.getPaintLabels()) && (!isGTK())) + { + FontMetrics metrics = slider.getFontMetrics(slider.getFont()); + Insets insets = slider.getInsets(); + Insets focusInsets = new Insets(6, 6, 6, 6); + if (slider.getOrientation() == 0) + { + int tickLength = 8; + int contentHeight = height - insets.top - insets.bottom - + focusInsets.top - focusInsets.bottom; + int thumbHeight = 20; + if (isMetal()) + { + tickLength = 10; + + thumbHeight = 8; + } + else if ((isWindows()) && (isXP())) + { + thumbHeight++; + } + int centerSpacing = thumbHeight; + if (slider.getPaintTicks()) { + centerSpacing += tickLength; + } + centerSpacing += metrics.getAscent() + metrics.getDescent(); + int trackY = insets.top + focusInsets.top + + (contentHeight - centerSpacing - 1) / 2; + int trackHeight = thumbHeight; + int tickY = trackY + trackHeight; + int tickHeight = tickLength; + if (!slider.getPaintTicks()) { + tickHeight = 0; + } + int labelY = tickY + tickHeight; + if ((!slider.getPaintTicks()) && (isAqua())) { + labelY += 4; + } + return labelY + metrics.getAscent(); + } + boolean inverted = slider.getInverted(); + Integer value = inverted ? getMinSliderValue(slider) : + getMaxSliderValue(slider); + if (value != null) + { + int thumbHeight = 11; + if (isMetal()) { + thumbHeight = 10; + } + int trackBuffer = Math.max(metrics.getHeight() / 2, + thumbHeight / 2); + int contentY = focusInsets.top + insets.top; + int trackY = contentY + trackBuffer; + int trackHeight = height - focusInsets.top - + focusInsets.bottom - insets.top - insets.bottom - + trackBuffer - trackBuffer; + getMaxSliderValue(slider).intValue(); + int min = slider.getMinimum(); + int max = slider.getMaximum(); + double valueRange = max - min; + double pixelsPerValue = trackHeight / + valueRange; + int trackBottom = trackY + (trackHeight - 1); + int yPosition; + if (!inverted) + { + yPosition = trackY; + + yPosition = (int)(yPosition + Math.round(pixelsPerValue * (max - value.intValue()))); + } + else + { + yPosition = trackY; + + yPosition = (int)(yPosition + Math.round(pixelsPerValue * (value.intValue() - min))); + } + yPosition = Math.max(trackY, yPosition); + yPosition = Math.min(trackBottom, yPosition); + return yPosition - metrics.getHeight() / 2 + + metrics.getAscent(); + } + } + return -1; + } + + private static Integer getMaxSliderValue(JSlider slider) + { + Dictionary dictionary = slider.getLabelTable(); + if (dictionary != null) + { + Enumeration keys = dictionary.keys(); + int max = slider.getMinimum() - 1; + while (keys.hasMoreElements()) { + max = Math.max(max, ((Integer)keys.nextElement()).intValue()); + } + if (max == slider.getMinimum() - 1) { + return null; + } + return new Integer(max); + } + return null; + } + + private static Integer getMinSliderValue(JSlider slider) + { + Dictionary dictionary = slider.getLabelTable(); + if (dictionary != null) + { + Enumeration keys = dictionary.keys(); + int min = slider.getMaximum() + 1; + while (keys.hasMoreElements()) { + min = Math.min(min, ((Integer)keys.nextElement()).intValue()); + } + if (min == slider.getMaximum() + 1) { + return null; + } + return new Integer(min); + } + return null; + } + + private static int getProgressBarBaseline(JProgressBar pb, int height) + { + if ((pb.isStringPainted()) && + (pb.getOrientation() == 0)) + { + FontMetrics metrics = pb.getFontMetrics(pb.getFont()); + Insets insets = pb.getInsets(); + int y = insets.top; + if ((isWindows()) && (isXP())) + { + if (pb.isIndeterminate()) + { + y = -1; + height--; + } + else + { + y = 0; + height -= 3; + } + } + else + { + if (isGTK()) { + return (height - metrics.getAscent() - + metrics.getDescent()) / 2 + metrics.getAscent(); + } + if (isAqua()) + { + if (pb.isIndeterminate()) { + return -1; + } + y--; + height -= insets.top + insets.bottom; + } + else + { + height -= insets.top + insets.bottom; + } + } + return y + + + (height + metrics.getAscent() - metrics.getLeading() - metrics.getDescent()) / 2; + } + return -1; + } + + private static int getTreeBaseline(JTree tree, int height) + { + int rowHeight = tree.getRowHeight(); + if (TREE_LABEL == null) + { + TREE_LABEL = new JLabel("X"); + TREE_LABEL.setIcon(null); + } + JLabel label = TREE_LABEL; + label.setFont(tree.getFont()); + if (rowHeight <= 0) { + rowHeight = label.getPreferredSize().height; + } + return getLabelBaseline(label, rowHeight) + tree.getInsets().top; + } + + private static int getTableBaseline(JTable table, int height) + { + if (TABLE_LABEL == null) + { + TABLE_LABEL = new JLabel(""); + TABLE_LABEL.setBorder(new EmptyBorder(1, 1, 1, 1)); + } + JLabel label = TABLE_LABEL; + label.setFont(table.getFont()); + int rowMargin = table.getRowMargin(); + int baseline = getLabelBaseline(label, table.getRowHeight() - + rowMargin); + return baseline += rowMargin / 2; + } + + private static int getTextAreaBaseline(JTextArea text, int height) + { + Insets insets = text.getInsets(); + FontMetrics fm = text.getFontMetrics(text.getFont()); + return insets.top + fm.getAscent(); + } + + private static int getListBaseline(JList list, int height) + { + int rowHeight = list.getFixedCellHeight(); + if (LIST_LABEL == null) + { + LIST_LABEL = new JLabel("X"); + LIST_LABEL.setBorder(new EmptyBorder(1, 1, 1, 1)); + } + JLabel label = LIST_LABEL; + label.setFont(list.getFont()); + if (rowHeight == -1) { + rowHeight = label.getPreferredSize().height; + } + return getLabelBaseline(label, rowHeight) + list.getInsets().top; + } + + private static int getScrollPaneBaseline(JScrollPane sp, int height) + { + Component view = sp.getViewport().getView(); + if ((view instanceof JComponent)) + { + int baseline = getBaseline((JComponent)view); + if (baseline > 0) { + return baseline + sp.getViewport().getY(); + } + } + return -1; + } + + private static int getPanelBaseline(JPanel panel, int height) + { + Border border = panel.getBorder(); + if ((border instanceof TitledBorder)) + { + TitledBorder titledBorder = (TitledBorder)border; + if ((titledBorder.getTitle() != null) && + (!"".equals(titledBorder.getTitle()))) + { + Font font = titledBorder.getTitleFont(); + if (font == null) + { + font = panel.getFont(); + if (font == null) { + font = new Font("Dialog", 0, 12); + } + } + Border border2 = titledBorder.getBorder(); + // Insets borderInsets; + Insets borderInsets; + if (border2 != null) { + borderInsets = border2.getBorderInsets(panel); + } else { + borderInsets = EMPTY_INSETS; + } + FontMetrics fm = panel.getFontMetrics(font); + int fontHeight = fm.getHeight(); + int descent = fm.getDescent(); + int ascent = fm.getAscent(); + int y = 2; + int h = height - 4; + switch (((TitledBorder)border).getTitlePosition()) + { + case 1: + int diff = ascent + descent + (Math.max(2, + 4) - 2); + return y + diff - (descent + 2); + case 0: + case 2: + diff = Math.max(0, ascent / 2 + 2 - + 2); + return y + diff - descent + + (borderInsets.top + ascent + descent) / 2; + case 3: + return y + borderInsets.top + ascent + 2; + case 4: + return y + h - ( + borderInsets.bottom + descent + 2); + case 5: + h -= fontHeight / 2; + return y + h - descent + + (ascent + descent - borderInsets.bottom) / 2; + case 6: + h -= fontHeight; + return y + h + ascent + 2; + } + } + } + return -1; + } + + private static int getSpinnerBaseline(JSpinner spinner, int height) + { + JComponent editor = spinner.getEditor(); + if ((editor instanceof JSpinner.DefaultEditor)) + { + JSpinner.DefaultEditor defaultEditor = (JSpinner.DefaultEditor) + editor; + JTextField tf = defaultEditor.getTextField(); + Insets spinnerInsets = spinner.getInsets(); + Insets editorInsets = defaultEditor.getInsets(); + int offset = spinnerInsets.top + editorInsets.top; + height -= offset + spinnerInsets.bottom + editorInsets.bottom; + if (height <= 0) { + return -1; + } + return offset + getSingleLineTextBaseline(tf, height); + } + Insets insets = spinner.getInsets(); + FontMetrics fm = spinner.getFontMetrics(spinner.getFont()); + return insets.top + fm.getAscent(); + } + + private static int getLabelBaseline(JLabel label, int height) + { + Icon icon = label.isEnabled() ? label.getIcon() : + label.getDisabledIcon(); + FontMetrics fm = label.getFontMetrics(label.getFont()); + + resetRects(label, height); + + SwingUtilities.layoutCompoundLabel(label, fm, + "a", icon, label.getVerticalAlignment(), + label.getHorizontalAlignment(), label.getVerticalTextPosition(), + label.getHorizontalTextPosition(), viewRect, iconRect, textRect, + label.getIconTextGap()); + + return textRect.y + fm.getAscent(); + } + + private static int getComboBoxBaseline(JComboBox combobox, int height) + { + Insets insets = combobox.getInsets(); + int y = insets.top; + height -= insets.top + insets.bottom; + if (combobox.isEditable()) + { + ComboBoxEditor editor = combobox.getEditor(); + if ((editor != null) && ((editor.getEditorComponent() instanceof JTextField))) + { + JTextField tf = (JTextField)editor.getEditorComponent(); + return y + getSingleLineTextBaseline(tf, height); + } + } + if (isMetal()) + { + if (isOceanTheme()) + { + y += 2; + height -= 4; + } + } + else if (isWindows()) + { + String osVersion = System.getProperty("os.version"); + if (osVersion != null) + { + Float version = Float.valueOf(osVersion); + if (version.floatValue() > 4.0D) + { + y += 2; + height -= 4; + } + } + } + ListCellRenderer renderer = combobox.getRenderer(); + if ((renderer instanceof JLabel)) + { + int baseline = y + getLabelBaseline((JLabel)renderer, height); + if (isAqua()) { + return baseline - 1; + } + return baseline; + } + FontMetrics fm = combobox.getFontMetrics(combobox.getFont()); + return y + fm.getAscent(); + } + + private static int getSingleLineTextBaseline(JTextComponent textComponent, int h) + { + View rootView = textComponent.getUI().getRootView(textComponent); + if (rootView.getViewCount() > 0) + { + Insets insets = textComponent.getInsets(); + int height = h - insets.top - insets.bottom; + int y = insets.top; + View fieldView = rootView.getView(0); + int vspan = (int)fieldView.getPreferredSpan(1); + if (height != vspan) + { + int slop = height - vspan; + y += slop / 2; + } + FontMetrics fm = textComponent.getFontMetrics( + textComponent.getFont()); + y += fm.getAscent(); + return y; + } + return -1; + } + + private static int getButtonBaseline(AbstractButton button, int height) + { + FontMetrics fm = button.getFontMetrics(button.getFont()); + + resetRects(button, height); + + String text = button.getText(); + if ((text != null) && (text.startsWith(""))) { + return -1; + } + SwingUtilities.layoutCompoundLabel( + button, fm, "a", button.getIcon(), + button.getVerticalAlignment(), button.getHorizontalAlignment(), + button.getVerticalTextPosition(), + button.getHorizontalTextPosition(), + viewRect, iconRect, textRect, + text == null ? 0 : button.getIconTextGap()); + if (isAqua()) { + return textRect.y + fm.getAscent() + 1; + } + return textRect.y + fm.getAscent(); + } + + private static void resetRects(JComponent c, int height) + { + Insets insets = c.getInsets(); + viewRect.x = insets.left; + viewRect.y = insets.top; + viewRect.width = (c.getWidth() - (insets.right + viewRect.x)); + viewRect.height = (height - (insets.bottom + viewRect.y)); + textRect.x = (textRect.y = textRect.width = textRect.height = 0); + iconRect.x = (iconRect.y = iconRect.width = iconRect.height = 0); + } + + private static boolean isOceanTheme() + { + try + { + Field field = MetalLookAndFeel.class.getDeclaredField("currentTheme"); + field.setAccessible(true); + Object theme = field.get(null); + return "javax.swing.plaf.metal.OceanTheme".equals(theme.getClass().getName()); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + return false; + } + + private static boolean isWindows() + { + return true; + } + + private static boolean isMetal() + { + return false; + } + + private static boolean isGTK() + { + return false; + } + + private static boolean isAqua() + { + return false; + } + + private static boolean isXP() + { + if (!checkedForClassic) + { + try + { + CLASSIC_WINDOWS = Class.forName( + "com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel"); + } + catch (ClassNotFoundException localClassNotFoundException) {} + checkedForClassic = true; + } + Toolkit toolkit = Toolkit.getDefaultToolkit(); + Boolean themeActive = (Boolean)toolkit.getDesktopProperty( + "win.xpstyle.themeActive"); + if (themeActive == null) { + themeActive = Boolean.FALSE; + } + return themeActive.booleanValue(); + } + + public int getComponentBaseline(JComponent component, int width, int height) + { + return -1; + } +} diff --git a/src/org/jdesktop/layout/GroupLayout.java b/src/org/jdesktop/layout/GroupLayout.java new file mode 100644 index 0000000..24d25f0 --- /dev/null +++ b/src/org/jdesktop/layout/GroupLayout.java @@ -0,0 +1,2095 @@ +package org.jdesktop.layout; + +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Insets; +import java.awt.LayoutManager2; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import javax.swing.JComponent; + +public class GroupLayout + implements LayoutManager2 +{ + private static final int MIN_SIZE = 0; + private static final int PREF_SIZE = 1; + private static final int MAX_SIZE = 2; + private static final int UNSET = -2147483648; + public static final int HORIZONTAL = 1; + public static final int VERTICAL = 2; + private static final int NO_ALIGNMENT = 0; + public static final int LEADING = 1; + public static final int TRAILING = 2; + public static final int CENTER = 3; + public static final int BASELINE = 3; + public static final int DEFAULT_SIZE = -1; + public static final int PREFERRED_SIZE = -2; + private boolean autocreatePadding; + private boolean autocreateContainerPadding; + private Group horizontalGroup; + private Group verticalGroup; + private Map componentInfos; + private Container host; + private List parallelList; + private boolean springsAdded; + private boolean hasPreferredPaddingSprings; + + private static void checkSize(int min, int pref, int max, boolean isComponentSpring) + { + checkResizeType(min, isComponentSpring); + if ((!isComponentSpring) && (pref < 0)) { + throw new IllegalArgumentException("Pref must be >= 0"); + } + checkResizeType(max, isComponentSpring); + checkLessThan(min, pref); + checkLessThan(min, max); + checkLessThan(pref, max); + } + + private static void checkResizeType(int type, boolean isComponentSpring) + { + if ((type < 0) && (((isComponentSpring) && (type != -1) && + (type != -2)) || ( + (!isComponentSpring) && (type != -2)))) { + throw new IllegalArgumentException("Invalid size"); + } + } + + private static void checkLessThan(int min, int max) + { + if ((min >= 0) && (max >= 0) && (min > max)) { + throw new IllegalArgumentException( + "Following is not met: min<=pref<=max"); + } + } + + private static void checkAlignment(int alignment, boolean allowsBaseline) + { + if ((alignment == 1) || (alignment == 2) || + (alignment == 3)) { + return; + } + if ((allowsBaseline) && (alignment != 3)) { + throw new IllegalArgumentException("Alignment must be one of:LEADING, TRAILING, CENTER or BASELINE"); + } + throw new IllegalArgumentException("Alignment must be one of:LEADING, TRAILING or CENTER"); + } + + public GroupLayout(Container host) + { + if (host == null) { + throw new IllegalArgumentException("Container must be non-null"); + } + this.host = host; + setHorizontalGroup(createParallelGroup(1, true)); + setVerticalGroup(createParallelGroup(1, true)); + this.componentInfos = new HashMap(); + this.autocreatePadding = false; + this.parallelList = new ArrayList(); + } + + public String toString() + { + StringBuffer buffer = new StringBuffer(); + buffer.append("HORIZONTAL\n"); + dump(buffer, this.horizontalGroup, " ", 1); + buffer.append("\nVERTICAL\n"); + dump(buffer, this.verticalGroup, " ", 2); + return buffer.toString(); + } + + private void dump(StringBuffer buffer, Spring spring, String indent, int axis) + { + String origin = ""; + String padding = ""; + if ((spring instanceof ComponentSpring)) + { + ComponentSpring cSpring = (ComponentSpring)spring; + origin = Integer.toString(cSpring.getOrigin()) + " "; + String name = cSpring.getComponent().getName(); + if (name != null) { + origin = "name=" + name + ", "; + } + } + if ((spring instanceof AutopaddingSpring)) + { + AutopaddingSpring paddingSpring = (AutopaddingSpring)spring; + padding = ", userCreated=" + paddingSpring.getUserCreated() + + ", matches=" + paddingSpring.getMatchDescription(); + } + buffer.append(indent + spring.getClass().getName() + " " + + Integer.toHexString(spring.hashCode()) + " " + + origin + + ", size=" + spring.getSize() + + ", alignment=" + spring.getAlignment() + + " prefs=[" + spring.getMinimumSize(axis) + + " " + spring.getPreferredSize(axis) + + " " + spring.getMaximumSize(axis) + + padding + "]\n"); + if ((spring instanceof Group)) + { + List springs = ((Group)spring).springs; + indent = indent + " "; + for (int counter = 0; counter < springs.size(); counter++) { + dump(buffer, (Spring)springs.get(counter), indent, axis); + } + } + } + + public void setAutocreateGaps(boolean autocreatePadding) + { + this.autocreatePadding = autocreatePadding; + } + + public boolean getAutocreateGaps() + { + return this.autocreatePadding; + } + + public void setAutocreateContainerGaps(boolean autocreatePadding) + { + if (autocreatePadding != this.autocreateContainerPadding) + { + this.autocreateContainerPadding = autocreatePadding; + this.horizontalGroup = createTopLevelGroup(getHorizontalGroup()); + this.verticalGroup = createTopLevelGroup(getVerticalGroup()); + } + } + + public boolean getAutocreateContainerGaps() + { + return this.autocreateContainerPadding; + } + + public void setHorizontalGroup(Group group) + { + if (group == null) { + throw new IllegalArgumentException("Group must be non-null"); + } + this.horizontalGroup = createTopLevelGroup(group); + } + + public Group getHorizontalGroup() + { + int index = 0; + if (this.horizontalGroup.springs.size() > 1) { + index = 1; + } + return (Group)this.horizontalGroup.springs.get(index); + } + + public void setVerticalGroup(Group group) + { + if (group == null) { + throw new IllegalArgumentException("Group must be non-null"); + } + this.verticalGroup = createTopLevelGroup(group); + } + + public Group getVerticalGroup() + { + int index = 0; + if (this.verticalGroup.springs.size() > 1) { + index = 1; + } + return (Group)this.verticalGroup.springs.get(index); + } + + private Group createTopLevelGroup(Group specifiedGroup) + { + SequentialGroup group = createSequentialGroup(); + if (getAutocreateContainerGaps()) + { + group.addSpring(new ContainerAutopaddingSpring()); + group.add(specifiedGroup); + group.addSpring(new ContainerAutopaddingSpring()); + } + else + { + group.add(specifiedGroup); + } + return group; + } + + public SequentialGroup createSequentialGroup() + { + return new SequentialGroup(); + } + + public ParallelGroup createParallelGroup() + { + return createParallelGroup(1); + } + + public ParallelGroup createParallelGroup(int alignment) + { + return createParallelGroup(alignment, true); + } + + public ParallelGroup createParallelGroup(int alignment, boolean resizable) + { + if (alignment == 3) { + return new BaselineGroup(resizable); + } + return new ParallelGroup(alignment, resizable); + } + + public void linkSize(Component[] components) + { + linkSize(components, 3); + } + + public void linkSize(Component[] components, int axis) + { + if (components == null) { + throw new IllegalArgumentException("Components must be non-null"); + } + boolean horizontal = (axis & 0x1) == 1; + boolean vertical = (axis & 0x2) == 2; + if ((!vertical) && (!horizontal)) { + throw new IllegalArgumentException( + "Axis must contain HORIZONTAL or VERTICAL"); + } + for (int counter = components.length - 1; counter >= 0; counter--) + { + Component c = components[counter]; + if (components[counter] == null) { + throw new IllegalArgumentException( + "Components must be non-null"); + } + getComponentInfo(c); + } + if (horizontal) { + linkSize0(components, 1); + } + if (vertical) { + linkSize0(components, 2); + } + } + + private void linkSize0(Component[] components, int axis) + { + ComponentInfo master = getComponentInfo( + components[(components.length - 1)]).getMasterComponentInfo(axis); + for (int counter = components.length - 2; counter >= 0; counter--) { + master.addChild(getComponentInfo(components[counter]), axis); + } + } + + public void replace(Component existingComponent, Component newComponent) + { + if ((existingComponent == null) || (newComponent == null)) { + throw new IllegalArgumentException("Components must be non-null"); + } + ComponentInfo info = + (ComponentInfo)this.componentInfos.remove(existingComponent); + if (info == null) { + throw new IllegalArgumentException("Component must already exist"); + } + this.host.remove(existingComponent); + this.host.add(newComponent); + info.setComponent(newComponent); + this.componentInfos.put(newComponent, info); + invalidateLayout(this.host); + } + + public void addLayoutComponent(String name, Component component) {} + + public void removeLayoutComponent(Component comp) {} + + public Dimension preferredLayoutSize(Container parent) + { + checkParent(parent); + prepare(1); + return adjustSize(this.horizontalGroup.getPreferredSize(1), + this.verticalGroup.getPreferredSize(2)); + } + + public Dimension minimumLayoutSize(Container parent) + { + checkParent(parent); + prepare(0); + return adjustSize(this.horizontalGroup.getMinimumSize(1), + this.verticalGroup.getMinimumSize(2)); + } + + public void layoutContainer(Container parent) + { + prepare(); + Insets insets = parent.getInsets(); + if ((getAutocreateGaps()) || (getAutocreateContainerGaps()) || + (this.hasPreferredPaddingSprings)) + { + resetAutopadding(this.horizontalGroup, 1, -1, 0, + parent.getWidth() - insets.left - insets.right); + resetAutopadding(this.verticalGroup, 2, -1, 0, + parent.getHeight() - insets.top - insets.bottom); + } + this.horizontalGroup.setSize(1, 0, parent + .getWidth() - insets.left - insets.right); + this.verticalGroup.setSize(2, 0, parent + .getHeight() - insets.top - insets.bottom); + + Iterator componentInfo = this.componentInfos.values().iterator(); + while (componentInfo.hasNext()) + { + ComponentInfo info = (ComponentInfo)componentInfo.next(); + info.getComponent(); + info.setBounds(insets); + } + } + + public void addLayoutComponent(Component component, Object constraints) {} + + public Dimension maximumLayoutSize(Container parent) + { + checkParent(parent); + prepare(2); + return adjustSize(this.horizontalGroup.getMaximumSize(1), + this.verticalGroup.getMaximumSize(2)); + } + + public float getLayoutAlignmentX(Container parent) + { + checkParent(parent); + return 0.5F; + } + + public float getLayoutAlignmentY(Container parent) + { + checkParent(parent); + return 0.5F; + } + + public void invalidateLayout(Container parent) + { + checkParent(parent); + synchronized (parent.getTreeLock()) + { + this.horizontalGroup.setSize(1, -2147483648, -2147483648); + this.verticalGroup.setSize(2, -2147483648, -2147483648); + for (Iterator cis = this.componentInfos.values().iterator(); + cis.hasNext();) + { + ComponentInfo ci = (ComponentInfo)cis.next(); + ci.clear(); + } + } + } + + private void resetAutopadding(Group group, int axis, int sizeType, int origin, int size) + { + group.resetAutopadding(); + switch (sizeType) + { + case 0: + size = group.getMinimumSize(axis); + break; + case 1: + size = group.getPreferredSize(axis); + break; + case 2: + size = group.getMaximumSize(axis); + } + group.setSize(axis, origin, size); + group.calculateAutopadding(axis); + } + + private void prepare(int sizeType) + { + prepare(); + if ((getAutocreateGaps()) || (getAutocreateContainerGaps()) || + (this.hasPreferredPaddingSprings)) + { + resetAutopadding(this.horizontalGroup, 1, sizeType, 0, 0); + resetAutopadding(this.verticalGroup, 2, sizeType, 0, 0); + } + } + + private void prepare() + { + if (this.springsAdded) + { + registerComponents(this.horizontalGroup, 1); + registerComponents(this.verticalGroup, 2); + checkComponents(); + this.horizontalGroup.removeAutopadding(); + this.verticalGroup.removeAutopadding(); + if (getAutocreateGaps()) { + adjustAutopadding(true); + } else if ((this.hasPreferredPaddingSprings) || + (getAutocreateContainerGaps())) { + adjustAutopadding(false); + } + this.springsAdded = false; + } + } + + private void checkComponents() + { + Iterator infos = this.componentInfos.values().iterator(); + while (infos.hasNext()) + { + ComponentInfo info = (ComponentInfo)infos.next(); + if (info.horizontalSpring == null) { + throw new IllegalStateException(info.component + + " is not attached to a horizontal group"); + } + if (info.verticalSpring == null) { + throw new IllegalStateException(info.component + + " is not attached to a vertical group"); + } + } + } + + private void registerComponents(Group group, int axis) + { + List springs = group.springs; + for (int counter = springs.size() - 1; counter >= 0; counter--) + { + Spring spring = (Spring)springs.get(counter); + if ((spring instanceof ComponentSpring)) { + ((ComponentSpring)spring).installIfNecessary(axis); + } else if ((spring instanceof Group)) { + registerComponents((Group)spring, axis); + } + } + } + + private Dimension adjustSize(int width, int height) + { + Insets insets = this.host.getInsets(); + return new Dimension(width + insets.left + insets.right, + height + insets.top + insets.bottom); + } + + private void checkParent(Container parent) + { + if (parent != this.host) { + throw new IllegalArgumentException( + "GroupLayout can only be used with one Container at a time"); + } + } + + private ComponentInfo getComponentInfo(Component component) + { + ComponentInfo info = (ComponentInfo)this.componentInfos.get(component); + if (info == null) + { + this.componentInfos.put(component, new ComponentInfo(component)); + this.host.add(component); + } + return info; + } + + private void adjustAutopadding(boolean insert) + { + this.horizontalGroup.insertAutopadding(1, new ArrayList(1), + new ArrayList(1), new ArrayList(1), new ArrayList(1), insert); + this.verticalGroup.insertAutopadding(2, new ArrayList(1), + new ArrayList(1), new ArrayList(1), new ArrayList(1), insert); + } + + private boolean areParallelSiblings(Component source, Component target, int axis) + { + ComponentInfo sourceInfo = getComponentInfo(source); + ComponentInfo targetInfo = getComponentInfo(target); + Spring targetSpring; + Spring sourceSpring; + // Spring targetSpring; + if (axis == 1) + { + sourceSpring = sourceInfo.horizontalSpring; + targetSpring = targetInfo.horizontalSpring; + } + else + { + sourceSpring = sourceInfo.verticalSpring; + targetSpring = targetInfo.verticalSpring; + } + List sourcePath = this.parallelList; + sourcePath.clear(); + Spring spring = sourceSpring.getParent(); + while (spring != null) + { + sourcePath.add(spring); + spring = spring.getParent(); + } + spring = targetSpring.getParent(); + while (spring != null) + { + if (sourcePath.contains(spring)) + { + while (spring != null) + { + if ((spring instanceof ParallelGroup)) { + return true; + } + spring = spring.getParent(); + } + return false; + } + spring = spring.getParent(); + } + return false; + } + + abstract class Spring + { + private int size; + private int min = this.pref = this.max = -2147483648; + private int max; + private int pref; + private Spring parent; + private int alignment; + + Spring() {} + + abstract int getMinimumSize0(int paramInt); + + abstract int getPreferredSize0(int paramInt); + + abstract int getMaximumSize0(int paramInt); + + void setParent(Spring parent) + { + this.parent = parent; + } + + Spring getParent() + { + return this.parent; + } + + void setAlignment(int alignment) + { + GroupLayout.checkAlignment(alignment, false); + this.alignment = alignment; + } + + int getAlignment() + { + return this.alignment; + } + + final int getMinimumSize(int axis) + { + if (this.min == -2147483648) { + this.min = constrain(getMinimumSize0(axis)); + } + return this.min; + } + + final int getPreferredSize(int axis) + { + if (this.pref == -2147483648) { + this.pref = constrain(getPreferredSize0(axis)); + } + return this.pref; + } + + final int getMaximumSize(int axis) + { + if (this.max == -2147483648) { + this.max = constrain(getMaximumSize0(axis)); + } + return this.max; + } + + void clear() + { + this.size = (this.min = this.pref = this.max = -2147483648); + } + + void setSize(int axis, int origin, int size) + { + this.size = size; + if (size == -2147483648) { + clear(); + } + } + + int getSize() + { + return this.size; + } + + int constrain(int value) + { + return Math.min(value, 32767); + } + } + + public abstract class Group + extends GroupLayout.Spring + { + Group() + { + super(); + } + + List springs = new ArrayList(); + + int indexOf(GroupLayout.Spring spring) + { + return this.springs.indexOf(spring); + } + + Group addSpring(GroupLayout.Spring spring, int index) + { + this.springs.add(spring); + spring.setParent(this); + if (!(spring instanceof GroupLayout.AutopaddingSpring)) { + GroupLayout.this.springsAdded = true; + } + return this; + } + + Group addSpring(GroupLayout.Spring spring) + { + addSpring(spring, this.springs.size()); + return this; + } + + void setParent(GroupLayout.Spring parent) + { + super.setParent(parent); + for (int counter = this.springs.size() - 1; counter >= 0; counter--) { + ((GroupLayout.Spring)this.springs.get(counter)).setParent(this); + } + } + + void setSize(int axis, int origin, int size) + { + super.setSize(axis, origin, size); + if (size == -2147483648) { + for (int counter = this.springs.size() - 1; counter >= 0; counter--) { + getSpring(counter).setSize(axis, origin, size); + } + } else { + setSize0(axis, origin, size); + } + } + + abstract void setSize0(int paramInt1, int paramInt2, int paramInt3); + + int getMinimumSize0(int axis) + { + return calculateSize(axis, 0); + } + + int getPreferredSize0(int axis) + { + return calculateSize(axis, 1); + } + + int getMaximumSize0(int axis) + { + return calculateSize(axis, 2); + } + + abstract int operator(int paramInt1, int paramInt2); + + int calculateSize(int axis, int type) + { + int count = this.springs.size(); + if (count == 0) { + return 0; + } + if (count == 1) { + return getSize(getSpring(0), axis, type); + } + int size = constrain(operator(getSize(getSpring(0), axis, type), + getSize(getSpring(1), axis, type))); + for (int counter = 2; counter < count; counter++) { + size = constrain(operator(size, getSize(getSpring(counter), + axis, type))); + } + return size; + } + + GroupLayout.Spring getSpring(int index) + { + return (GroupLayout.Spring)this.springs.get(index); + } + + int getSize(GroupLayout.Spring spring, int axis, int type) + { + switch (type) + { + case 0: + return spring.getMinimumSize(axis); + case 1: + return spring.getPreferredSize(axis); + case 2: + return spring.getMaximumSize(axis); + } + return 0; + } + + abstract void insertAutopadding(int paramInt, List paramList1, List paramList2, List paramList3, List paramList4, boolean paramBoolean); + + void removeAutopadding() + { + for (int counter = this.springs.size() - 1; counter >= 0; counter--) + { + GroupLayout.Spring spring = (GroupLayout.Spring)this.springs.get(counter); + if ((spring instanceof GroupLayout.AutopaddingSpring)) + { + if (((GroupLayout.AutopaddingSpring)spring).getUserCreated()) { + ((GroupLayout.AutopaddingSpring)spring).reset(); + } else { + this.springs.remove(counter); + } + } + else if ((spring instanceof Group)) { + ((Group)spring).removeAutopadding(); + } + } + } + + void resetAutopadding() + { + clear(); + for (int counter = this.springs.size() - 1; counter >= 0; counter--) + { + GroupLayout.Spring spring = (GroupLayout.Spring)this.springs.get(counter); + if ((spring instanceof GroupLayout.AutopaddingSpring)) { + ((GroupLayout.AutopaddingSpring)spring).clear(); + } else if ((spring instanceof Group)) { + ((Group)spring).resetAutopadding(); + } + } + } + + void calculateAutopadding(int axis) + { + for (int counter = this.springs.size() - 1; counter >= 0; counter--) + { + GroupLayout.Spring spring = (GroupLayout.Spring)this.springs.get(counter); + if ((spring instanceof GroupLayout.AutopaddingSpring)) + { + spring.clear(); + ((GroupLayout.AutopaddingSpring)spring).calculatePadding(axis); + } + else if ((spring instanceof Group)) + { + ((Group)spring).calculateAutopadding(axis); + } + } + clear(); + } + } + + public class SequentialGroup + extends GroupLayout.Group + { + SequentialGroup() + { + super(); + } + + public SequentialGroup add(GroupLayout.Group group) + { + return (SequentialGroup)addSpring(group); + } + + public SequentialGroup add(Component component) + { + return add(component, -1, -1, -1); + } + + public SequentialGroup add(Component component, int min, int pref, int max) + { + return (SequentialGroup)addSpring(new GroupLayout.ComponentSpring( + component, min, pref, max)); + } + + public SequentialGroup add(int pref) + { + return add(pref, pref, pref); + } + + public SequentialGroup add(int min, int pref, int max) + { + return (SequentialGroup)addSpring(new GroupLayout.GapSpring(min, pref, max)); + } + + public SequentialGroup addPreferredGap(JComponent comp1, JComponent comp2, int type) + { + return addPreferredGap(comp1, comp2, type, false); + } + + public SequentialGroup addPreferredGap(JComponent comp1, JComponent comp2, int type, boolean canGrow) + { + if ((type != 0) && + (type != 1) && + (type != 3)) { + throw new IllegalArgumentException("Invalid type argument"); + } + return (SequentialGroup)addSpring(new GroupLayout.PaddingSpring( + comp1, comp2, type, canGrow)); + } + + public SequentialGroup addPreferredGap(int type) + { + return addPreferredGap(type, -1, -1); + } + + public SequentialGroup addPreferredGap(int type, int pref, int max) + { + if ((type != 0) && (type != 1)) { + throw new IllegalArgumentException( + "Padding type must be one of Padding.RELATED or Padding.UNRELATED"); + } + if (((pref < 0) && (pref != -1)) || + ((max < 0) && (max != -1) && (max != -2)) || ( + (pref >= 0) && (max >= 0) && (pref > max))) { + throw new IllegalArgumentException( + "Pref and max must be either DEFAULT_VALUE or >= 0 and pref <= max"); + } + GroupLayout.this.hasPreferredPaddingSprings = true; + return (SequentialGroup)addSpring(new GroupLayout.AutopaddingSpring( + type, pref, max)); + } + + public SequentialGroup addContainerGap() + { + return addContainerGap(-1, -1); + } + + public SequentialGroup addContainerGap(int pref, int max) + { + if (((pref < 0) && (pref != -1)) || + ((max < 0) && (max != -1) && (max != -2)) || ( + (pref >= 0) && (max >= 0) && (pref > max))) { + throw new IllegalArgumentException( + "Pref and max must be either DEFAULT_VALUE or >= 0 and pref <= max"); + } + GroupLayout.this.hasPreferredPaddingSprings = true; + return (SequentialGroup)addSpring( + new GroupLayout.ContainerAutopaddingSpring( pref, max)); + } + + int operator(int a, int b) + { + return constrain(a) + constrain(b); + } + + void setSize0(int axis, int origin, int size) + { + int pref = getPreferredSize(axis); + if (size - pref == 0) + { + int counter = 0; + for (int max = this.springs.size(); counter < max; counter++) + { + GroupLayout.Spring spring = getSpring(counter); + int springPref = spring.getPreferredSize(axis); + spring.setSize(axis, origin, springPref); + origin += springPref; + } + } + else if (this.springs.size() == 1) + { + GroupLayout.Spring spring = getSpring(0); + spring.setSize(axis, origin, Math.min(size, spring + .getMaximumSize(axis))); + } + else if (this.springs.size() > 1) + { + resize(axis, origin, size); + } + } + + private void resize(int axis, int origin, int size) + { + int delta = size - getPreferredSize(axis); + + boolean useMin = delta < 0; + int springCount = this.springs.size(); + if (useMin) { + delta *= -1; + } + List resizable = buildResizableList(axis, useMin); + int resizableCount = resizable.size(); + if (resizableCount > 0) + { + int sDelta = delta / resizableCount; + int slop = delta - sDelta * resizableCount; + int[] sizes = new int[springCount]; + int sign = useMin ? -1 : 1; + for (int counter = 0; counter < resizableCount; counter++) + { + GroupLayout.SpringDelta springDelta = + (GroupLayout.SpringDelta)resizable.get(counter); + if (counter + 1 == resizableCount) { + sDelta += slop; + } + springDelta.delta = Math.min(sDelta, springDelta.delta); + delta -= springDelta.delta; + if ((springDelta.delta != sDelta) && + (counter + 1 < resizableCount)) + { + sDelta = delta / (resizableCount - counter - 1); + slop = delta - sDelta * (resizableCount - counter - 1); + } + getSpring(springDelta.index); + sizes[springDelta.index] = (sign * springDelta.delta); + } + for (int counter = 0; counter < springCount; counter++) + { + GroupLayout.Spring spring = getSpring(counter); + int sSize = spring.getPreferredSize(axis) + sizes[counter]; + spring.setSize(axis, origin, sSize); + origin += sSize; + } + } + else + { + for (int counter = 0; counter < springCount; counter++) + { + GroupLayout.Spring spring = getSpring(counter); + int sSize; + // int sSize; + if (useMin) { + sSize = spring.getMinimumSize(axis); + } else { + sSize = spring.getMaximumSize(axis); + } + spring.setSize(axis, origin, sSize); + origin += sSize; + } + } + } + + private List buildResizableList(int axis, boolean useMin) + { + int size = this.springs.size(); + List sorted = new ArrayList(size); + for (int counter = 0; counter < size; counter++) + { + GroupLayout.Spring spring = getSpring(counter); + int sDelta; + // int sDelta; + if (useMin) { + sDelta = spring.getPreferredSize(axis) - + spring.getMinimumSize(axis); + } else { + sDelta = spring.getMaximumSize(axis) - + spring.getPreferredSize(axis); + } + if (sDelta > 0) { + sorted.add(new GroupLayout.SpringDelta(counter, sDelta)); + } + } + Collections.sort(sorted); + return sorted; + } + + private GroupLayout.AutopaddingSpring getNextAutopadding(int index, boolean insert) + { + GroupLayout.Spring spring = getSpring(index); + if (((spring instanceof GroupLayout.AutopaddingSpring)) && + (((GroupLayout.AutopaddingSpring)spring).getUserCreated())) { + return (GroupLayout.AutopaddingSpring)spring; + } + if (insert) + { + GroupLayout.AutopaddingSpring autoSpring = new GroupLayout.AutopaddingSpring(); + this.springs.add(index, autoSpring); + return autoSpring; + } + return null; + } + + void insertAutopadding(int axis, List leadingPadding, List trailingPadding, List leading, List trailing, boolean insert) + { + List newLeadingPadding = new ArrayList(leadingPadding); + List newTrailingPadding = new ArrayList(1); + List newLeading = new ArrayList(leading); + List newTrailing = null; + for (int counter = 0; counter < this.springs.size(); counter++) + { + GroupLayout.Spring spring = getSpring(counter); + if ((spring instanceof GroupLayout.AutopaddingSpring)) + { + GroupLayout.AutopaddingSpring padding = (GroupLayout.AutopaddingSpring)spring; + padding.setSources(newLeading); + newLeading.clear(); + if (counter + 1 == this.springs.size()) + { + if (!(padding instanceof GroupLayout.ContainerAutopaddingSpring)) { + trailingPadding.add(padding); + } + } + else + { + newLeadingPadding.clear(); + newLeadingPadding.add(padding); + } + } + else if ((newLeading.size() > 0) && (insert)) + { + GroupLayout.AutopaddingSpring padding = new GroupLayout.AutopaddingSpring(); + + + this.springs.add(counter--, padding); + } + else if ((spring instanceof GroupLayout.ComponentSpring)) + { + GroupLayout.ComponentSpring cSpring = (GroupLayout.ComponentSpring)spring; + for (int i = 0; i < newLeadingPadding.size(); i++) { + ((GroupLayout.AutopaddingSpring)newLeadingPadding.get(i)).add( + cSpring, axis); + } + newLeading.clear(); + newLeadingPadding.clear(); + if (counter + 1 == this.springs.size()) { + trailing.add(cSpring); + } else { + newLeading.add(cSpring); + } + } + else if ((spring instanceof GroupLayout.Group)) + { + if (newTrailing == null) { + newTrailing = new ArrayList(1); + } else { + newTrailing.clear(); + } + newTrailingPadding.clear(); + ((GroupLayout.Group)spring).insertAutopadding(axis, newLeadingPadding, + newTrailingPadding, newLeading, newTrailing, + insert); + newLeading.clear(); + newLeadingPadding.clear(); + if (counter + 1 == this.springs.size()) + { + trailing.addAll(newTrailing); + trailingPadding.addAll(newTrailingPadding); + } + else + { + newLeading.addAll(newTrailing); + newLeadingPadding.addAll(newTrailingPadding); + } + } + else + { + newLeadingPadding.clear(); + newLeading.clear(); + } + } + } + } + + private static class SpringDelta + implements Comparable + { + public int index; + public int delta; + + public SpringDelta(int index, int delta) + { + this.index = index; + this.delta = delta; + } + + public int compareTo(Object o) + { + return this.delta - ((SpringDelta)o).delta; + } + + public String toString() + { + return + super.toString() + "[index=" + this.index + ", delta=" + this.delta + "]"; + } + } + + public class ParallelGroup + extends GroupLayout.Group + { + private int childAlignment; + private boolean resizable; + + ParallelGroup(int childAlignment, boolean resizable) + { + super(); + GroupLayout.checkAlignment(childAlignment, true); + this.childAlignment = childAlignment; + this.resizable = resizable; + } + + public ParallelGroup add(GroupLayout.Group group) + { + return (ParallelGroup)addSpring(group); + } + + public ParallelGroup add(Component component) + { + return add(component, -1, -1, -1); + } + + public ParallelGroup add(Component component, int min, int pref, int max) + { + return (ParallelGroup)addSpring(new GroupLayout.ComponentSpring( + component, min, pref, max)); + } + + public ParallelGroup add(int pref) + { + return add(pref, pref, pref); + } + + public ParallelGroup add(int min, int pref, int max) + { + return (ParallelGroup)addSpring(new GroupLayout.GapSpring( min, pref, max)); + } + + public ParallelGroup add(int alignment, GroupLayout.Group group) + { + group.setAlignment(alignment); + return (ParallelGroup)addSpring(group); + } + + public ParallelGroup add(int alignment, Component component) + { + return add(alignment, component, -1, -1, + -1); + } + + public ParallelGroup add(int alignment, Component component, int min, int pref, int max) + { + GroupLayout.ComponentSpring spring = new GroupLayout.ComponentSpring( component, + min, pref, max); + spring.setAlignment(alignment); + return (ParallelGroup)addSpring(spring); + } + + boolean isResizable() + { + return this.resizable; + } + + int operator(int a, int b) + { + return Math.max(a, b); + } + + int getMinimumSize0(int axis) + { + if (!isResizable()) { + return getPreferredSize(axis); + } + return super.getMinimumSize0(axis); + } + + int getMaximumSize0(int axis) + { + if (!isResizable()) { + return getPreferredSize(axis); + } + return super.getMaximumSize0(axis); + } + + void setSize0(int axis, int origin, int size) + { + int alignment = this.childAlignment; + if (alignment == 3) { + alignment = 1; + } + int counter = 0; + for (int max = this.springs.size(); counter < max; counter++) + { + GroupLayout.Spring spring = getSpring(counter); + int sAlignment = spring.getAlignment(); + int springSize = Math.min(size, + spring.getMaximumSize(axis)); + if (sAlignment == 0) { + sAlignment = alignment; + } + switch (sAlignment) + { + case 2: + spring.setSize(axis, origin + size - springSize, + springSize); + break; + case 3: + spring.setSize(axis, origin + + (size - springSize) / 2, springSize); + break; + default: + spring.setSize(axis, origin, springSize); + } + } + } + + void insertAutopadding(int axis, List leadingPadding, List trailingPadding, List leading, List trailing, boolean insert) + { + for (int counter = 0; counter < this.springs.size(); counter++) + { + GroupLayout.Spring spring = getSpring(counter); + if ((spring instanceof GroupLayout.ComponentSpring)) + { + for (int i = 0; i < leadingPadding.size(); i++) { + ((GroupLayout.AutopaddingSpring)leadingPadding.get(i)).add( + (GroupLayout.ComponentSpring)spring, axis); + } + trailing.add(spring); + } + else if ((spring instanceof GroupLayout.Group)) + { + ((GroupLayout.Group)spring).insertAutopadding(axis, leadingPadding, + trailingPadding, leading, trailing, insert); + } + else if ((spring instanceof GroupLayout.AutopaddingSpring)) + { + trailingPadding.add(spring); + } + } + } + } + + private class BaselineGroup + extends GroupLayout.ParallelGroup + { + private boolean allSpringsHaveBaseline; + + BaselineGroup(boolean resizable) + { + super(1, resizable); + } + + private int prefAscent = this.prefDescent = -1; + private int prefDescent; + + void setSize(int axis, int origin, int size) + { + if (size == -2147483648) { + this.prefAscent = (this.prefDescent = -1); + } + super.setSize(axis, origin, size); + } + + void setSize0(int axis, int origin, int size) + { + if ((axis == 1) || (this.prefAscent == -1)) { + super.setSize0(axis, origin, size); + } else { + baselineLayout(origin, size); + } + } + + int calculateSize(int axis, int type) + { + if ((this.springs.size() < 2) || (axis != 2)) { + return super.calculateSize(axis, type); + } + if (this.prefAscent == -1) { + calculateBaseline(); + } + if (this.allSpringsHaveBaseline) { + return this.prefAscent + this.prefDescent; + } + return Math.max(this.prefAscent + this.prefDescent, + super.calculateSize(axis, type)); + } + + private void calculateBaseline() + { + this.prefAscent = 0; + this.prefDescent = 0; + this.allSpringsHaveBaseline = true; + for (int counter = this.springs.size() - 1; counter >= 0; counter--) + { + GroupLayout.Spring spring = getSpring(counter); + int baseline = -1; + if ((spring instanceof GroupLayout.ComponentSpring)) + { + baseline = ((GroupLayout.ComponentSpring)spring).getBaseline(); + if (baseline >= 0) + { + this.prefAscent = Math.max(this.prefAscent, baseline); + this.prefDescent = Math.max(this.prefDescent, spring + .getPreferredSize(2) - baseline); + } + } + if (baseline < 0) { + this.allSpringsHaveBaseline = false; + } + } + } + + private void baselineLayout(int origin, int size) + { + int counter = 0; + for (int max = this.springs.size(); counter < max; counter++) + { + GroupLayout.Spring spring = getSpring(counter); + int baseline = -1; + if ((spring instanceof GroupLayout.ComponentSpring)) + { + baseline = ((GroupLayout.ComponentSpring)spring).getBaseline(); + if (baseline >= 0) { + spring.setSize(2, origin + this.prefAscent - + baseline, spring.getPreferredSize(2)); + } + } + if (baseline < 0) + { + int sSize = Math.min(spring.getMaximumSize(2), size); + spring.setSize(2, origin + (size - sSize) / 2, + sSize); + } + } + } + } + + class ComponentSpring + extends GroupLayout.Spring + { + private Component component; + private int origin; + private int min; + private int pref; + private int max; + private int baseline = -1; + private boolean installed; + + private ComponentSpring(Component component, int min, int pref, int max) + { + super(); + + this.component = component; + + GroupLayout.checkSize(min, pref, max, true); + + this.min = min; + this.max = max; + this.pref = pref; + + GroupLayout.this.getComponentInfo(component); + } + + int getMinimumSize0(int axis) + { + if (isLinked(axis)) { + return getLinkSize(axis, 0); + } + return getMinimumSize1(axis); + } + + int getMinimumSize1(int axis) + { + if (this.min >= 0) { + return this.min; + } + if (this.min == -2) { + return getPreferredSize1(axis); + } + return getSizeAlongAxis(axis, this.component.getMinimumSize()); + } + + int getPreferredSize0(int axis) + { + if (isLinked(axis)) { + return getLinkSize(axis, 1); + } + return Math.max(getMinimumSize(axis), getPreferredSize1(axis)); + } + + int getPreferredSize1(int axis) + { + if (this.pref >= 0) { + return this.pref; + } + return getSizeAlongAxis(axis, this.component.getPreferredSize()); + } + + int getMaximumSize0(int axis) + { + if (isLinked(axis)) { + return getLinkSize(axis, 2); + } + return Math.max(getMinimumSize(axis), getMaximumSize1(axis)); + } + + int getMaximumSize1(int axis) + { + if (this.max >= 0) { + return this.max; + } + if (this.max == -2) { + return getPreferredSize1(axis); + } + return getSizeAlongAxis(axis, this.component.getMaximumSize()); + } + + private int getSizeAlongAxis(int axis, Dimension size) + { + return axis == 1 ? size.width : size.height; + } + + private int getLinkSize(int axis, int type) + { + GroupLayout.ComponentInfo ci = GroupLayout.this.getComponentInfo(this.component); + return ci.getSize(axis, type); + } + + void setSize(int axis, int origin, int size) + { + super.setSize(axis, origin, size); + this.origin = origin; + if (size == -2147483648) { + this.baseline = -1; + } + } + + int getOrigin() + { + return this.origin; + } + + void setComponent(Component component) + { + this.component = component; + } + + Component getComponent() + { + return this.component; + } + + int getBaseline() + { + if ((this.baseline == -1) && ((this.component instanceof JComponent))) + { + GroupLayout.Spring horizontalSpring = + GroupLayout.this.getComponentInfo(this.component).horizontalSpring; + int width; + // int width; + if (horizontalSpring != null) { + width = horizontalSpring.getSize(); + } else { + width = this.component.getPreferredSize().width; + } + this.baseline = Baseline.getBaseline((JComponent)this.component, + width, getPreferredSize(2)); + } + return this.baseline; + } + + private boolean isLinked(int axis) + { + return GroupLayout.this.getComponentInfo(this.component).isLinked(axis); + } + + void installIfNecessary(int axis) + { + if (!this.installed) + { + this.installed = true; + if (axis == 1) { + GroupLayout.this.getComponentInfo(this.component).horizontalSpring = this; + } else { + GroupLayout.this.getComponentInfo(this.component).verticalSpring = this; + } + } + } + } + + class PaddingSpring + extends GroupLayout.Spring + { + private JComponent source; + private JComponent target; + private int type; + private boolean canGrow; + + PaddingSpring(JComponent source, JComponent target, int type, boolean canGrow) + { + super(); + + this.source = source; + this.target = target; + this.type = type; + this.canGrow = canGrow; + } + + int getMinimumSize0(int axis) + { + return getPadding(axis); + } + + int getPreferredSize0(int axis) + { + return getPadding(axis); + } + + int getMaximumSize0(int axis) + { + if (this.canGrow) { + return 32767; + } + return getPadding(axis); + } + + private int getPadding(int axis) + { + int position; + // int position; + if (axis == 1) { + position = 3; + } else { + position = 5; + } + return LayoutStyle.getSharedInstance().getPreferredGap(this.source, + this.target, this.type, position, GroupLayout.this.host); + } + } + + class GapSpring + extends GroupLayout.Spring + { + private int min; + private int pref; + private int max; + + GapSpring(int min, int pref, int max) + { + super(); + GroupLayout.checkSize(min, pref, max, false); + this.min = min; + this.pref = pref; + this.max = max; + } + + int getMinimumSize0(int axis) + { + if (this.min == -2) { + return getPreferredSize(axis); + } + return this.min; + } + + int getPreferredSize0(int axis) + { + return this.pref; + } + + int getMaximumSize0(int axis) + { + if (this.max == -2) { + return getPreferredSize(axis); + } + return this.max; + } + } + + private class AutopaddingSpring + extends GroupLayout.Spring + { + List sources; + GroupLayout.ComponentSpring source; + private List matches; + int size; + int lastSize; + private int pref; + private int max; + private int type; + private boolean userCreated; + + private AutopaddingSpring() + { + super(); + this.pref = -2; + this.max = -2; + this.type = 0; + } + + AutopaddingSpring(int pref, int max) + { + super(); + this.pref = pref; + this.max = max; + } + + AutopaddingSpring(int type, int pref, int max) + { + super(); + this.type = type; + this.pref = pref; + this.max = max; + this.userCreated = true; + } + + public void setSource(GroupLayout.ComponentSpring source) + { + this.source = source; + } + + public void setSources(List sources) + { + this.sources = new ArrayList(sources.size()); + this.sources.addAll(sources); + } + + public void setUserCreated(boolean userCreated) + { + this.userCreated = userCreated; + } + + public boolean getUserCreated() + { + return this.userCreated; + } + + void clear() + { + this.lastSize = getSize(); + super.clear(); + this.size = 0; + } + + public void reset() + { + this.size = 0; + this.sources = null; + this.source = null; + this.matches = null; + } + + public void calculatePadding(int axis) + { + this.size = 0; + int maxPadding = 0; + if (this.matches != null) + { + LayoutStyle p = LayoutStyle.getSharedInstance(); + + int position = axis == 1 ? 3 : + 5; + for (int i = this.matches.size() - 1; i >= 0; i--) + { + GroupLayout.AutopaddingMatch match = (GroupLayout.AutopaddingMatch)this.matches.get(i); + maxPadding = Math.max(maxPadding, + calculatePadding(p, position, match.source, + match.target)); + } + } + if (this.lastSize != -2147483648) { + this.size += Math.min(maxPadding, this.lastSize); + } + } + + private int calculatePadding(LayoutStyle p, int position, GroupLayout.ComponentSpring source, GroupLayout.ComponentSpring target) + { + int delta = target.getOrigin() - (source.getOrigin() + + source.getSize()); + if (delta >= 0) + { + int padding; + // int padding; + if (((source.getComponent() instanceof JComponent)) && + ((target.getComponent() instanceof JComponent))) { + padding = p.getPreferredGap((JComponent)source.getComponent(), + (JComponent)target.getComponent(), this.type, position, GroupLayout.this.host); + } else { + padding = 10; + } + if (padding > delta) { + this.size = Math.max(this.size, padding - delta); + } + return padding; + } + return 0; + } + + public void add(GroupLayout.ComponentSpring spring, int axis) + { + int oAxis = axis == 1 ? 2 : 1; + if (this.source != null) + { + if (GroupLayout.this.areParallelSiblings(this.source.getComponent(), + spring.getComponent(), oAxis)) { + addMatch(this.source, spring); + } + } + else + { + Component component = spring.getComponent(); + for (int counter = this.sources.size() - 1; counter >= 0; counter--) + { + GroupLayout.ComponentSpring source = + (GroupLayout.ComponentSpring)this.sources.get(counter); + if (GroupLayout.this.areParallelSiblings(source.getComponent(), + component, oAxis)) { + addMatch(source, spring); + } + } + } + } + + private void addMatch(GroupLayout.ComponentSpring source, GroupLayout.ComponentSpring target) + { + if (this.matches == null) { + this.matches = new ArrayList(1); + } + this.matches.add(new GroupLayout.AutopaddingMatch(source, target)); + } + + int getMinimumSize0(int axis) + { + return this.size; + } + + int getPreferredSize0(int axis) + { + if ((this.pref == -2) || (this.pref == -1)) { + return this.size; + } + return Math.max(this.size, this.pref); + } + + int getMaximumSize0(int axis) + { + if (this.max >= 0) { + return Math.max(getPreferredSize(axis), this.max); + } + return this.size; + } + + String getMatchDescription() + { + return this.matches == null ? "" : this.matches.toString(); + } + + public String toString() + { + return super.toString() + getMatchDescription(); + } + } + + private static class AutopaddingMatch + { + public GroupLayout.ComponentSpring source; + public GroupLayout.ComponentSpring target; + + AutopaddingMatch(GroupLayout.ComponentSpring source, GroupLayout.ComponentSpring target) + { + this.source = source; + this.target = target; + } + + private String toString(GroupLayout.ComponentSpring spring) + { + return spring.getComponent().getName(); + } + + public String toString() + { + return "[" + toString(this.source) + "-" + toString(this.target) + "]"; + } + } + + private class ContainerAutopaddingSpring + extends GroupLayout.AutopaddingSpring + { + private List targets; + + ContainerAutopaddingSpring() + { + // super(null, null); + setUserCreated(true); + } + + ContainerAutopaddingSpring(int pref, int max) + { + super(pref, max); + setUserCreated(true); + } + + public void add(GroupLayout.ComponentSpring spring, int axis) + { + if (this.targets == null) { + this.targets = new ArrayList(1); + } + this.targets.add(spring); + } + + public void calculatePadding(int axis) + { + LayoutStyle p = LayoutStyle.getSharedInstance(); + int maxPadding = 0; + this.size = 0; + if (this.targets != null) + { + int position = axis == 1 ? 7 : + 1; + for (int i = this.targets.size() - 1; i >= 0; i--) + { + GroupLayout.ComponentSpring targetSpring = + (GroupLayout.ComponentSpring)this.targets.get(i); + int padding = 10; + if ((targetSpring.getComponent() instanceof JComponent)) + { + padding = p.getContainerGap( + (JComponent)targetSpring.getComponent(), + position, GroupLayout.this.host); + maxPadding = Math.max(padding, maxPadding); + padding -= targetSpring.getOrigin(); + } + else + { + maxPadding = Math.max(padding, maxPadding); + } + this.size = Math.max(this.size, padding); + } + } + else + { + int position = axis == 1 ? 3 : + 5; + if (this.sources != null) { + for (int i = this.sources.size() - 1; i >= 0; i--) + { + GroupLayout.ComponentSpring sourceSpring = + (GroupLayout.ComponentSpring)this.sources.get(i); + maxPadding = Math.max(maxPadding, + updateSize(p, sourceSpring, position)); + } + } else if (this.source != null) { + maxPadding = updateSize(p, this.source, position); + } + } + if (this.lastSize != -2147483648) { + this.size += Math.min(maxPadding, this.lastSize); + } + } + + private int updateSize(LayoutStyle p, GroupLayout.ComponentSpring sourceSpring, int position) + { + int padding = 10; + if ((sourceSpring.getComponent() instanceof JComponent)) { + padding = p.getContainerGap( + (JComponent)sourceSpring.getComponent(), position, + GroupLayout.this.host); + } + int delta = Math.max(0, getParent().getSize() - + sourceSpring.getSize() - sourceSpring.getOrigin()); + this.size = Math.max(this.size, padding - delta); + return padding; + } + + String getMatchDescription() + { + if (this.targets != null) { + return "leading: " + this.targets.toString(); + } + if (this.sources != null) { + return "trailing: " + this.sources.toString(); + } + return "--"; + } + } + + private static class ComponentInfo + { + private Component component; + GroupLayout.ComponentSpring horizontalSpring; + GroupLayout.ComponentSpring verticalSpring; + private ComponentInfo horizontalMaster; + private ComponentInfo verticalMaster; + private List horizontalDependants; + private List verticalDependants; + private int[] horizontalSizes; + private int[] verticalSizes; + + ComponentInfo(Component component) + { + this.component = component; + clear(); + } + + public void setBounds(Insets insets) + { + int x = 0; + int y = 0; + int w = 0; + int h = 0; + if (this.horizontalSpring != null) + { + x = this.horizontalSpring.getOrigin(); + w = this.horizontalSpring.getSize(); + } + if (this.verticalSpring != null) + { + y = this.verticalSpring.getOrigin(); + h = this.verticalSpring.getSize(); + } + this.component.setBounds(x + insets.left, y + insets.top, w, h); + } + + public void setComponent(Component component) + { + this.component = component; + if (this.horizontalSpring != null) { + this.horizontalSpring.setComponent(component); + } + if (this.verticalSpring != null) { + this.verticalSpring.setComponent(component); + } + } + + public Component getComponent() + { + return this.component; + } + + public boolean isLinked(int axis) + { + if (axis == 1) { + return this.horizontalMaster != null; + } + return this.verticalMaster != null; + } + + public ComponentInfo getMasterComponentInfo(int axis) + { + if (axis == 1) + { + if (this.horizontalMaster == null) + { + this.horizontalMaster = this; + this.horizontalDependants = new ArrayList(1); + this.horizontalDependants.add(this); + this.horizontalSizes = new int[3]; + clear(); + } + return this.horizontalMaster; + } + if (this.verticalMaster == null) + { + this.verticalMaster = this; + this.verticalDependants = new ArrayList(1); + this.verticalDependants.add(this); + this.verticalSizes = new int[3]; + clear(); + } + return this.verticalMaster; + } + + public void addChild(ComponentInfo child, int axis) + { + if (axis == 1) { + addChild0(child, 1); + } else { + addChild0(child, 2); + } + } + + private void addChild0(ComponentInfo child, int axis) + { + if (axis == 1) + { + if (child.horizontalMaster == child) + { + this.horizontalDependants.addAll(child.horizontalDependants); + child.horizontalDependants = null; + child.horizontalSizes = null; + } + else + { + this.horizontalDependants.add(child); + } + child.horizontalMaster = this; + } + else + { + if (child.verticalMaster == child) + { + this.verticalDependants.addAll(child.verticalDependants); + child.verticalDependants = null; + child.verticalSizes = null; + } + else + { + this.verticalDependants.add(child); + } + child.verticalMaster = this; + } + } + + public void clear() + { + clear(this.horizontalSizes); + clear(this.verticalSizes); + } + + private void clear(int[] sizes) + { + if (sizes != null) { + for (int counter = sizes.length - 1; counter >= 0; counter--) { + sizes[counter] = -2147483648; + } + } + } + + int getSize(int axis, int type) + { + int[] sizes = (int[])null; + List dependants = null; + if (axis == 1) + { + if (this.horizontalMaster != this) { + return this.horizontalMaster.getSize(axis, type); + } + sizes = this.horizontalSizes; + dependants = this.horizontalDependants; + } + else if (axis == 2) + { + if (this.verticalMaster != this) { + return this.verticalMaster.getSize(axis, type); + } + sizes = this.verticalSizes; + dependants = this.verticalDependants; + } + if (sizes[type] == -2147483648) { + sizes[type] = calcSize(dependants, axis, type); + } + return sizes[type]; + } + + private int calcSize(List dependants, int axis, int type) + { + int count = dependants.size() - 1; + int size = getSize(dependants, axis, type, count--); + while (count >= 0) { + size = Math.max(size, getSize(dependants, axis, type, count--)); + } + return size; + } + + private int getSize(List dependants, int axis, int type, int index) + { + ComponentInfo ci = (ComponentInfo)dependants.get(index); + GroupLayout.ComponentSpring spring; + // GroupLayout.ComponentSpring spring; + if (axis == 1) { + spring = ci.horizontalSpring; + } else { + spring = ci.verticalSpring; + } + return spring.getPreferredSize1(axis); + } + } +} diff --git a/src/org/jdesktop/layout/LayoutStyle.java b/src/org/jdesktop/layout/LayoutStyle.java new file mode 100644 index 0000000..2596127 --- /dev/null +++ b/src/org/jdesktop/layout/LayoutStyle.java @@ -0,0 +1,202 @@ +package org.jdesktop.layout; + +import java.awt.ComponentOrientation; +import java.awt.Container; +import java.awt.Insets; +import javax.swing.AbstractButton; +import javax.swing.Icon; +import javax.swing.JCheckBox; +import javax.swing.JComponent; +import javax.swing.JRadioButton; +import javax.swing.LookAndFeel; +import javax.swing.border.Border; +import javax.swing.plaf.UIResource; + +public class LayoutStyle +{ + public static final int RELATED = 0; + public static final int UNRELATED = 1; + public static final int INDENT = 3; + private static LayoutStyle layoutStyle; + private static LookAndFeel laf; + + public static void setSharedInstance(LayoutStyle layoutStyle) {} + + public static LayoutStyle getSharedInstance() + { + Object layoutImpl = null; + if ((layoutImpl != null) && ((layoutImpl instanceof LayoutStyle))) { + return (LayoutStyle)layoutImpl; + } + layoutStyle = new LayoutStyle(); + return layoutStyle; + } + + public int getPreferredGap(JComponent component1, JComponent component2, int type, int position, Container parent) + { + if ((position != 1) && + (position != 5) && + (position != 7) && + (position != 3)) { + throw new IllegalArgumentException("Invalid position"); + } + if ((component1 == null) || (component2 == null)) { + throw new IllegalArgumentException("Components must be non-null"); + } + if ((type != 0) && (type != 1) && + (type != 3)) { + throw new IllegalArgumentException("Invalid type"); + } + return 4; + } + + public int getContainerGap(JComponent component, int position, Container parent) + { + if ((position != 1) && + (position != 5) && + (position != 7) && + (position != 3)) { + throw new IllegalArgumentException("Invalid position"); + } + if (component == null) { + throw new IllegalArgumentException("Component must be non-null"); + } + return 4; + } + + boolean isDialog(JComponent component) + { + String name = component.getName(); + return (name != null) && (name.endsWith(".contentPane")); + } + + int getCBRBPadding(JComponent source, JComponent target, int position, int offset) + { + offset -= getCBRBPadding(source, position); + if (offset > 0) { + offset -= getCBRBPadding(target, flipDirection(position)); + } + if (offset < 0) { + return 0; + } + return offset; + } + + int getCBRBPadding(JComponent source, int position, int offset) + { + offset -= getCBRBPadding(source, position); + return Math.max(offset, 0); + } + + int flipDirection(int position) + { + switch (position) + { + case 1: + return 5; + case 5: + return 1; + case 3: + return 7; + case 7: + return 3; + } + return 0; + } + + private int getCBRBPadding(JComponent c, int position) + { + if ((c.getUIClassID() == "CheckBoxUI") || + (c.getUIClassID() == "RadioButtonUI")) + { + Border border = c.getBorder(); + if ((border instanceof UIResource)) { + return getInset(c, position); + } + } + return 0; + } + + private int getInset(JComponent c, int position) + { + Insets insets = c.getInsets(); + switch (position) + { + case 1: + return insets.top; + case 5: + return insets.bottom; + case 3: + return insets.right; + case 7: + return insets.left; + } + return 0; + } + + private boolean isLeftAligned(AbstractButton button, int position) + { + if (position == 7) + { + boolean ltr = button.getComponentOrientation().isLeftToRight(); + int hAlign = button.getHorizontalAlignment(); + + + return ((ltr) && ((hAlign == 2) || (hAlign == 10))) || ((!ltr) && (hAlign == 11)); + } + return false; + } + + private boolean isRightAligned(AbstractButton button, int position) + { + if (position == 3) + { + boolean ltr = button.getComponentOrientation().isLeftToRight(); + int hAlign = button.getHorizontalAlignment(); + + + return ((ltr) && ((hAlign == 4) || (hAlign == 11))) || ((!ltr) && (hAlign == 10)); + } + return false; + } + + private Icon getIcon(AbstractButton button) + { + Icon icon = button.getIcon(); + if (icon != null) { + return icon; + } + String key = null; + if ((button instanceof JCheckBox)) { + key = "CheckBox.icon"; + } else if ((button instanceof JRadioButton)) { + key = "RadioButton.icon"; + } + if (key != null) + { + Object oIcon = null; + if ((oIcon instanceof Icon)) { + return (Icon)oIcon; + } + } + return null; + } + + int getButtonChildIndent(JComponent c, int position) + { + if (((c instanceof JRadioButton)) || ((c instanceof JCheckBox))) + { + AbstractButton button = (AbstractButton)c; + Insets insets = c.getInsets(); + Icon icon = getIcon(button); + int gap = button.getIconTextGap(); + if (isLeftAligned(button, position)) { + return insets.left + icon.getIconWidth() + gap; + } + if (isRightAligned(button, position)) { + return insets.right + icon.getIconWidth() + gap; + } + } + return 0; + } +}