commit
fa18e93166
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="lib" path="aclib/com.connor.dongmu.plm_1.0.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="aclib/cn.com.ebewin.ysr_1.0.0.jar"/>
|
||||||
|
<classpathentry kind="lib" path="aclib/fastjson-1.2.47.jar"/>
|
||||||
|
<classpathentry kind="lib" path="aclib/slf4j-api-1.7.25.jar"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.connor.ac</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding//src/com/connor/ac/util/FileUtil.java=UTF-8
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Ac
|
||||||
|
Bundle-SymbolicName: com.connor.ac; singleton:=true
|
||||||
|
Bundle-Version: 1.0.0
|
||||||
|
Bundle-Activator: com.connor.ac.Activator
|
||||||
|
Bundle-Vendor: CONNOR
|
||||||
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
org.eclipse.core.runtime,
|
||||||
|
com.teamcenter.rac.aifrcp;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.kernel;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.common;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.tcapps;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.ui;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.util;bundle-version="11000.2.0",
|
||||||
|
com.teamcenter.rac.external;bundle-version="11000.2.0",
|
||||||
|
org.apache.poi.39;bundle-version="3.9.0"
|
||||||
|
Bundle-ActivationPolicy: lazy
|
||||||
|
Export-Package: com.alibaba.fastjson,
|
||||||
|
com.alibaba.fastjson.annotation,
|
||||||
|
com.alibaba.fastjson.asm,
|
||||||
|
com.alibaba.fastjson.parser,
|
||||||
|
com.alibaba.fastjson.parser.deserializer,
|
||||||
|
com.alibaba.fastjson.serializer,
|
||||||
|
com.alibaba.fastjson.support.config,
|
||||||
|
com.alibaba.fastjson.support.hsf,
|
||||||
|
com.alibaba.fastjson.support.jaxrs,
|
||||||
|
com.alibaba.fastjson.support.retrofit,
|
||||||
|
com.alibaba.fastjson.support.spring,
|
||||||
|
com.alibaba.fastjson.support.spring.annotation,
|
||||||
|
com.alibaba.fastjson.support.spring.messaging,
|
||||||
|
com.alibaba.fastjson.support.springfox,
|
||||||
|
com.alibaba.fastjson.util,
|
||||||
|
com.connor.AC_01,
|
||||||
|
com.connor.ac,
|
||||||
|
com.connor.ac.bean,
|
||||||
|
com.connor.ac.util
|
||||||
|
Bundle-ClassPath: aclib/fastjson-1.2.47.jar,
|
||||||
|
.
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
/com/
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
source.. = src/
|
||||||
|
output.. = bin/
|
||||||
|
bin.includes = plugin.xml,\
|
||||||
|
META-INF/,\
|
||||||
|
.,\
|
||||||
|
icons/,\
|
||||||
|
aclib/fastjson-1.2.47.jar
|
||||||
|
After Width: | Height: | Size: 983 B |
@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?eclipse version="3.4"?>
|
||||||
|
<plugin>
|
||||||
|
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.ui.commands">
|
||||||
|
<category
|
||||||
|
name="Sample Category"
|
||||||
|
id="com.connor.ac.commands.category">
|
||||||
|
</category>
|
||||||
|
|
||||||
|
<command
|
||||||
|
name="问题报告批量导入"
|
||||||
|
categoryId="com.connor.ac.commands.category"
|
||||||
|
id="com.connor.ac.commands.ProblemReportImport">
|
||||||
|
</command>
|
||||||
|
|
||||||
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.ui.handlers">
|
||||||
|
<handler
|
||||||
|
commandId="com.connor.ac.commands.ProblemReportImport"
|
||||||
|
class="com.connor.AC_05.ProblemReportImportHandler">
|
||||||
|
</handler>
|
||||||
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.ui.bindings">
|
||||||
|
<key
|
||||||
|
commandId="com.connor.ac.commands.sampleCommand"
|
||||||
|
contextId="org.eclipse.ui.contexts.window"
|
||||||
|
sequence="M1+6"
|
||||||
|
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
|
||||||
|
</key>
|
||||||
|
</extension>-
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.ui.menus">
|
||||||
|
<!--
|
||||||
|
<menuContribution
|
||||||
|
locationURI="menu:cn.com.ebewin.ysr.ui.menus.ProjectManage?after=cn.com.ebewin.ysr.ui.menus.ProblemBoard">
|
||||||
|
|
||||||
|
<command
|
||||||
|
commandId="com.connor.ac.commands.ProblemReportImport"
|
||||||
|
mnemonic="S"
|
||||||
|
id="com.connor.ac.menus.ProblemReportImport">
|
||||||
|
</command>
|
||||||
|
</menuContribution>
|
||||||
|
<menuContribution
|
||||||
|
locationURI="toolbar:org.eclipse.ui.main.toolbar?after=additions">
|
||||||
|
<toolbar
|
||||||
|
id="com.connor.ac.toolbars.sampleToolbar">
|
||||||
|
<command
|
||||||
|
commandId="com.connor.ac.commands.sampleCommand"
|
||||||
|
icon="icons/sample.gif"
|
||||||
|
tooltip="Say hello world"
|
||||||
|
id="com.connor.ac.toolbars.sampleCommand">
|
||||||
|
</command>
|
||||||
|
</toolbar>
|
||||||
|
</menuContribution>-->
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
</plugin>
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,678 @@
|
|||||||
|
//package com.connor.AC_01;
|
||||||
|
//
|
||||||
|
///*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||||
|
////Jad home page: http://www.kpdus.com/jad.html
|
||||||
|
////Decompiler options: packimports(3) radix(10) lradix(10)
|
||||||
|
////Source File Name: TMomFormStyle.java
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//import com.connor.dongmu.plm.bean.TMomProcessBean;
|
||||||
|
//import com.connor.dongmu.plm.util.TMomFinalUtil;
|
||||||
|
//import com.teamcenter.rac.aif.AbstractAIFDialog;
|
||||||
|
//import com.teamcenter.rac.kernel.TCComponent;
|
||||||
|
//import com.teamcenter.rac.kernel.TCException;
|
||||||
|
//import com.teamcenter.rac.kernel.TCProperty;
|
||||||
|
//import com.teamcenter.rac.stylesheet.AbstractRendering;
|
||||||
|
//import com.teamcenter.rac.util.MessageBox;
|
||||||
|
//import com.teamcenter.rac.util.PropertyLayout;
|
||||||
|
//import java.awt.BorderLayout;
|
||||||
|
//import java.awt.Color;
|
||||||
|
//import java.awt.Dimension;
|
||||||
|
//import java.awt.FlowLayout;
|
||||||
|
//import java.awt.Toolkit;
|
||||||
|
//import java.awt.datatransfer.Clipboard;
|
||||||
|
//import java.awt.datatransfer.StringSelection;
|
||||||
|
//import java.awt.event.ActionEvent;
|
||||||
|
//import java.awt.event.ActionListener;
|
||||||
|
//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.ArrayList;
|
||||||
|
//import java.util.HashMap;
|
||||||
|
//import javax.swing.JButton;
|
||||||
|
//import javax.swing.JLabel;
|
||||||
|
//import javax.swing.JPanel;
|
||||||
|
//import javax.swing.JScrollPane;
|
||||||
|
//import javax.swing.JTabbedPane;
|
||||||
|
//import javax.swing.JTable;
|
||||||
|
//import javax.swing.JTextField;
|
||||||
|
//import javax.swing.JTree;
|
||||||
|
//import javax.swing.JViewport;
|
||||||
|
//import javax.swing.table.DefaultTableModel;
|
||||||
|
//import javax.swing.table.TableColumn;
|
||||||
|
//import javax.swing.table.TableColumnModel;
|
||||||
|
//import javax.swing.table.TableModel;
|
||||||
|
//
|
||||||
|
////Referenced classes of package com.connor.dongmu.plm.handlers.tmom005:
|
||||||
|
//// TableCellTextAreaRenderer
|
||||||
|
//
|
||||||
|
//public class TMomFormStyle extends AbstractRendering
|
||||||
|
// implements ActionListener, MouseListener, KeyListener
|
||||||
|
//{
|
||||||
|
// private class showERPCountDialog extends AbstractAIFDialog
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// public void init()
|
||||||
|
// {
|
||||||
|
// setTitle("\u7269\u6599\u6D4F\u89C8");
|
||||||
|
// setPreferredSize(new Dimension(900, 150));
|
||||||
|
// table = getjTable(table, defaultTM, ckNames, ckCounts);
|
||||||
|
// panel = new JPanel(new BorderLayout());
|
||||||
|
// panel2 = new JPanel(new FlowLayout());
|
||||||
|
// panel3 = new JPanel(new BorderLayout());
|
||||||
|
// simpleCopyButton = new JButton("\u590D\u5236\u5355\u4E2A\u5E93\u5B58");
|
||||||
|
// simpleCopyButton.addActionListener(new ActionListener() {
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// simpleCopyAction(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final showERPCountDialog this$1;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$1 = showERPCountDialog.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//);
|
||||||
|
// copyButton = new JButton("\u590D\u5236\u5168\u90E8\u5E93\u5B58");
|
||||||
|
// copyButton.addActionListener(new ActionListener() {
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// totleCopyAction(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final showERPCountDialog this$1;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$1 = showERPCountDialog.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//);
|
||||||
|
// closeButton = new JButton("\u5173\u95ED");
|
||||||
|
// closeButton.addActionListener(new ActionListener() {
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// closeAction(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final showERPCountDialog this$1;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$1 = showERPCountDialog.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//);
|
||||||
|
// panel2.add(simpleCopyButton);
|
||||||
|
// panel2.add(copyButton);
|
||||||
|
// panel2.add(closeButton);
|
||||||
|
// panel3.add(new JScrollPane(table), "Center");
|
||||||
|
// panel.add(panel2, "South");
|
||||||
|
// panel.add(panel3, "Center");
|
||||||
|
// add(panel, "Center");
|
||||||
|
// pack();
|
||||||
|
// centerToScreen();
|
||||||
|
// showDialog();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void simpleCopyAction(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// int colIndex = table.getSelectedColumn();
|
||||||
|
// if(colIndex != -1)
|
||||||
|
// setClipboard((new StringBuilder()).append(ckCounts[0][colIndex]).toString());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void totleCopyAction(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// StringBuffer sb = new StringBuffer();
|
||||||
|
// for(int i = 0; i < ckNames.length; i++)
|
||||||
|
// {
|
||||||
|
// sb.append(ckNames[i]);
|
||||||
|
// if(i != ckNames.length - 1)
|
||||||
|
// sb.append("|");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// sb.append("\r\n");
|
||||||
|
// for(int i = 0; i < ckCounts[0].length; i++)
|
||||||
|
// {
|
||||||
|
// sb.append(ckCounts[0][i]);
|
||||||
|
// if(i != ckCounts[0].length - 1)
|
||||||
|
// sb.append("|");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// setClipboard(sb.toString());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void closeAction(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// dispose();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private Object ckNames[];
|
||||||
|
// private Object ckCounts[][];
|
||||||
|
// private String wlCode;
|
||||||
|
// private JPanel panel;
|
||||||
|
// private JPanel panel2;
|
||||||
|
// private JPanel panel3;
|
||||||
|
// private JButton simpleCopyButton;
|
||||||
|
// private JButton copyButton;
|
||||||
|
// private JButton closeButton;
|
||||||
|
// private JTable table;
|
||||||
|
// private DefaultTableModel defaultTM;
|
||||||
|
// final TMomFormStyle this$0;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// public showERPCountDialog(String wlCode, Object ckNames[], Object ckCounts[][])
|
||||||
|
// {
|
||||||
|
// this$0 = TMomFormStyle.this;
|
||||||
|
//
|
||||||
|
// this.wlCode = wlCode;
|
||||||
|
// this.ckNames = ckNames;
|
||||||
|
// this.ckCounts = ckCounts;
|
||||||
|
// init();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private class writeWLCodeDialog extends AbstractAIFDialog
|
||||||
|
// {
|
||||||
|
//
|
||||||
|
// public void init()
|
||||||
|
// {
|
||||||
|
// System.out.println("\u521D\u59CB\u5316\u754C\u9762");
|
||||||
|
// setTitle("\u8BF7\u8F93\u5165\u5DE5\u827A\u4FE1\u606F");
|
||||||
|
// setPreferredSize(new Dimension(300, 130));
|
||||||
|
// lable = new JLabel("\u7269\u6599\u7F16\u7801\uFF1A");
|
||||||
|
// textField = new JTextField(24);
|
||||||
|
// panel = new JPanel(new BorderLayout());
|
||||||
|
// panel2 = new JPanel(new FlowLayout());
|
||||||
|
// panel3 = new JPanel(new FlowLayout());
|
||||||
|
// okButton = new JButton("\u786E\u5B9A");
|
||||||
|
// okButton.addActionListener(new ActionListener() {
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// okAction(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final writeWLCodeDialog this$1;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$1 = writeWLCodeDialog.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//);
|
||||||
|
// celButton = new JButton("\u53D6\u6D88");
|
||||||
|
// celButton.addActionListener(new ActionListener() {
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// celAction(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final writeWLCodeDialog this$1;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$1 = writeWLCodeDialog.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//);
|
||||||
|
// panel2.add(lable);
|
||||||
|
// panel2.add(textField);
|
||||||
|
// panel3.add(okButton);
|
||||||
|
// panel3.add(celButton);
|
||||||
|
// panel.add(panel3, "South");
|
||||||
|
// panel.add(panel2, "Center");
|
||||||
|
// add(panel, "Center");
|
||||||
|
// pack();
|
||||||
|
// centerToScreen();
|
||||||
|
// showDialog();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void okAction(ActionEvent actionevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void celAction(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// dispose();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private JPanel panel;
|
||||||
|
// private JPanel panel2;
|
||||||
|
// private JPanel panel3;
|
||||||
|
// private JLabel lable;
|
||||||
|
// private JTextField textField;
|
||||||
|
// private JButton okButton;
|
||||||
|
// private JButton celButton;
|
||||||
|
// final TMomFormStyle this$0;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// public writeWLCodeDialog()
|
||||||
|
// {
|
||||||
|
// this$0 = TMomFormStyle.this;
|
||||||
|
//
|
||||||
|
// init();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// public TMomFormStyle(TCComponent arg0)
|
||||||
|
// throws Exception
|
||||||
|
// {
|
||||||
|
// super(arg0);
|
||||||
|
// recordIndex = 0;
|
||||||
|
// System.out.println("++++++++++++++++++++++++++++++++");
|
||||||
|
// formComp = arg0;
|
||||||
|
// loadRendering();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void getFormVlue()
|
||||||
|
// {
|
||||||
|
// valueLists = new ArrayList();
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// properties = formComp.getTCProperties(TMomFinalUtil.TM2_PRICE_PROP_NAMES);
|
||||||
|
// propertiesArray = formComp.getTCProperties(TMomFinalUtil.TM2_PROCESS_PROP_NAMES);
|
||||||
|
// if(propertiesArray != null)
|
||||||
|
// {
|
||||||
|
// String valueStrs0[] = propertiesArray[0] != null ? propertiesArray[0].getStringArrayValue() : new String[0];
|
||||||
|
// String valueStrs1[] = propertiesArray[1] != null ? propertiesArray[1].getStringArrayValue() : new String[0];
|
||||||
|
// String valueStrs2[] = propertiesArray[2] != null ? propertiesArray[2].getStringArrayValue() : new String[0];
|
||||||
|
// String valueStrs3[] = propertiesArray[3] != null ? propertiesArray[3].getStringArrayValue() : new String[0];
|
||||||
|
// String valueStrs4[] = propertiesArray[4] != null ? propertiesArray[4].getStringArrayValue() : new String[0];
|
||||||
|
// String valueStrs5[] = propertiesArray[5] != null ? propertiesArray[5].getStringArrayValue() : new String[0];
|
||||||
|
// String valueStrs6[] = propertiesArray[6] != null ? propertiesArray[6].getStringArrayValue() : new String[0];
|
||||||
|
// if(valueStrs0.length == valueStrs1.length && valueStrs0.length == valueStrs2.length && valueStrs0.length == valueStrs3.length && valueStrs0.length == valueStrs4.length && valueStrs0.length == valueStrs5.length && valueStrs0.length == valueStrs6.length && valueStrs0.length != 0)
|
||||||
|
// {
|
||||||
|
// for(int i = 0; i < valueStrs0.length; i++)
|
||||||
|
// {
|
||||||
|
// TMomProcessBean bean = new TMomProcessBean();
|
||||||
|
// bean.setTm2_DocLineNo(valueStrs0[i]);
|
||||||
|
// bean.setTm2_ProjectNam(valueStrs1[i]);
|
||||||
|
// bean.setTm2_ProjectFee(valueStrs2[i]);
|
||||||
|
// bean.setTm2_ProjectMark(valueStrs3[i]);
|
||||||
|
// bean.setTm2_ProjectEqui(valueStrs4[i]);
|
||||||
|
// bean.setTm2_ProjectSuggest(valueStrs5[i]);
|
||||||
|
// bean.setTm2_ONum(valueStrs6[i]);
|
||||||
|
// valueLists.add(bean);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if(properties != null)
|
||||||
|
// {
|
||||||
|
// propTexts = new JTextField[properties.length];
|
||||||
|
// priceValues = new String[properties.length];
|
||||||
|
// for(int i = 0; i < properties.length; i++)
|
||||||
|
// priceValues[i] = properties[i] != null ? properties[i].getStringValue() : "";
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// catch(TCException e)
|
||||||
|
// {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void saveWLProps()
|
||||||
|
// {
|
||||||
|
// if(valueLists == null)
|
||||||
|
// {
|
||||||
|
// System.out.println("\u5C5E\u6027\u5217\u8868\u4E3A\u7A7A");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// String valueStrs0[] = new String[valueLists.size()];
|
||||||
|
// String valueStrs1[] = new String[valueLists.size()];
|
||||||
|
// String valueStrs2[] = new String[valueLists.size()];
|
||||||
|
// String valueStrs3[] = new String[valueLists.size()];
|
||||||
|
// String valueStrs4[] = new String[valueLists.size()];
|
||||||
|
// String valueStrs5[] = new String[valueLists.size()];
|
||||||
|
// String valueStrs6[] = new String[valueLists.size()];
|
||||||
|
// for(int i = 0; i < valueLists.size(); i++)
|
||||||
|
// {
|
||||||
|
// TMomProcessBean bean = (TMomProcessBean)valueLists.get(i);
|
||||||
|
// valueStrs0[i] = bean.getTm2_DocLineNo();
|
||||||
|
// valueStrs1[i] = bean.getTm2_ProjectNam();
|
||||||
|
// valueStrs2[i] = bean.getTm2_ProjectFee();
|
||||||
|
// valueStrs3[i] = bean.getTm2_ProjectMark();
|
||||||
|
// valueStrs4[i] = bean.getTm2_ProjectEqui();
|
||||||
|
// valueStrs5[i] = bean.getTm2_ProjectSuggest();
|
||||||
|
// valueStrs6[i] = bean.getTm2_ONum();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// try
|
||||||
|
// {
|
||||||
|
// if(propertiesArray[0] != null)
|
||||||
|
// propertiesArray[0].setStringValueArray(valueStrs0);
|
||||||
|
// if(propertiesArray[1] != null)
|
||||||
|
// propertiesArray[1].setStringValueArray(valueStrs1);
|
||||||
|
// if(propertiesArray[2] != null)
|
||||||
|
// propertiesArray[2].setStringValueArray(valueStrs2);
|
||||||
|
// if(propertiesArray[3] != null)
|
||||||
|
// propertiesArray[3].setStringValueArray(valueStrs3);
|
||||||
|
// if(propertiesArray[4] != null)
|
||||||
|
// propertiesArray[4].setStringValueArray(valueStrs4);
|
||||||
|
// if(propertiesArray[5] != null)
|
||||||
|
// propertiesArray[5].setStringValueArray(valueStrs5);
|
||||||
|
// if(propertiesArray[6] != null)
|
||||||
|
// propertiesArray[6].setStringValueArray(valueStrs6);
|
||||||
|
// for(int i = 0; i < properties.length; i++)
|
||||||
|
// properties[i].setStringValue(priceValues[i]);
|
||||||
|
//
|
||||||
|
// formComp.setTCProperties(propertiesArray);
|
||||||
|
// formComp.setTCProperties(properties);
|
||||||
|
// }
|
||||||
|
// catch(TCException e)
|
||||||
|
// {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
// catch(Exception e1)
|
||||||
|
// {
|
||||||
|
// e1.printStackTrace();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public boolean checkForSave(Object obj)
|
||||||
|
// {
|
||||||
|
// saveWLProps();
|
||||||
|
// System.out.println("\u7B7E\u5165\u5E76\u4FDD\u5B58");
|
||||||
|
// return super.checkForSave(obj);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void save()
|
||||||
|
// {
|
||||||
|
// saveWLProps();
|
||||||
|
// System.out.println("\u4FDD\u5B58");
|
||||||
|
// super.save();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void init()
|
||||||
|
// {
|
||||||
|
// System.out.println("====>>>> \u521D\u59CB\u5316\u754C\u9762 <1>");
|
||||||
|
// clorMap = new HashMap();
|
||||||
|
// fontMap = new HashMap();
|
||||||
|
// valueLists = new ArrayList();
|
||||||
|
// getFormVlue();
|
||||||
|
// setLayout(new BorderLayout());
|
||||||
|
// setBackground(Color.WHITE);
|
||||||
|
// rootPanel = new JPanel(new BorderLayout());
|
||||||
|
// addButton = new JButton("\u6DFB\u52A0");
|
||||||
|
// addButton.setEnabled(true);
|
||||||
|
// delButton = new JButton("\u5220\u9664");
|
||||||
|
// delButton.setEnabled(true);
|
||||||
|
// emptyLable = new JLabel(" ");
|
||||||
|
// addButton.addActionListener(new ActionListener() {
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// addRow(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final TMomFormStyle this$0;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$0 = TMomFormStyle.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//);
|
||||||
|
// delButton.addActionListener(new ActionListener() {
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// delRow(e);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final TMomFormStyle this$0;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$0 = TMomFormStyle.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//);
|
||||||
|
// partsTable = getjTable(partsTable, dtm, titleNames, getValues(valueLists));
|
||||||
|
// topPanel = new JPanel(new BorderLayout());
|
||||||
|
// scrollPanel = new JScrollPane();
|
||||||
|
// scrollPanel.getViewport().add(partsTable, null);
|
||||||
|
// scrollPanel.validate();
|
||||||
|
// topPanel.add("Center", scrollPanel);
|
||||||
|
// buttomPanel = new JPanel(new FlowLayout());
|
||||||
|
// buttomPanel.add(addButton);
|
||||||
|
// buttomPanel.add(emptyLable);
|
||||||
|
// buttomPanel.add(delButton);
|
||||||
|
// rootPanel = new JPanel(new BorderLayout());
|
||||||
|
// rootPanel.add("Center", topPanel);
|
||||||
|
// rootPanel.add("South", buttomPanel);
|
||||||
|
// JPanel firstPanel = new JPanel(new PropertyLayout());
|
||||||
|
// for(int i = 0; i < TMomFinalUtil.TM2_PRICE_PROP_NAMES_ZH_CH.length; i += 3)
|
||||||
|
// {
|
||||||
|
// propTexts[i] = new JTextField(24);
|
||||||
|
// propTexts[i].setText(priceValues[i]);
|
||||||
|
// firstPanel.add((new StringBuilder(String.valueOf(i / 3 + 1))).append(".1.right.top.preferred.preferred").toString(), new JLabel(TMomFinalUtil.TM2_PRICE_PROP_NAMES_ZH_CH[i]));
|
||||||
|
// firstPanel.add((new StringBuilder(String.valueOf(i / 3 + 1))).append(".2.left.top.preferred.preferred").toString(), propTexts[i]);
|
||||||
|
// if(i + 1 == TMomFinalUtil.TM2_PRICE_PROP_NAMES_ZH_CH.length)
|
||||||
|
// break;
|
||||||
|
// propTexts[i + 1] = new JTextField(24);
|
||||||
|
// propTexts[i + 1].setText(priceValues[i + 1]);
|
||||||
|
// firstPanel.add((new StringBuilder(String.valueOf(i / 3 + 1))).append(".3.right.top.preferred.preferred").toString(), new JLabel(TMomFinalUtil.TM2_PRICE_PROP_NAMES_ZH_CH[i + 1]));
|
||||||
|
// firstPanel.add((new StringBuilder(String.valueOf(i / 3 + 1))).append(".4.left.top.preferred.preferred").toString(), propTexts[i + 1]);
|
||||||
|
// if(i + 2 == TMomFinalUtil.TM2_PRICE_PROP_NAMES_ZH_CH.length)
|
||||||
|
// break;
|
||||||
|
// propTexts[i + 2] = new JTextField(24);
|
||||||
|
// propTexts[i + 2].setText(priceValues[i + 2]);
|
||||||
|
// firstPanel.add((new StringBuilder(String.valueOf(i / 3 + 1))).append(".5.right.top.preferred.preferred").toString(), new JLabel(TMomFinalUtil.TM2_PRICE_PROP_NAMES_ZH_CH[i + 2]));
|
||||||
|
// firstPanel.add((new StringBuilder(String.valueOf(i / 3 + 1))).append(".6.left.top.preferred.preferred").toString(), propTexts[i + 2]);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// JTabbedPane tabPane = new JTabbedPane();
|
||||||
|
// tabPane.add("\u62A5\u4EF7\u4FE1\u606F", new JScrollPane(firstPanel));
|
||||||
|
// tabPane.add("\u5DE5\u827A\u4FE1\u606F", new JScrollPane(rootPanel));
|
||||||
|
// add(tabPane, "Center");
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void addRow(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// new writeWLCodeDialog();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void delRow(ActionEvent e)
|
||||||
|
// {
|
||||||
|
// int index = partsTable.getSelectedRow();
|
||||||
|
// if(index == -1)
|
||||||
|
// {
|
||||||
|
// MessageBox.post("\u8BF7\u9009\u62E9\u8868\u683C\u540E\u518D\u6267\u884C\u5220\u9664\u64CD\u4F5C\uFF01", "Warning", 4);
|
||||||
|
// return;
|
||||||
|
// } else
|
||||||
|
// {
|
||||||
|
// valueLists.remove(index);
|
||||||
|
// dtm.removeRow(index);
|
||||||
|
// dtm.fireTableStructureChanged();
|
||||||
|
// dtm.fireTableDataChanged();
|
||||||
|
// scrollPanel.validate();
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public JTable getjTable(JTable partsTable, DefaultTableModel dtm, Object titleNames[], Object values[][])
|
||||||
|
// {
|
||||||
|
// int simpleLen = 105;
|
||||||
|
// int totleLen = 900;
|
||||||
|
// if(partsTable == null)
|
||||||
|
// {
|
||||||
|
// partsTable = new JTable(getTableModel(dtm, titleNames, values)) {
|
||||||
|
//
|
||||||
|
// public boolean isCellEditable(int row, int column)
|
||||||
|
// {
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// final TMomFormStyle this$0;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// this$0 = TMomFormStyle.this;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//;
|
||||||
|
// partsTable.setDefaultRenderer(Object.class, new TableCellTextAreaRenderer());
|
||||||
|
// if(simpleLen * titleNames.length >= totleLen)
|
||||||
|
// {
|
||||||
|
// for(int i = 0; i < titleNames.length; i++)
|
||||||
|
// partsTable.getColumnModel().getColumn(i).setPreferredWidth(105);
|
||||||
|
//
|
||||||
|
// partsTable.setAutoResizeMode(0);
|
||||||
|
// } else
|
||||||
|
// {
|
||||||
|
// partsTable.setAutoResizeMode(1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return partsTable;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public DefaultTableModel getTableModel(DefaultTableModel dtm, Object columNameObjects[], Object objects[][])
|
||||||
|
// {
|
||||||
|
// if(dtm == null)
|
||||||
|
// dtm = new DefaultTableModel(objects, columNameObjects);
|
||||||
|
// return dtm;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public java.util.List getAllChildItemId()
|
||||||
|
// {
|
||||||
|
// java.util.List idList = new ArrayList();
|
||||||
|
// return idList;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public Object[][] getValues(java.util.List beanList)
|
||||||
|
// {
|
||||||
|
// Object objects[][] = new Object[beanList.size()][7];
|
||||||
|
// for(int i = 0; i < beanList.size(); i++)
|
||||||
|
// {
|
||||||
|
// objects[i][0] = ((TMomProcessBean)beanList.get(i)).getTm2_DocLineNo();
|
||||||
|
// objects[i][1] = ((TMomProcessBean)beanList.get(i)).getTm2_ProjectNam();
|
||||||
|
// objects[i][2] = ((TMomProcessBean)beanList.get(i)).getTm2_ProjectFee();
|
||||||
|
// objects[i][3] = ((TMomProcessBean)beanList.get(i)).getTm2_ProjectMark();
|
||||||
|
// objects[i][4] = ((TMomProcessBean)beanList.get(i)).getTm2_ProjectEqui();
|
||||||
|
// objects[i][5] = ((TMomProcessBean)beanList.get(i)).getTm2_ProjectSuggest();
|
||||||
|
// objects[i][6] = ((TMomProcessBean)beanList.get(i)).getTm2_ONum();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return objects;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void setClipboard(String str)
|
||||||
|
// {
|
||||||
|
// StringSelection ss = new StringSelection(str);
|
||||||
|
// Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void actionPerformed(ActionEvent actionevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void loadRendering()
|
||||||
|
// throws TCException
|
||||||
|
// {
|
||||||
|
// init();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void saveRendering()
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public static void main(String args1[])
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void keyTyped(KeyEvent keyevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void keyPressed(KeyEvent e)
|
||||||
|
// {
|
||||||
|
// int colIndex = partsTable.getSelectedColumn();
|
||||||
|
// int rowIndex = partsTable.getSelectedRow();
|
||||||
|
// if(colIndex == 0 && rowIndex == partsTable.getRowCount() - 1)
|
||||||
|
// e.getKeyCode();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void keyReleased(KeyEvent keyevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void mouseClicked(MouseEvent mouseevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void mousePressed(MouseEvent mouseevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void mouseReleased(MouseEvent mouseevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void mouseEntered(MouseEvent mouseevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// public void mouseExited(MouseEvent mouseevent)
|
||||||
|
// {
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private JPanel rootPanel;
|
||||||
|
// private JPanel topPanel;
|
||||||
|
// private JPanel buttomPanel;
|
||||||
|
// private JScrollPane scrollPanel;
|
||||||
|
// private JLabel emptyLable;
|
||||||
|
// private JButton addButton;
|
||||||
|
// private JButton delButton;
|
||||||
|
// private JTable partsTable;
|
||||||
|
// private Object titleNames[] = {
|
||||||
|
// "\u884C\u53F7", "\u5DE5\u5E8F", "\u5DE5\u5E8F\u8D39", "\u5DE5\u5E8F\u5907\u6CE8", "\u5DE5\u5E8F\u8BBE\u5907", "\u9879\u76EE\u5EFA\u8BAE", "\u6392\u5E8F\u53F7"
|
||||||
|
// };
|
||||||
|
// private HashMap clorMap;
|
||||||
|
// private HashMap fontMap;
|
||||||
|
// private String priceValues[];
|
||||||
|
// private java.util.List valueLists;
|
||||||
|
// private DefaultTableModel dtm;
|
||||||
|
// private int recordIndex;
|
||||||
|
// private TCComponent formComp;
|
||||||
|
// private TCProperty properties[];
|
||||||
|
// private TCProperty propertiesArray[];
|
||||||
|
// private JTextField propTexts[];
|
||||||
|
// private JTree tree;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//
|
||||||
|
///*
|
||||||
|
// DECOMPILATION REPORT
|
||||||
|
//
|
||||||
|
// Decompiled from: Z:\peixun\eclipse\workspace\com.connor.ac\aclib\com.connor.dongmu.plm_1.0.0.jar
|
||||||
|
// Total time: 103 ms
|
||||||
|
// Jad reported messages/errors:
|
||||||
|
// Exit status: 0
|
||||||
|
// Caught exceptions:
|
||||||
|
//*/
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
|
||||||
|
// Jad home page: http://www.kpdus.com/jad.html
|
||||||
|
// Decompiler options: packimports(3) radix(10) lradix(10)
|
||||||
|
// Source File Name: TMomFormStyle.java
|
||||||
|
|
||||||
|
package com.connor.AC_01;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Component;
|
||||||
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.JTextArea;
|
||||||
|
import javax.swing.table.*;
|
||||||
|
|
||||||
|
public class TableCellTextAreaRenderer extends JTextArea
|
||||||
|
implements TableCellRenderer
|
||||||
|
{
|
||||||
|
|
||||||
|
private int rowIndex;
|
||||||
|
private Color color;
|
||||||
|
private boolean isSet = false;
|
||||||
|
public TableCellTextAreaRenderer()
|
||||||
|
{
|
||||||
|
setLineWrap(true);
|
||||||
|
setWrapStyleWord(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
|
||||||
|
{
|
||||||
|
|
||||||
|
if(isSet){
|
||||||
|
if (row == rowIndex) {
|
||||||
|
setBackground(color);
|
||||||
|
setForeground(Color.BLACK);
|
||||||
|
}else if(row > rowIndex){
|
||||||
|
setBackground(Color.WHITE);
|
||||||
|
setForeground(Color.BLACK);
|
||||||
|
}else{
|
||||||
|
setBackground(Color.WHITE);
|
||||||
|
setForeground(Color.BLACK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int maxPreferredHeight = 0;
|
||||||
|
for(int i = 0; i < table.getColumnCount(); i++)
|
||||||
|
{
|
||||||
|
setText((new StringBuilder()).append(table.getValueAt(row, i)).toString());
|
||||||
|
setSize(table.getColumnModel().getColumn(column).getWidth(), 0);
|
||||||
|
maxPreferredHeight = Math.max(maxPreferredHeight, getPreferredSize().height);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(table.getRowHeight(row) != maxPreferredHeight)
|
||||||
|
table.setRowHeight(row, maxPreferredHeight);
|
||||||
|
setText(value != null ? value.toString() : "");
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setOneRowBackgroundColor(JTable partsTable, boolean table, final int rowIndex1,
|
||||||
|
final Color color1) {
|
||||||
|
isSet=table;
|
||||||
|
rowIndex = rowIndex1;
|
||||||
|
color = color1;
|
||||||
|
int columnCount = partsTable.getColumnCount();
|
||||||
|
for (int i = 0; i < columnCount; i++) {
|
||||||
|
partsTable.getColumn(partsTable.getColumnName(i)).setCellRenderer(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
DECOMPILATION REPORT
|
||||||
|
|
||||||
|
Decompiled from: Z:\peixun\eclipse\workspace\com.connor.ac\aclib\com.connor.dongmu.plm_1.0.0.jar
|
||||||
|
Total time: 57 ms
|
||||||
|
Jad reported messages/errors:
|
||||||
|
Exit status: 0
|
||||||
|
Caught exceptions:
|
||||||
|
*/
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.connor.AC_05;
|
||||||
|
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
||||||
|
import com.teamcenter.rac.aif.common.actions.AbstractAIFAction;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
|
||||||
|
public class ProblemReportImportAction extends AbstractAIFAction {
|
||||||
|
private AbstractAIFApplication app;
|
||||||
|
private String commandName;
|
||||||
|
|
||||||
|
public ProblemReportImportAction(AbstractAIFApplication app, String commandName) {
|
||||||
|
super(app, commandName);
|
||||||
|
this.app = app;
|
||||||
|
this.commandName = commandName;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
//µ÷ÓÃCommand
|
||||||
|
ProblemReportImportCommand command = new ProblemReportImportCommand(this.app);
|
||||||
|
try {
|
||||||
|
command.executeModal();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.connor.AC_05;
|
||||||
|
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFCommand;
|
||||||
|
|
||||||
|
public class ProblemReportImportCommand extends AbstractAIFCommand {
|
||||||
|
private AbstractAIFApplication app;
|
||||||
|
public ProblemReportImportCommand(AbstractAIFApplication app) {
|
||||||
|
this.app = app;
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeModal() throws Exception {
|
||||||
|
ProblemReportImportDialog dialog = new ProblemReportImportDialog(app);
|
||||||
|
new Thread(dialog)
|
||||||
|
.start();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,234 @@
|
|||||||
|
package com.connor.AC_05;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.FlowLayout;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.Box;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JCheckBox;
|
||||||
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JFileChooser;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTable;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.table.DefaultTableModel;
|
||||||
|
import javax.swing.table.TableColumnModel;
|
||||||
|
|
||||||
|
import com.connor.ac.util.ACFinalUtil;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFDialog;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentFolder;
|
||||||
|
import com.teamcenter.rac.kernel.TCException;
|
||||||
|
import com.teamcenter.rac.kernel.TCPreferenceService;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.stylesheet.PropertyDateComponent;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class ProblemReportImportDialog extends AbstractAIFDialog {
|
||||||
|
private AbstractAIFApplication app;
|
||||||
|
private TCSession session;
|
||||||
|
|
||||||
|
private String url;
|
||||||
|
private String[] modelFiles;
|
||||||
|
|
||||||
|
private TCComponentFolder targetFolder;
|
||||||
|
|
||||||
|
private JButton b_reload;
|
||||||
|
private JButton b_imp;
|
||||||
|
private JButton b_cel;
|
||||||
|
protected JComboBox<String> b_company;
|
||||||
|
protected DefaultTableModel tm_pro;
|
||||||
|
protected JTable t_pro;
|
||||||
|
|
||||||
|
public String[] HEADER = new String[] { "序号", "问题ID", "重要度", "用户要求整改期","提交人", "提交次数", "子项目号", "图片说明", "问题说明", "原因分析(提出者必填)","整改责任人","整改计划完成时间","采购责任人","采购计划完成时间","加工责任人","加工计划完成时间","实施负责人","实施计划完成时间","状态"};
|
||||||
|
public int[] HEADERWIDTH = new int[] { 50, 100, 50, 100,50, 50, 100, 70, 100, 100, 80, 80, 80, 80, 80, 80, 80, 80 };
|
||||||
|
|
||||||
|
public ProblemReportImportDialog(AbstractAIFApplication app) {
|
||||||
|
super(false);
|
||||||
|
this.app = app;
|
||||||
|
this.session = (TCSession) this.app.getSession();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
System.out.println("开始执行");
|
||||||
|
targetFolder = (TCComponentFolder)app.getTargetComponent();
|
||||||
|
String folderName = targetFolder.getStringProperty("object_name");
|
||||||
|
if(folderName.equals("6、问题反馈")){
|
||||||
|
System.out.println(targetFolder==null);
|
||||||
|
System.out.println(folderName);
|
||||||
|
if(targetFolder!=null){
|
||||||
|
//-------------------------------------/-------------------------------
|
||||||
|
chooserLoading();
|
||||||
|
showDialog();
|
||||||
|
//-------------------------------------/-------------------------------
|
||||||
|
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("请选择\"6、问题反馈\"文件夹","提示",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
} catch (TCException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
MessageBox.post("请选择\"6、问题反馈\"文件夹","提示",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void chooserLoading(){
|
||||||
|
JFileChooser chooser = new JFileChooser();
|
||||||
|
int statu = chooser.showOpenDialog(this);
|
||||||
|
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
|
||||||
|
if(statu==JFileChooser.APPROVE_OPTION){
|
||||||
|
File f = chooser.getSelectedFile();
|
||||||
|
this.url= f.getPath();
|
||||||
|
initUI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addListeners() {
|
||||||
|
|
||||||
|
this.b_reload.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent arg0) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.b_cel.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent arg0) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.b_imp.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent arg0) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initUI() {
|
||||||
|
this.setTitle("页面");
|
||||||
|
this.setPreferredSize(new Dimension(1300, 400));
|
||||||
|
this.setMinimumSize(new Dimension(800, 300));
|
||||||
|
this.setLayout(new BorderLayout());
|
||||||
|
JPanel jpa = initQueryPanel();
|
||||||
|
JPanel jpa1 = initTablePanel();
|
||||||
|
JPanel jpa2 = initBtnPanel();
|
||||||
|
if(jpa!=null && jpa1!=null && jpa2!=null){
|
||||||
|
this.add(BorderLayout.NORTH, jpa);
|
||||||
|
this.add(BorderLayout.CENTER, jpa1);
|
||||||
|
this.add(BorderLayout.SOUTH, jpa2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private JPanel initBtnPanel() {
|
||||||
|
JPanel panel = new JPanel();
|
||||||
|
Box b1=Box.createHorizontalBox(); //创建横向Box容器
|
||||||
|
panel.add(b1);
|
||||||
|
// b1.add(Box.createVerticalStrut(100));
|
||||||
|
b1.add(Box.createHorizontalGlue());
|
||||||
|
b_imp = new JButton("导入并发起流程");
|
||||||
|
b1.add(b_imp);
|
||||||
|
b1.add(Box.createHorizontalStrut(40)); //添加长度为40的水平框架
|
||||||
|
b_cel = new JButton("取消");
|
||||||
|
b1.add(b_cel);
|
||||||
|
b1.add(Box.createHorizontalGlue());
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initTablePanel() {
|
||||||
|
JPanel panel = new JPanel(new BorderLayout());
|
||||||
|
panel.setBorder(BorderFactory.createEmptyBorder(0, 5, 5, 5));
|
||||||
|
tm_pro = new DefaultTableModel() {
|
||||||
|
@Override
|
||||||
|
public boolean isCellEditable(int row, int column) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<?> getColumnClass(int columnIndex) {
|
||||||
|
if(columnIndex==0) {
|
||||||
|
return Double.class;
|
||||||
|
}
|
||||||
|
return super.getColumnClass(columnIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
t_pro = new JTable(tm_pro);
|
||||||
|
tm_pro.setDataVector(null, HEADER);
|
||||||
|
t_pro.getTableHeader().setReorderingAllowed(false); // 设置列不可移动,否则会发生类型转换错误(第三列)
|
||||||
|
this.t_pro.setRowHeight(23);
|
||||||
|
this.t_pro.setAutoCreateRowSorter(true);
|
||||||
|
//TableRowSorter<DefaultTableModel> sorter=new TableRowSorter<DefaultTableModel>(tm_workflow);
|
||||||
|
//this.t_pro.setRowSorter(sorter);
|
||||||
|
// this.t_part.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
|
||||||
|
TableColumnModel colModel = this.t_pro.getColumnModel();
|
||||||
|
int colCnt = HEADERWIDTH.length;
|
||||||
|
colModel.getColumn(0).setMaxWidth(HEADERWIDTH[0]);
|
||||||
|
for (int i = 0; i < colCnt; i++) {
|
||||||
|
colModel.getColumn(i).setPreferredWidth(HEADERWIDTH[i]);
|
||||||
|
}
|
||||||
|
JScrollPane scroll = new JScrollPane(t_pro);
|
||||||
|
panel.add(BorderLayout.CENTER, scroll);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initQueryPanel() {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 0));
|
||||||
|
panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 7, 5));
|
||||||
|
String folderProId = null;
|
||||||
|
try {
|
||||||
|
if(targetFolder!=null){
|
||||||
|
folderProId = targetFolder.getStringProperty("project_ids");
|
||||||
|
}else{
|
||||||
|
MessageBox.post("未指派项目","提示",MessageBox.INFORMATION);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
} catch (TCException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
JTextField xm_text = new JTextField(folderProId);
|
||||||
|
Dimension dim1 = new Dimension(150, 25);
|
||||||
|
xm_text.setPreferredSize(dim1);
|
||||||
|
xm_text.setEditable(false);
|
||||||
|
panel.add(new JLabel("项目号 "));
|
||||||
|
panel.add(xm_text);
|
||||||
|
|
||||||
|
panel.add(new JLabel(" 工作流程模板 "));
|
||||||
|
TCPreferenceService service = session.getPreferenceService();
|
||||||
|
modelFiles = service.getStringValues(ACFinalUtil.AC_Workflow_Temp_Name);
|
||||||
|
if(modelFiles==null){
|
||||||
|
MessageBox.post("未配置AC_Workflow_Temp_Name首选项","提示",MessageBox.INFORMATION);
|
||||||
|
modelFiles = new String[]{};
|
||||||
|
}
|
||||||
|
for (int i = 0; i < modelFiles.length; i++) {
|
||||||
|
modelFiles[i] = modelFiles[i].split("=")[0];
|
||||||
|
}
|
||||||
|
b_company = new JComboBox<String>(modelFiles);
|
||||||
|
panel.add(b_company);
|
||||||
|
Dimension dim = new Dimension(80, 25);
|
||||||
|
|
||||||
|
b_reload = new JButton("重新加载");
|
||||||
|
b_reload.setPreferredSize(dim);
|
||||||
|
panel.add(b_reload);
|
||||||
|
return panel;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.connor.AC_05;
|
||||||
|
|
||||||
|
import org.eclipse.core.commands.AbstractHandler;
|
||||||
|
import org.eclipse.core.commands.ExecutionEvent;
|
||||||
|
import org.eclipse.core.commands.ExecutionException;
|
||||||
|
import org.eclipse.core.commands.common.NotDefinedException;
|
||||||
|
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
||||||
|
import com.teamcenter.rac.aifrcp.AIFUtility;
|
||||||
|
|
||||||
|
public class ProblemReportImportHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
|
AbstractAIFApplication app = AIFUtility.getCurrentApplication();
|
||||||
|
String commandName = null;
|
||||||
|
try {
|
||||||
|
commandName = arg0.getCommand().getName();
|
||||||
|
} catch (NotDefinedException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
ProblemReportImportAction action = new ProblemReportImportAction(app, commandName);
|
||||||
|
new Thread(action).start();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.connor.ac;
|
||||||
|
|
||||||
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The activator class controls the plug-in life cycle
|
||||||
|
*/
|
||||||
|
public class Activator extends AbstractUIPlugin {
|
||||||
|
|
||||||
|
// The plug-in ID
|
||||||
|
public static final String PLUGIN_ID = "com.connor.ac"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
// The shared instance
|
||||||
|
private static Activator plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The constructor
|
||||||
|
*/
|
||||||
|
public Activator() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||||
|
*/
|
||||||
|
public void start(BundleContext context) throws Exception {
|
||||||
|
super.start(context);
|
||||||
|
plugin = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||||
|
*/
|
||||||
|
public void stop(BundleContext context) throws Exception {
|
||||||
|
plugin = null;
|
||||||
|
super.stop(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the shared instance
|
||||||
|
*
|
||||||
|
* @return the shared instance
|
||||||
|
*/
|
||||||
|
public static Activator getDefault() {
|
||||||
|
return plugin;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an image descriptor for the image file at the given
|
||||||
|
* plug-in relative path
|
||||||
|
*
|
||||||
|
* @param path the path
|
||||||
|
* @return the image descriptor
|
||||||
|
*/
|
||||||
|
public static ImageDescriptor getImageDescriptor(String path) {
|
||||||
|
return imageDescriptorFromPlugin(PLUGIN_ID, path);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package com.connor.ac.bean;
|
||||||
|
|
||||||
|
public class SysCatalogRevisionMasterBean {
|
||||||
|
private String ysr8_ID;//代号
|
||||||
|
private String ysr8_object;//名称
|
||||||
|
private String ysr8_Quantity;//数量
|
||||||
|
private String ysr8_Category;//子项类别
|
||||||
|
private String ysr8_Electric;//是否需要电气
|
||||||
|
private String ysr8_Cost;//计划成本
|
||||||
|
private String ysr8_Cancel;//子项取消
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private String ysr8_Designer;//设计人员
|
||||||
|
private String ysr8_SubProjectType;//子项类型
|
||||||
|
private String ysr8_CustomPartCode;//用户图号
|
||||||
|
private String ysr8_PlanWorkTime;//计划工时
|
||||||
|
public String getYsr8_Designer() {
|
||||||
|
return ysr8_Designer;
|
||||||
|
}
|
||||||
|
public void setYsr8_Designer(String ysr8_Designer) {
|
||||||
|
this.ysr8_Designer = ysr8_Designer;
|
||||||
|
}
|
||||||
|
public String getYsr8_SubProjectType() {
|
||||||
|
return ysr8_SubProjectType;
|
||||||
|
}
|
||||||
|
public void setYsr8_SubProjectType(String ysr8_SubProjectType) {
|
||||||
|
this.ysr8_SubProjectType = ysr8_SubProjectType;
|
||||||
|
}
|
||||||
|
public String getYsr8_CustomPartCode() {
|
||||||
|
return ysr8_CustomPartCode;
|
||||||
|
}
|
||||||
|
public void setYsr8_CustomPartCode(String ysr8_CustomPartCode) {
|
||||||
|
this.ysr8_CustomPartCode = ysr8_CustomPartCode;
|
||||||
|
}
|
||||||
|
public String getYsr8_PlanWorkTime() {
|
||||||
|
return ysr8_PlanWorkTime;
|
||||||
|
}
|
||||||
|
public void setYsr8_PlanWorkTime(String ysr8_PlanWorkTime) {
|
||||||
|
this.ysr8_PlanWorkTime = ysr8_PlanWorkTime;
|
||||||
|
}
|
||||||
|
public String getYsr8_ID() {
|
||||||
|
return ysr8_ID;
|
||||||
|
}
|
||||||
|
public void setYsr8_ID(String ysr8_ID) {
|
||||||
|
this.ysr8_ID = ysr8_ID;
|
||||||
|
}
|
||||||
|
public String getYsr8_object() {
|
||||||
|
return ysr8_object;
|
||||||
|
}
|
||||||
|
public void setYsr8_object(String ysr8_object) {
|
||||||
|
this.ysr8_object = ysr8_object;
|
||||||
|
}
|
||||||
|
public String getYsr8_Quantity() {
|
||||||
|
return ysr8_Quantity;
|
||||||
|
}
|
||||||
|
public void setYsr8_Quantity(String ysr8_Quantity) {
|
||||||
|
this.ysr8_Quantity = ysr8_Quantity;
|
||||||
|
}
|
||||||
|
public String getYsr8_Category() {
|
||||||
|
return ysr8_Category;
|
||||||
|
}
|
||||||
|
public void setYsr8_Category(String ysr8_Category) {
|
||||||
|
this.ysr8_Category = ysr8_Category;
|
||||||
|
}
|
||||||
|
public String getYsr8_Electric() {
|
||||||
|
return ysr8_Electric;
|
||||||
|
}
|
||||||
|
public void setYsr8_Electric(String ysr8_Electric) {
|
||||||
|
this.ysr8_Electric = ysr8_Electric;
|
||||||
|
}
|
||||||
|
public String getYsr8_Cost() {
|
||||||
|
return ysr8_Cost;
|
||||||
|
}
|
||||||
|
public void setYsr8_Cost(String ysr8_Cost) {
|
||||||
|
this.ysr8_Cost = ysr8_Cost;
|
||||||
|
}
|
||||||
|
public String getYsr8_Cancel() {
|
||||||
|
return ysr8_Cancel;
|
||||||
|
}
|
||||||
|
public void setYsr8_Cancel(String ysr8_Cancel) {
|
||||||
|
this.ysr8_Cancel = ysr8_Cancel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.connor.ac.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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Our sample handler extends AbstractHandler, an IHandler base class.
|
||||||
|
* @see org.eclipse.core.commands.IHandler
|
||||||
|
* @see org.eclipse.core.commands.AbstractHandler
|
||||||
|
*/
|
||||||
|
public class SampleHandler extends AbstractHandler {
|
||||||
|
/**
|
||||||
|
* The constructor.
|
||||||
|
*/
|
||||||
|
public SampleHandler() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the command has been executed, so extract extract the needed information
|
||||||
|
* from the application context.
|
||||||
|
*/
|
||||||
|
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||||
|
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
|
||||||
|
MessageDialog.openInformation(
|
||||||
|
window.getShell(),
|
||||||
|
"Ac",
|
||||||
|
"Hello, Eclipse world");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.connor.ac.util;
|
||||||
|
|
||||||
|
public class ACFinalUtil {
|
||||||
|
public static final String AC_CATALOG_PROP_NAMES[] = { "ysr8_ID", "ysr8_object", "ysr8_Quantity","ysr8_Designer1", "ysr8_Category", "ysr8_SubProjectType1","ysr8_Electric",
|
||||||
|
"ysr8_CustomPartCode1","ysr8_Cost", "ysr8_Cancel","ysr8_PlanWorkTime" };
|
||||||
|
public static final String AC_CATALOG_PROP_NAMES_ZH_CH[] = {};
|
||||||
|
// ---------------ALL----------------------------------------------
|
||||||
|
public static final String EXCEL_MODEL_FILE = "YSR_SysCatalog_Model";// Excel模板文件
|
||||||
|
//public static final String AC_Workflow_Temp_Name = "AC_Workflow_Temp_Name";// 工作流程模板名称
|
||||||
|
public static final String AC_Workflow_Temp_Name = "Connor_Import_Item_Workflow";// 工作流程模板名称
|
||||||
|
}
|
||||||
@ -0,0 +1 @@
|
|||||||
|
YSR8_SysCatalogRevisionMaster.FORMJAVARENDERING=com.connor.AC_01.ACSysCatalogStyle
|
||||||
Loading…
Reference in new issue