commit
06862c3977
@ -0,0 +1,91 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/sqljdbc4.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/k.util_1.0.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/commons-beanutils-1.7.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/commons-collections-3.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/commons-lang-2.4.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/commons-logging-1.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/ezmorph-1.0.4.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/fastjson-1.2.9-javadoc.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/fastjson-1.2.9-sources.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/fastjson-1.2.9.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/jdom.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/json-lib-2.2.2-jdk15.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="jsonlib/json-lib-2.2.3-jdk13.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/activation-1.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/antlr-2.7.7.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/apache-mime4j-core-0.7.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axiom-api-1.2.13.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axiom-dom-1.2.13.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axiom-impl-1.2.13.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-adb-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-adb-codegen-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-ant-plugin-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-clustering-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-codegen-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-corba-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-fastinfoset-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-java2wsdl-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-jaxbri-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-jaxws-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-jibx-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-json-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-kernel-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-metadata-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-mtompolicy-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-saaj-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-soapmonitor-servlet-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-spring-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-transport-http-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-transport-local-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/axis2-xmlbeans-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/bcel-5.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/commons-cli-1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/commons-codec-1.3.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/commons-fileupload-1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/commons-httpclient-3.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/commons-io-1.4.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/commons-logging-1.1.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/geronimo-annotation_1.0_spec-1.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/geronimo-jaxws_2.2_spec-1.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/geronimo-jta_1.1_spec-1.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/geronimo-saaj_1.3_spec-1.0.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/httpcore-4.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/hutool-all-5.0.7.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jalopy-1.5rc3.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jaxb-api-2.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jaxb-impl-2.1.7.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jaxb-xjc-2.1.7.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jaxen-1.1.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jaxws-tools-2.1.3.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jettison-1.0-RC2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jibx-bind-1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jibx-run-1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/jsr311-api-1.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/juli-6.0.16.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/log4j-1.2.15.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/mail-1.4.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/mex-1.6.2-impl.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/neethi-3.0.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/regexp-1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/tribes-6.0.16.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/woden-api-1.0M9.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/woden-impl-commons-1.0M9.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/woden-impl-dom-1.0M9.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/wsdl4j-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/wstx-asl-3.2.9.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/xalan-2.7.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/xml-resolver-1.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/xmlbeans-2.3.0.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="axis2_lib/XmlSchema-1.4.7.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/jfxrt.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/jfxswt.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="lib/ojdbc7.jar"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.connor.zf</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,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
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Zf
|
||||||
|
Bundle-SymbolicName: com.connor.zf;singleton:=true
|
||||||
|
Bundle-Version: 1.0.0
|
||||||
|
Bundle-Vendor: CONNOR
|
||||||
|
Require-Bundle: org.eclipse.ui,
|
||||||
|
com.teamcenter.rac.common;bundle-version="13000.1.0",
|
||||||
|
com.teamcenter.rac.kernel;bundle-version="13000.1.0",
|
||||||
|
com.teamcenter.rac.tcapps;bundle-version="13000.1.0",
|
||||||
|
com.teamcenter.rac.aifrcp;bundle-version="13000.1.0",
|
||||||
|
com.teamcenter.rac.util;bundle-version="13000.1.0",
|
||||||
|
org.eclipse.core.runtime;bundle-version="3.15.100",
|
||||||
|
TcSoaCoreLoose;bundle-version="13000.1.0",
|
||||||
|
TcSoaCoreRac;bundle-version="13000.1.0",
|
||||||
|
TcSoaCoreTypes;bundle-version="13000.1.0",
|
||||||
|
com.teamcenter.rac.external;bundle-version="13000.1.0"
|
||||||
|
Automatic-Module-Name: com.connor.zf
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
|
Bundle-ClassPath: .,
|
||||||
|
lib/ojdbc7.jar,
|
||||||
|
lib/jfxrt.jar,
|
||||||
|
lib/jfxswt.jar,
|
||||||
|
axis2_lib/activation-1.1.jar,
|
||||||
|
axis2_lib/antlr-2.7.7.jar,
|
||||||
|
axis2_lib/apache-mime4j-core-0.7.2.jar,
|
||||||
|
axis2_lib/axiom-api-1.2.13.jar,
|
||||||
|
axis2_lib/axiom-dom-1.2.13.jar,
|
||||||
|
axis2_lib/axiom-impl-1.2.13.jar,
|
||||||
|
axis2_lib/axis2-adb-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-adb-codegen-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-ant-plugin-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-clustering-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-codegen-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-corba-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-fastinfoset-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-java2wsdl-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-jaxbri-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-jaxws-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-jibx-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-json-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-kernel-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-metadata-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-mtompolicy-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-saaj-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-soapmonitor-servlet-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-spring-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-transport-http-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-transport-local-1.6.2.jar,
|
||||||
|
axis2_lib/axis2-xmlbeans-1.6.2.jar,
|
||||||
|
axis2_lib/bcel-5.1.jar,
|
||||||
|
axis2_lib/commons-cli-1.2.jar,
|
||||||
|
axis2_lib/commons-codec-1.3.jar,
|
||||||
|
axis2_lib/commons-fileupload-1.2.jar,
|
||||||
|
axis2_lib/commons-httpclient-3.1.jar,
|
||||||
|
axis2_lib/commons-io-1.4.jar,
|
||||||
|
axis2_lib/commons-logging-1.1.1.jar,
|
||||||
|
axis2_lib/geronimo-annotation_1.0_spec-1.1.jar,
|
||||||
|
axis2_lib/geronimo-jaxws_2.2_spec-1.0.jar,
|
||||||
|
axis2_lib/geronimo-jta_1.1_spec-1.1.jar,
|
||||||
|
axis2_lib/geronimo-saaj_1.3_spec-1.0.1.jar,
|
||||||
|
axis2_lib/geronimo-stax-api_1.0_spec-1.0.1.jar,
|
||||||
|
axis2_lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar,
|
||||||
|
axis2_lib/httpcore-4.0.jar,
|
||||||
|
axis2_lib/hutool-all-5.0.7.jar,
|
||||||
|
axis2_lib/jalopy-1.5rc3.jar,
|
||||||
|
axis2_lib/jaxb-api-2.1.jar,
|
||||||
|
axis2_lib/jaxb-impl-2.1.7.jar,
|
||||||
|
axis2_lib/jaxb-xjc-2.1.7.jar,
|
||||||
|
axis2_lib/jaxen-1.1.1.jar,
|
||||||
|
axis2_lib/jaxws-tools-2.1.3.jar,
|
||||||
|
axis2_lib/jettison-1.0-RC2.jar,
|
||||||
|
axis2_lib/jibx-bind-1.2.jar,
|
||||||
|
axis2_lib/jibx-run-1.2.jar,
|
||||||
|
axis2_lib/jsr311-api-1.0.jar,
|
||||||
|
axis2_lib/juli-6.0.16.jar,
|
||||||
|
axis2_lib/log4j-1.2.15.jar,
|
||||||
|
axis2_lib/mail-1.4.jar,
|
||||||
|
axis2_lib/mex-1.6.2-impl.jar,
|
||||||
|
axis2_lib/neethi-3.0.2.jar,
|
||||||
|
axis2_lib/regexp-1.2.jar,
|
||||||
|
axis2_lib/tribes-6.0.16.jar,
|
||||||
|
axis2_lib/woden-api-1.0M9.jar,
|
||||||
|
axis2_lib/woden-impl-commons-1.0M9.jar,
|
||||||
|
axis2_lib/woden-impl-dom-1.0M9.jar,
|
||||||
|
axis2_lib/wsdl4j-1.6.2.jar,
|
||||||
|
axis2_lib/wstx-asl-3.2.9.jar,
|
||||||
|
axis2_lib/xalan-2.7.0.jar,
|
||||||
|
axis2_lib/xml-resolver-1.2.jar,
|
||||||
|
axis2_lib/xmlbeans-2.3.0.jar,
|
||||||
|
axis2_lib/XmlSchema-1.4.7.jar,
|
||||||
|
jsonlib/commons-beanutils-1.7.0.jar,
|
||||||
|
jsonlib/commons-collections-3.2.jar,
|
||||||
|
jsonlib/commons-lang-2.4.jar,
|
||||||
|
jsonlib/commons-logging-1.1.jar,
|
||||||
|
jsonlib/ezmorph-1.0.4.jar,
|
||||||
|
jsonlib/fastjson-1.2.9-javadoc.jar,
|
||||||
|
jsonlib/fastjson-1.2.9-sources.jar,
|
||||||
|
jsonlib/fastjson-1.2.9.jar,
|
||||||
|
jsonlib/jdom.jar,
|
||||||
|
jsonlib/json-lib-2.2.2-jdk15.jar,
|
||||||
|
jsonlib/json-lib-2.2.3-jdk13.jar,
|
||||||
|
lib/k.util_1.0.0.jar,
|
||||||
|
lib/sqljdbc4.jar
|
||||||
|
Export-Package: com.connor.zf.dbom2ebom
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
/com/
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
source.. = src/
|
||||||
|
output.. = bin/
|
||||||
|
bin.includes = plugin.xml,\
|
||||||
|
META-INF/,\
|
||||||
|
.,\
|
||||||
|
icons/,\
|
||||||
|
lib/ojdbc7.jar,\
|
||||||
|
lib/jfxrt.jar,\
|
||||||
|
lib/jfxswt.jar,\
|
||||||
|
axis2_lib/activation-1.1.jar,\
|
||||||
|
axis2_lib/antlr-2.7.7.jar,\
|
||||||
|
axis2_lib/apache-mime4j-core-0.7.2.jar,\
|
||||||
|
axis2_lib/axiom-api-1.2.13.jar,\
|
||||||
|
axis2_lib/axiom-dom-1.2.13.jar,\
|
||||||
|
axis2_lib/axiom-impl-1.2.13.jar,\
|
||||||
|
axis2_lib/axis2-adb-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-adb-codegen-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-ant-plugin-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-clustering-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-codegen-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-corba-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-fastinfoset-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-java2wsdl-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-jaxbri-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-jaxws-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-jibx-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-json-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-kernel-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-metadata-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-mtompolicy-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-saaj-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-soapmonitor-servlet-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-spring-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-transport-http-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-transport-local-1.6.2.jar,\
|
||||||
|
axis2_lib/axis2-xmlbeans-1.6.2.jar,\
|
||||||
|
axis2_lib/bcel-5.1.jar,\
|
||||||
|
axis2_lib/commons-cli-1.2.jar,\
|
||||||
|
axis2_lib/commons-codec-1.3.jar,\
|
||||||
|
axis2_lib/commons-fileupload-1.2.jar,\
|
||||||
|
axis2_lib/commons-httpclient-3.1.jar,\
|
||||||
|
axis2_lib/commons-io-1.4.jar,\
|
||||||
|
axis2_lib/commons-logging-1.1.1.jar,\
|
||||||
|
axis2_lib/geronimo-annotation_1.0_spec-1.1.jar,\
|
||||||
|
axis2_lib/geronimo-jaxws_2.2_spec-1.0.jar,\
|
||||||
|
axis2_lib/geronimo-jta_1.1_spec-1.1.jar,\
|
||||||
|
axis2_lib/geronimo-saaj_1.3_spec-1.0.1.jar,\
|
||||||
|
axis2_lib/geronimo-stax-api_1.0_spec-1.0.1.jar,\
|
||||||
|
axis2_lib/geronimo-ws-metadata_2.0_spec-1.1.2.jar,\
|
||||||
|
axis2_lib/httpcore-4.0.jar,\
|
||||||
|
axis2_lib/hutool-all-5.0.7.jar,\
|
||||||
|
axis2_lib/jalopy-1.5rc3.jar,\
|
||||||
|
axis2_lib/jaxb-api-2.1.jar,\
|
||||||
|
axis2_lib/jaxb-impl-2.1.7.jar,\
|
||||||
|
axis2_lib/jaxb-xjc-2.1.7.jar,\
|
||||||
|
axis2_lib/jaxen-1.1.1.jar,\
|
||||||
|
axis2_lib/jaxws-tools-2.1.3.jar,\
|
||||||
|
axis2_lib/jettison-1.0-RC2.jar,\
|
||||||
|
axis2_lib/jibx-bind-1.2.jar,\
|
||||||
|
axis2_lib/jibx-run-1.2.jar,\
|
||||||
|
axis2_lib/jsr311-api-1.0.jar,\
|
||||||
|
axis2_lib/juli-6.0.16.jar,\
|
||||||
|
axis2_lib/log4j-1.2.15.jar,\
|
||||||
|
axis2_lib/mail-1.4.jar,\
|
||||||
|
axis2_lib/mex-1.6.2-impl.jar,\
|
||||||
|
axis2_lib/neethi-3.0.2.jar,\
|
||||||
|
axis2_lib/regexp-1.2.jar,\
|
||||||
|
axis2_lib/tribes-6.0.16.jar,\
|
||||||
|
axis2_lib/woden-api-1.0M9.jar,\
|
||||||
|
axis2_lib/woden-impl-commons-1.0M9.jar,\
|
||||||
|
axis2_lib/woden-impl-dom-1.0M9.jar,\
|
||||||
|
axis2_lib/wsdl4j-1.6.2.jar,\
|
||||||
|
axis2_lib/wstx-asl-3.2.9.jar,\
|
||||||
|
axis2_lib/xalan-2.7.0.jar,\
|
||||||
|
axis2_lib/xml-resolver-1.2.jar,\
|
||||||
|
axis2_lib/xmlbeans-2.3.0.jar,\
|
||||||
|
axis2_lib/XmlSchema-1.4.7.jar,\
|
||||||
|
jsonlib/commons-beanutils-1.7.0.jar,\
|
||||||
|
jsonlib/commons-collections-3.2.jar,\
|
||||||
|
jsonlib/commons-lang-2.4.jar,\
|
||||||
|
jsonlib/commons-logging-1.1.jar,\
|
||||||
|
jsonlib/ezmorph-1.0.4.jar,\
|
||||||
|
jsonlib/fastjson-1.2.9-javadoc.jar,\
|
||||||
|
jsonlib/fastjson-1.2.9-sources.jar,\
|
||||||
|
jsonlib/fastjson-1.2.9.jar,\
|
||||||
|
jsonlib/jdom.jar,\
|
||||||
|
jsonlib/json-lib-2.2.2-jdk15.jar,\
|
||||||
|
jsonlib/json-lib-2.2.3-jdk13.jar,\
|
||||||
|
lib/k.util_1.0.0.jar,\
|
||||||
|
lib/sqljdbc4.jar
|
||||||
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 526 B |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,116 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?eclipse version="3.4"?>
|
||||||
|
<plugin>
|
||||||
|
|
||||||
|
<extension point="org.eclipse.ui.commands">
|
||||||
|
<command name="BOM转换" id="com.connor.zf.dbom2ebom.CreateMaterialsBomHandler"></command>
|
||||||
|
<command name="零件图" id="com.connor.zf.createTZ.CreateLJTHandler"/>
|
||||||
|
<command name="锻加工图" id="com.connor.zf.createTZ.CreateDJGTHandler"/>
|
||||||
|
<command name="总成图" id="com.connor.zf.createTZ.CreateZCTHandler"/>
|
||||||
|
<command name="编辑分类属性" id="com.connor.zf.editClassAttr.editClassAttrHandler"/>
|
||||||
|
<command name="图纸创建物料" id="com.connor.zf.desingtopart.DeriveMaterialsHandler"/>
|
||||||
|
</extension>
|
||||||
|
<extension point="org.eclipse.ui.handlers">
|
||||||
|
<handler class="com.connor.zf.dbom2ebom.CreateMaterialsBomHandler" commandId="com.connor.zf.dbom2ebom.CreateMaterialsBomHandler"> </handler>
|
||||||
|
<handler commandId="com.connor.zf.createTZ.CreateLJTHandler" class="com.connor.zf.createTZ.CreateLJTHandler"/>
|
||||||
|
<handler commandId="com.connor.zf.createTZ.CreateDJGTHandler" class="com.connor.zf.createTZ.CreateDJGTHandler"/>
|
||||||
|
<handler commandId="com.connor.zf.createTZ.CreateZCTHandler" class="com.connor.zf.createTZ.CreateZCTHandler"/>
|
||||||
|
<handler commandId="com.connor.zf.editClassAttr.editClassAttrHandler" class="com.connor.zf.editClassAttr.editClassAttrHandler"/>
|
||||||
|
<handler commandId="com.connor.zf.desingtopart.DeriveMaterialsHandler" class="com.connor.zf.desingtopart.DeriveMaterialsHandler"/>
|
||||||
|
</extension>
|
||||||
|
<extension point="org.eclipse.ui.menus">
|
||||||
|
<menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=additions">
|
||||||
|
<!-- 兆丰PLM菜单 -->
|
||||||
|
<menu id="com.connor.zf.menus.transplant" label="兆丰PLM菜单" mnemonic="M">
|
||||||
|
<!-- 图纸创建 -->
|
||||||
|
<menu id="com.connor.zf.menus.createTZ" label="图纸创建" mnemonic="M">
|
||||||
|
<!-- 零件图 -->
|
||||||
|
<command commandId="com.connor.zf.createTZ.CreateLJTHandler" id="com.connor.zf.createTZ.CreateLJTHandler" mnemonic="S">
|
||||||
|
<visibleWhen>
|
||||||
|
<and>
|
||||||
|
<with variable="rac_command_suppression">
|
||||||
|
<not>
|
||||||
|
<iterate operator="or">
|
||||||
|
<equals value="com.connor.zf.createTZ.CreateLJTHandler"/>
|
||||||
|
</iterate>
|
||||||
|
</not>
|
||||||
|
</with>
|
||||||
|
</and>
|
||||||
|
</visibleWhen>
|
||||||
|
</command>
|
||||||
|
<!-- 锻加工图 -->
|
||||||
|
<command commandId="com.connor.zf.createTZ.CreateDJGTHandler" id="com.connor.zf.createTZ.CreateDJGTHandler" mnemonic="S">
|
||||||
|
<visibleWhen>
|
||||||
|
<and>
|
||||||
|
<with variable="rac_command_suppression">
|
||||||
|
<not>
|
||||||
|
<iterate operator="or">
|
||||||
|
<equals value="com.connor.zf.createTZ.CreateDJGTHandler"/>
|
||||||
|
</iterate>
|
||||||
|
</not>
|
||||||
|
</with>
|
||||||
|
</and>
|
||||||
|
</visibleWhen>
|
||||||
|
</command>
|
||||||
|
<!-- 总成图 -->
|
||||||
|
<command commandId="com.connor.zf.createTZ.CreateZCTHandler" id="com.connor.zf.createTZ.CreateZCTHandler" mnemonic="S">
|
||||||
|
<visibleWhen>
|
||||||
|
<and>
|
||||||
|
<with variable="rac_command_suppression">
|
||||||
|
<not>
|
||||||
|
<iterate operator="or">
|
||||||
|
<equals value="com.connor.zf.createTZ.CreateZCTHandler"/>
|
||||||
|
</iterate>
|
||||||
|
</not>
|
||||||
|
</with>
|
||||||
|
</and>
|
||||||
|
</visibleWhen>
|
||||||
|
</command>
|
||||||
|
</menu>
|
||||||
|
<!-- 图纸转换为物料 -->
|
||||||
|
<command commandId="com.connor.zf.desingtopart.DeriveMaterialsHandler" id="com.connor.zf.desingtopart.DeriveMaterialsHandler" mnemonic="S">
|
||||||
|
<visibleWhen>
|
||||||
|
<and>
|
||||||
|
<with variable="rac_command_suppression">
|
||||||
|
<not>
|
||||||
|
<iterate operator="or">
|
||||||
|
<equals value="com.connor.zf.desingtopart.DeriveMaterialsHandler"/>
|
||||||
|
</iterate>
|
||||||
|
</not>
|
||||||
|
</with>
|
||||||
|
</and>
|
||||||
|
</visibleWhen>
|
||||||
|
</command>
|
||||||
|
<!-- BOM转换 -->
|
||||||
|
<command commandId="com.connor.zf.dbom2ebom.CreateMaterialsBomHandler" id="com.connor.zf.dbom2ebom.CreateMaterialsBomHandler" mnemonic="S">
|
||||||
|
<visibleWhen>
|
||||||
|
<and>
|
||||||
|
<with variable="rac_command_suppression">
|
||||||
|
<not>
|
||||||
|
<iterate operator="or">
|
||||||
|
<equals value="com.connor.zf.dbom2ebom.CreateMaterialsBomHandler"/>
|
||||||
|
</iterate>
|
||||||
|
</not>
|
||||||
|
</with>
|
||||||
|
</and>
|
||||||
|
</visibleWhen>
|
||||||
|
</command>
|
||||||
|
<!-- 编辑分类属性 -->
|
||||||
|
<command commandId="com.connor.zf.editClassAttr.editClassAttrHandler" id="com.connor.zf.editClassAttr.editClassAttrHandler.mune" mnemonic="S">
|
||||||
|
<visibleWhen>
|
||||||
|
<and>
|
||||||
|
<with variable="rac_command_suppression">
|
||||||
|
<not>
|
||||||
|
<iterate operator="or">
|
||||||
|
<equals value="com.connor.zf.editClassAttr.editClassAttrHandler"/>
|
||||||
|
</iterate>
|
||||||
|
</not>
|
||||||
|
</with>
|
||||||
|
</and>
|
||||||
|
</visibleWhen>
|
||||||
|
</command>
|
||||||
|
</menu>
|
||||||
|
</menuContribution>
|
||||||
|
</extension>
|
||||||
|
|
||||||
|
</plugin>
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.connor.zf.createTZ;
|
||||||
|
|
||||||
|
import org.eclipse.core.commands.AbstractHandler;
|
||||||
|
import org.eclipse.core.commands.ExecutionEvent;
|
||||||
|
import org.eclipse.core.commands.ExecutionException;
|
||||||
|
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFUIApplication;
|
||||||
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
||||||
|
import com.teamcenter.rac.aifrcp.AIFUtility;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class CreateDJGTHandler extends AbstractHandler{
|
||||||
|
|
||||||
|
private final static String PREF = "ZF6_DJGTPS_LIST";
|
||||||
|
@Override
|
||||||
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
|
AbstractAIFUIApplication app = AIFUtility.getCurrentApplication();
|
||||||
|
TCSession session = (TCSession) app.getSession();
|
||||||
|
InterfaceAIFComponent targetComponent = app.getTargetComponent();
|
||||||
|
if(targetComponent instanceof TCComponentItemRevision) {
|
||||||
|
TCComponentItemRevision rev = (TCComponentItemRevision)targetComponent;
|
||||||
|
String type = rev.getType();
|
||||||
|
if(type.equals("ZF6_LJTRevision")) {
|
||||||
|
CreateTZDialog dialog = new CreateTZDialog(app, session, rev, PREF);
|
||||||
|
new Thread(dialog).start();
|
||||||
|
}else {
|
||||||
|
MessageBox.post("请选择零件图版本!","",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("请选择零件图版本!","",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,37 @@
|
|||||||
|
package com.connor.zf.createTZ;
|
||||||
|
|
||||||
|
import org.eclipse.core.commands.AbstractHandler;
|
||||||
|
import org.eclipse.core.commands.ExecutionEvent;
|
||||||
|
import org.eclipse.core.commands.ExecutionException;
|
||||||
|
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFUIApplication;
|
||||||
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
||||||
|
import com.teamcenter.rac.aifrcp.AIFUtility;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class CreateLJTHandler extends AbstractHandler{
|
||||||
|
|
||||||
|
private final static String PREF = "ZF6_LJTPS_LIST";
|
||||||
|
@Override
|
||||||
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
|
AbstractAIFUIApplication app = AIFUtility.getCurrentApplication();
|
||||||
|
TCSession session = (TCSession) app.getSession();
|
||||||
|
InterfaceAIFComponent targetComponent = app.getTargetComponent();
|
||||||
|
if(targetComponent instanceof TCComponentItemRevision) {
|
||||||
|
TCComponentItemRevision rev = (TCComponentItemRevision)targetComponent;
|
||||||
|
String type = rev.getType();
|
||||||
|
if(type.equals("ZF6_ZCTRevision")) {
|
||||||
|
CreateTZDialog dialog = new CreateTZDialog(app, session, rev, PREF);
|
||||||
|
new Thread(dialog).start();
|
||||||
|
}else {
|
||||||
|
MessageBox.post("请选择总成图版本!","",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("请选择总成图版本!","",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,642 @@
|
|||||||
|
package com.connor.zf.createTZ;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Component;
|
||||||
|
import java.awt.Cursor;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.FlowLayout;
|
||||||
|
import java.awt.Panel;
|
||||||
|
import java.awt.Point;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.MouseEvent;
|
||||||
|
import java.awt.event.MouseListener;
|
||||||
|
import java.awt.event.MouseMotionListener;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.ButtonGroup;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JComponent;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JRadioButton;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTextArea;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.JTree;
|
||||||
|
import javax.swing.event.TreeSelectionEvent;
|
||||||
|
import javax.swing.event.TreeSelectionListener;
|
||||||
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
|
import javax.swing.tree.DefaultTreeCellRenderer;
|
||||||
|
import javax.swing.tree.TreeSelectionModel;
|
||||||
|
|
||||||
|
import com.connor.zf.createTZ.CreateTZDialog.MyTreeCellRenderer;
|
||||||
|
import com.connor.zf.util.CNClassPropBean;
|
||||||
|
import com.connor.zf.util.ClassProperty;
|
||||||
|
import com.connor.zf.util.JAutoCompleteComboBox;
|
||||||
|
import com.connor.zf.util.JDMethodUtil;
|
||||||
|
import com.connor.zf.util.SoaServerUtil;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFDialog;
|
||||||
|
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.TCClassificationService;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponent;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentFolder;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItem;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemType;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentType;
|
||||||
|
import com.teamcenter.rac.kernel.TCException;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.kernel.ics.ICSAdminClass;
|
||||||
|
import com.teamcenter.rac.kernel.ics.ICSAdminClassAttribute;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
import com.teamcenter.rac.util.PropertyLayout;
|
||||||
|
|
||||||
|
|
||||||
|
public class CreateTZDialog extends AbstractAIFDialog implements ActionListener{
|
||||||
|
private AbstractAIFUIApplication app;
|
||||||
|
private TCSession session;
|
||||||
|
private String pref;
|
||||||
|
private TCComponentItemRevision target;
|
||||||
|
private String type;
|
||||||
|
private Map<String,List<String>> config = new HashMap<String,List<String>>();
|
||||||
|
private JButton createButton;
|
||||||
|
private JButton cancelButton;
|
||||||
|
private DefaultMutableTreeNode root;
|
||||||
|
private JTree tree;
|
||||||
|
// private JComboBox unitBox;
|
||||||
|
private JPanel mainPanel;
|
||||||
|
private JPanel panel1;
|
||||||
|
private JPanel panel2;
|
||||||
|
private JPanel panel3;
|
||||||
|
private JPanel panel4;
|
||||||
|
private JPanel panel5;
|
||||||
|
private JScrollPane scrollPane1;
|
||||||
|
private JScrollPane scrollPane2;
|
||||||
|
private JScrollPane scrollPane3;
|
||||||
|
private List<JTextField> textList = new ArrayList<JTextField>();
|
||||||
|
private List<JTextField> textList2 = new ArrayList<JTextField>();
|
||||||
|
private List<JComboBox> boxList = new ArrayList<JComboBox>();
|
||||||
|
private List<JRadioButton> radioButtons = new ArrayList<JRadioButton>();
|
||||||
|
private JComboBox combo;
|
||||||
|
private static TCClassificationService classService;
|
||||||
|
private static ICSAdminClass adminClass;
|
||||||
|
static int xx , yy;
|
||||||
|
static Point p = new Point(0, 0);
|
||||||
|
static int w,h;
|
||||||
|
static boolean b = true;
|
||||||
|
private TCComponentFolder folder;
|
||||||
|
private String folderName = "home";
|
||||||
|
private Map<String,Map<String,String>> lovMap = new HashMap<String, Map<String,String>>();
|
||||||
|
private final static String PREF = "ZF_Revision_Rule";
|
||||||
|
private final static String PREF2 = "ZF_DeriveCreate_Type";
|
||||||
|
private JComboBox rev_rule_box;
|
||||||
|
|
||||||
|
public CreateTZDialog(AbstractAIFUIApplication app, TCSession session, TCComponentItemRevision target, String pref) {
|
||||||
|
this.app = app;
|
||||||
|
this.session = session;
|
||||||
|
this.target = target;
|
||||||
|
try {
|
||||||
|
AIFComponentContext[] whereReferenced = target.getItem().whereReferenced();
|
||||||
|
if(whereReferenced!=null) {
|
||||||
|
for(AIFComponentContext con:whereReferenced) {
|
||||||
|
InterfaceAIFComponent component2 = con.getComponent();
|
||||||
|
if(component2 instanceof TCComponentFolder) {
|
||||||
|
TCComponentFolder tempfolder = (TCComponentFolder) component2;
|
||||||
|
String owning_user = tempfolder.getProperty("owning_user");
|
||||||
|
String string = session.getUser().toString();
|
||||||
|
// System.out.println("文件夹所有者:"+owning_user);
|
||||||
|
// System.out.println("当前用户:"+string);
|
||||||
|
if(string.equals(owning_user)) {
|
||||||
|
folder = tempfolder;
|
||||||
|
folderName = folder.getStringProperty("object_name");
|
||||||
|
System.out.println("找到文件夹"+folderName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (TCException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
this.pref = pref;
|
||||||
|
type = target.getType();
|
||||||
|
switch (type) {
|
||||||
|
case "ZF6_ZCTRevision":
|
||||||
|
type = "零件图";
|
||||||
|
root = new DefaultMutableTreeNode("零件图");
|
||||||
|
break;
|
||||||
|
case "ZF6_LJTRevision":
|
||||||
|
root = new DefaultMutableTreeNode("锻加工图");
|
||||||
|
type = "锻加工图";
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() throws Exception{
|
||||||
|
switch (type) {
|
||||||
|
case "零件图":
|
||||||
|
setTitle("零件图创建");
|
||||||
|
break;
|
||||||
|
case "锻加工图":
|
||||||
|
setTitle("锻加工图创建");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
String[] stringValues = session.getPreferenceService().getStringValues(pref);
|
||||||
|
if(stringValues!=null&&stringValues.length>0) {
|
||||||
|
for(String s:stringValues) {
|
||||||
|
String[] split = s.split(",",-1);
|
||||||
|
if(split.length==3) {
|
||||||
|
List<String> list = new ArrayList<String>();
|
||||||
|
list.add(split[1]);
|
||||||
|
list.add(split[2]);
|
||||||
|
config.put(split[0], list);
|
||||||
|
root.add(new DefaultMutableTreeNode(split[0]));
|
||||||
|
}else {
|
||||||
|
MessageBox.post(pref+"首选项配置有误!","",MessageBox.INFORMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("未配置"+pref+"首选项!","",MessageBox.INFORMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mainPanel = new JPanel(new BorderLayout());
|
||||||
|
panel1 = new JPanel(new BorderLayout());
|
||||||
|
panel2 = new JPanel(new BorderLayout());
|
||||||
|
MyTreeCellRenderer treeCellRenderer = new MyTreeCellRenderer();
|
||||||
|
tree = new JTree(root);
|
||||||
|
tree.setCellRenderer(treeCellRenderer);
|
||||||
|
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
|
||||||
|
tree.setSelectionRow(1);
|
||||||
|
tree.addTreeSelectionListener(new TreeSelectionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void valueChanged(TreeSelectionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
try {
|
||||||
|
textList.clear();
|
||||||
|
initAttributePanel(scrollPane2);
|
||||||
|
initClassAttributePanel(scrollPane3);
|
||||||
|
} catch (Exception e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
textList.clear();
|
||||||
|
scrollPane1 = new JScrollPane(tree);
|
||||||
|
scrollPane1.setPreferredSize(new Dimension(200,600));
|
||||||
|
scrollPane2 = new JScrollPane();
|
||||||
|
scrollPane3 = new JScrollPane();
|
||||||
|
initAttributePanel(scrollPane2);
|
||||||
|
initClassAttributePanel(scrollPane3);
|
||||||
|
// setmouseListener(scrollPane1,mainPanel);
|
||||||
|
// setmouseListener(scrollPane2,mainPanel);
|
||||||
|
// setmouseListener(scrollPane3,mainPanel);
|
||||||
|
panel1.add(scrollPane1,BorderLayout.WEST);
|
||||||
|
panel1.add(panel2,BorderLayout.CENTER);
|
||||||
|
panel2.add(scrollPane2,BorderLayout.CENTER);
|
||||||
|
panel2.add(scrollPane3,BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
mainPanel.add(panel1,BorderLayout.CENTER);
|
||||||
|
mainPanel.add(initButton(),BorderLayout.SOUTH);
|
||||||
|
add(mainPanel);
|
||||||
|
pack();
|
||||||
|
setAlwaysOnTop(true);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
|
setVisible(true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// private void setmouseListener(JComponent comp, JComponent mainPanel) {
|
||||||
|
// comp.addMouseMotionListener(new MouseMotionListener() {
|
||||||
|
// public void mouseMoved(MouseEvent e) {
|
||||||
|
// Cursor cursor = comp.getCursor();
|
||||||
|
// if (comp.getSize().width-5<=e.getX()) {
|
||||||
|
// comp.setCursor(new Cursor(Cursor.E_RESIZE_CURSOR));//右
|
||||||
|
// } else if (5>=e.getX()) {
|
||||||
|
// comp.setCursor(new Cursor(Cursor.W_RESIZE_CURSOR));//左
|
||||||
|
// } else {
|
||||||
|
// comp.setCursor(Cursor.getDefaultCursor());
|
||||||
|
// }
|
||||||
|
// if (b) {
|
||||||
|
// comp.setCursor(cursor);
|
||||||
|
// }
|
||||||
|
// };
|
||||||
|
// public void mouseDragged(MouseEvent e) {
|
||||||
|
// p = comp.getLocation();
|
||||||
|
// if (comp.getCursor().getType() == Cursor.W_RESIZE_CURSOR) {
|
||||||
|
//
|
||||||
|
// Point point = comp.getLocation();
|
||||||
|
// p.x = e.getPoint().x + point.x - 0;
|
||||||
|
// p.y = point.y;
|
||||||
|
// comp.setLocation(p);
|
||||||
|
//
|
||||||
|
// w = comp.getSize().width - e.getPoint().x;
|
||||||
|
// h = comp.getSize().height;
|
||||||
|
// comp.setSize(w,h);
|
||||||
|
// } else if (comp.getCursor().getType() == Cursor.E_RESIZE_CURSOR) {
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// w = e.getPoint().x;
|
||||||
|
// h = comp.getSize().height;
|
||||||
|
// comp.setSize(w,h);
|
||||||
|
//
|
||||||
|
// comp.setLocation(p);
|
||||||
|
// } else {
|
||||||
|
// Point point = comp.getLocation();
|
||||||
|
// ////////////随意移动
|
||||||
|
//// p.x = e.getPoint().x + point.x - xx;
|
||||||
|
//// p.y = e.getPoint().y + point.y - yy;
|
||||||
|
//// comp.setLocation(e.getPoint().x + point.x - xx,e.getPoint().y + point.y - yy);
|
||||||
|
// //沿着X轴方向移动
|
||||||
|
// p.x = e.getPoint().x + point.x - xx;
|
||||||
|
// p.y = point.y;
|
||||||
|
// comp.setLocation(e.getPoint().x + point.x - xx,point.y);
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// });
|
||||||
|
// comp.addMouseListener(new MouseListener() {
|
||||||
|
// public void mouseReleased(MouseEvent arg0) {
|
||||||
|
// b = false;
|
||||||
|
// }
|
||||||
|
// public void mousePressed(MouseEvent mouseEvent) {
|
||||||
|
// xx = mouseEvent.getX();
|
||||||
|
// yy = mouseEvent.getY();
|
||||||
|
// w = comp.getSize().width;
|
||||||
|
// h = comp.getSize().height;
|
||||||
|
// b = true;
|
||||||
|
// }
|
||||||
|
// public void mouseExited(MouseEvent arg0) {
|
||||||
|
// }
|
||||||
|
// public void mouseEntered(MouseEvent e) {
|
||||||
|
// if (comp.getSize().width-8<=e.getX()) {
|
||||||
|
// comp.setCursor(new Cursor(Cursor.E_RESIZE_CURSOR));//右
|
||||||
|
// } else if (8>=e.getX()) {
|
||||||
|
// comp.setCursor(new Cursor(Cursor.W_RESIZE_CURSOR));//左
|
||||||
|
// } else {
|
||||||
|
// comp.setCursor(Cursor.getDefaultCursor());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// public void mouseClicked(MouseEvent arg0) {
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
private JPanel initButton() {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
|
||||||
|
createButton = new JButton("创建");
|
||||||
|
cancelButton = new JButton("取消");
|
||||||
|
createButton.addActionListener(this);
|
||||||
|
cancelButton.addActionListener(this);
|
||||||
|
panel.add(createButton);
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(cancelButton);
|
||||||
|
panel.setBorder(BorderFactory.createEtchedBorder());
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JScrollPane initAttributePanel(JScrollPane scrollPane) throws Exception{
|
||||||
|
JPanel panel = new JPanel(new PropertyLayout());
|
||||||
|
panel.add("1.1.left.left",new JLabel("版本属性:"));
|
||||||
|
// JPanel tempPanel1 = new JPanel(new FlowLayout());
|
||||||
|
// tempPanel1.add(new JLabel("度量单位"));
|
||||||
|
// //单位
|
||||||
|
// TCComponentType typeComponent = session.getTypeComponent("UnitOfMeasure");
|
||||||
|
// TCComponent[] extent = typeComponent.extent();
|
||||||
|
// unitBox = new JAutoCompleteComboBox();
|
||||||
|
// unitBox.addItem(null);
|
||||||
|
// for(int ii = 0;ii<extent.length;ii++) {
|
||||||
|
// unitBox.addItem(extent[ii]);
|
||||||
|
// }
|
||||||
|
// unitBox.setSelectedIndex(1);
|
||||||
|
// tempPanel1.add(unitBox);
|
||||||
|
// panel.add("2.1.left.left",tempPanel1);
|
||||||
|
// panel.add("2.1.left.left",initTextPanel("名称", "object_name"));
|
||||||
|
rev_rule_box = new JComboBox();
|
||||||
|
String[] stringValues = session.getPreferenceService().getStringValues(PREF);
|
||||||
|
if(stringValues!=null) {
|
||||||
|
for(String s:stringValues) {
|
||||||
|
rev_rule_box.addItem(s);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("未配置首选项"+PREF,"",MessageBox.INFORMATION);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
JPanel tempPanel1 = new JPanel(new FlowLayout());
|
||||||
|
tempPanel1.add(new JLabel("版本"));
|
||||||
|
tempPanel1.add(rev_rule_box);
|
||||||
|
panel.add("2.1.left.left",tempPanel1);
|
||||||
|
String[] stringValues2 = session.getPreferenceService().getStringValues(PREF2);
|
||||||
|
Map<String,String> revAttrMap = new HashMap();
|
||||||
|
List<String> list = new ArrayList<String>();
|
||||||
|
if(stringValues2!=null) {
|
||||||
|
switch (type) {
|
||||||
|
case "零件图":
|
||||||
|
for(String s:stringValues2) {
|
||||||
|
String[] split1 = s.split("[|]");
|
||||||
|
if(split1[0].equals("ZF6_LJT")) {
|
||||||
|
String[] split2 = split1[1].split(";");
|
||||||
|
for(String s2:split2) {
|
||||||
|
String[] split = s2.split("=");
|
||||||
|
revAttrMap.put(split[0], split[1]);
|
||||||
|
list.add(split[0]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "锻加工图":
|
||||||
|
for(String s:stringValues2) {
|
||||||
|
String[] split1 = s.split("[|]");
|
||||||
|
if(split1[0].equals("ZF6_DJGT")) {
|
||||||
|
String[] split2 = split1[1].split(";");
|
||||||
|
for(String s2:split2) {
|
||||||
|
String[] split = s2.split("=");
|
||||||
|
revAttrMap.put(split[0], split[1]);
|
||||||
|
list.add(split[0]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("未配置首选项"+PREF2,"",MessageBox.INFORMATION);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
int i = 3;
|
||||||
|
for(;i<list.size()+3;i++) {
|
||||||
|
panel.add(i+".1.left.left",initTextPanel(list.get(i-3),revAttrMap.get(list.get(i-3))));
|
||||||
|
}
|
||||||
|
// panel.add("4.1.left.left",initTextPanel("单重", "zf6_dz"));
|
||||||
|
// panel.add("5.1.left.left",initTextPanel("材料", "zf6_cl"));
|
||||||
|
// combo = new JComboBox();
|
||||||
|
// combo.addItem("黑色");
|
||||||
|
// combo.addItem("白色");
|
||||||
|
// JPanel tempPanel1 = new JPanel(new FlowLayout());
|
||||||
|
// tempPanel1.add(new JLabel("颜色"));
|
||||||
|
// tempPanel1.add(combo);
|
||||||
|
// panel.add("5.1.left.left",tempPanel1);
|
||||||
|
// panel.add("6.1.left.left",initTextPanel("颜色", "zf6_ys"));
|
||||||
|
// panel.add("7.1.left.left",initTextPanel("客户名称", "zf6_khmc"));
|
||||||
|
// panel.add("8.1.left.left",initTextPanel("样品来源", "zf6_yply"));
|
||||||
|
// panel.add("10.1.left.left",initTextPanel("备注", "zf6_bz"));
|
||||||
|
JPanel tempPanel2 = new JPanel(new FlowLayout());
|
||||||
|
tempPanel2.add(new JLabel("是否带修理包"));
|
||||||
|
tempPanel2.add(initRadioPanel());
|
||||||
|
panel.add(i+".1.left.left",tempPanel2);
|
||||||
|
|
||||||
|
|
||||||
|
scrollPane.setViewportView(panel);
|
||||||
|
scrollPane.setPreferredSize(new Dimension(400,300));
|
||||||
|
return scrollPane;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private JPanel initTextPanel(String name,String propName) {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout());
|
||||||
|
panel.add(new JLabel(name));
|
||||||
|
JTextField textField = new JTextField(20);
|
||||||
|
textField.setName(propName);
|
||||||
|
if(propName.equals("object_name"))textField.setText(tree.getLastSelectedPathComponent().toString());
|
||||||
|
panel.add(textField);
|
||||||
|
textList.add(textField);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initRadioPanel() {
|
||||||
|
JPanel panel = new JPanel(new PropertyLayout());
|
||||||
|
ButtonGroup bg = new ButtonGroup();
|
||||||
|
radioButtons.clear();
|
||||||
|
JRadioButton radioButton1 = new JRadioButton("是");
|
||||||
|
JRadioButton radioButton2 = new JRadioButton("否");
|
||||||
|
radioButton1.setSelected(true);
|
||||||
|
radioButtons.add(radioButton1);
|
||||||
|
radioButtons.add(radioButton2);
|
||||||
|
bg.add(radioButton1);
|
||||||
|
bg.add(radioButton2);
|
||||||
|
panel.add("1.1.left.left",radioButton1);
|
||||||
|
panel.add("2.1.left.left",radioButton2);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JScrollPane initClassAttributePanel(JScrollPane scrollPane) throws Exception{
|
||||||
|
textList2.clear();
|
||||||
|
boxList.clear();
|
||||||
|
if (classService == null) {
|
||||||
|
classService = session.getClassificationService();
|
||||||
|
}
|
||||||
|
if (adminClass == null) {
|
||||||
|
adminClass = classService.newICSAdminClass();
|
||||||
|
}
|
||||||
|
String classid = config.get(tree.getLastSelectedPathComponent().toString()).get(0);
|
||||||
|
System.out.println("当前分类id="+classid);
|
||||||
|
adminClass.load(classid);
|
||||||
|
ICSAdminClassAttribute[] icsAttrS = adminClass.getAttributes();
|
||||||
|
if (icsAttrS != null) {
|
||||||
|
JPanel panel = new JPanel(new PropertyLayout());
|
||||||
|
panel.add("1.1.left.left",new JLabel("分类属性:"));
|
||||||
|
int i = 2;
|
||||||
|
for (ICSAdminClassAttribute attr : icsAttrS) {
|
||||||
|
CNClassPropBean bean = new CNClassPropBean(attr);
|
||||||
|
int attributeId = attr.getAttributeId();
|
||||||
|
String name = attr.getName();
|
||||||
|
if (!bean.isLov) {
|
||||||
|
|
||||||
|
panel.add(i+".1.left.left",initTextPanel2(name, attributeId+""));
|
||||||
|
}else {
|
||||||
|
String[] lov_values = bean.keyList.toArray(new String[bean.keyList.size()]);
|
||||||
|
lovMap.put(attributeId+"",bean.lovMapping);
|
||||||
|
panel.add(i+".1.left.left",initComboPanel2(name, attributeId+"",lov_values));
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
scrollPane.setViewportView(panel);
|
||||||
|
scrollPane.setPreferredSize(new Dimension(400,300));
|
||||||
|
return scrollPane;
|
||||||
|
}else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initTextPanel2(String name,String propName) {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout());
|
||||||
|
panel.add(new JLabel(name));
|
||||||
|
JTextField textField = new JTextField(20);
|
||||||
|
textField.setName(propName);
|
||||||
|
panel.add(textField);
|
||||||
|
textList2.add(textField);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initComboPanel2(String name,String propName, String [] values) {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout());
|
||||||
|
panel.add(new JLabel(name));
|
||||||
|
JComboBox box = new JComboBox();
|
||||||
|
for(String s:values) {
|
||||||
|
box.addItem(s);
|
||||||
|
}
|
||||||
|
box.setName(propName);
|
||||||
|
panel.add(box);
|
||||||
|
boxList.add(box);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void create() throws Exception{
|
||||||
|
String parentId = target.getStringProperty("item_id");
|
||||||
|
String zf6_th = target.getStringProperty("zf6_th");
|
||||||
|
System.out.println("zf6_th="+zf6_th);
|
||||||
|
String postfix1 = config.get(tree.getLastSelectedPathComponent().toString()).get(1);
|
||||||
|
String classId = config.get(tree.getLastSelectedPathComponent().toString()).get(0);
|
||||||
|
String newId = "";
|
||||||
|
boolean isExist = true;
|
||||||
|
TCComponentItemType itemType = (TCComponentItemType)session.getTypeService().getTypeComponent("Item");
|
||||||
|
String revId = rev_rule_box.getSelectedItem().toString();
|
||||||
|
// String revId = itemType.getNewRev(null);
|
||||||
|
TCComponentItem item = null;
|
||||||
|
String th = "";
|
||||||
|
switch (type) {
|
||||||
|
case "零件图":
|
||||||
|
newId = parentId + "-" + postfix1;
|
||||||
|
item = itemType.find(newId);
|
||||||
|
System.out.println("newid="+newId);
|
||||||
|
if(item == null) {
|
||||||
|
isExist = false;
|
||||||
|
item = itemType.create(newId, revId, "ZF6_LJT", "零件图", "", null);
|
||||||
|
}else {
|
||||||
|
throw new Exception(newId+"已存在!");
|
||||||
|
}
|
||||||
|
th = zf6_th.substring(0,zf6_th.length()-2);
|
||||||
|
th = th + postfix1;
|
||||||
|
break;
|
||||||
|
case "锻加工图":
|
||||||
|
int lastIndexOf = parentId.lastIndexOf("-");
|
||||||
|
String prefix = parentId.substring(0,lastIndexOf);
|
||||||
|
String postfix2 = parentId.substring(lastIndexOf+1);
|
||||||
|
newId = prefix + "-" + postfix1 + postfix2;
|
||||||
|
String[] tempsplit = zf6_th.split(" ");
|
||||||
|
if(tempsplit.length==2) {
|
||||||
|
String[] split = tempsplit[1].split("-");
|
||||||
|
th = tempsplit[0] + " " + postfix1;
|
||||||
|
for(int i = 1;i<split.length;i++) {
|
||||||
|
th = th + "-"+split[i];
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
System.out.println("parentId="+parentId);
|
||||||
|
throw new Exception(parentId+"创建锻加工图失败!图号格式错误!");
|
||||||
|
}
|
||||||
|
System.out.println("newid="+newId);
|
||||||
|
item = itemType.find(newId);
|
||||||
|
if(item == null) {
|
||||||
|
isExist = false;
|
||||||
|
item = itemType.create(newId, revId, "ZF6_DJGT", "锻加工图", "", null);
|
||||||
|
}else {
|
||||||
|
throw new Exception(newId+"已存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(folder!=null) {
|
||||||
|
folder.add("contents", item);
|
||||||
|
}else {
|
||||||
|
System.out.println("目标上层引用未找到文件夹,"+item+"放到home下");
|
||||||
|
session.getUser().getHomeFolder().add("contents", item);
|
||||||
|
}
|
||||||
|
//设置版本属性
|
||||||
|
TCComponentItemRevision rev = item.getLatestItemRevision();
|
||||||
|
Map<String,String> tempMap = new HashMap<String, String>();
|
||||||
|
for(JTextField t:textList) {
|
||||||
|
String name = t.getName();
|
||||||
|
String text = t.getText();
|
||||||
|
tempMap.put(name,text);
|
||||||
|
if(name.equals("object_name"))item.setStringProperty("object_name", text);
|
||||||
|
}
|
||||||
|
//颜色暂时取消下拉框
|
||||||
|
// tempMap.put("zf6_ys",combo.getSelectedItem().toString());
|
||||||
|
tempMap.put("zf6_th",th);
|
||||||
|
for(JRadioButton bu:radioButtons) {
|
||||||
|
if(bu.isSelected()) {
|
||||||
|
String text = bu.getText();
|
||||||
|
if(text.equals("是")) {
|
||||||
|
System.out.println("设置zf6_sfdxlb为true");
|
||||||
|
// rev.setLogicalProperty("zf6_sfdxlb", true);
|
||||||
|
tempMap.put("zf6_sfdxlb", "true");
|
||||||
|
}else {
|
||||||
|
System.out.println("设置zf6_sfdxlb为false");
|
||||||
|
// rev.setLogicalProperty("zf6_sfdxlb", false);
|
||||||
|
tempMap.put("zf6_sfdxlb", "false");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rev.setProperties(tempMap);
|
||||||
|
rev.refresh();
|
||||||
|
List<ClassProperty> propList = new ArrayList<>();
|
||||||
|
for(JTextField t:textList2) {
|
||||||
|
String name = t.getName();
|
||||||
|
String text = t.getText();
|
||||||
|
ClassProperty prop = new ClassProperty(Integer.valueOf(name), text);
|
||||||
|
propList.add(prop);
|
||||||
|
}
|
||||||
|
for(JComboBox t:boxList) {
|
||||||
|
String name = t.getName();
|
||||||
|
String text = lovMap.get(name).get(t.getSelectedItem().toString());
|
||||||
|
ClassProperty prop = new ClassProperty(Integer.valueOf(name), text);
|
||||||
|
propList.add(prop);
|
||||||
|
}
|
||||||
|
String json = SoaServerUtil.objectToJson(propList);
|
||||||
|
String url = JDMethodUtil.getPrefStr("Autocode_SendClassServer_URL", session);
|
||||||
|
SoaServerUtil.sendToClass(rev.getUid(), classId, json, url);
|
||||||
|
MessageBox.post(item.getStringProperty("object_string")+"已成功创建到"+folderName+"文件夹下!", "", MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
Object source = e.getSource();
|
||||||
|
if(source == createButton) {
|
||||||
|
CreateTZOperation operation = new CreateTZOperation(app, session, CreateTZDialog.this, "创建",folderName);
|
||||||
|
session.queueOperation(operation);
|
||||||
|
}else if(source == cancelButton) {
|
||||||
|
CreateTZDialog.this.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class MyTreeCellRenderer extends DefaultTreeCellRenderer {
|
||||||
|
@Override
|
||||||
|
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded,
|
||||||
|
boolean leaf, int row, boolean hasFocus) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
Component treeCellRendererComponent = super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
|
||||||
|
this.setIcon(null);
|
||||||
|
return treeCellRendererComponent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
package com.connor.zf.createTZ;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Frame;
|
||||||
|
import java.awt.Label;
|
||||||
|
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JProgressBar;
|
||||||
|
import javax.swing.SwingConstants;
|
||||||
|
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFOperation;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFUIApplication;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class CreateTZOperation extends AbstractAIFOperation{
|
||||||
|
private AbstractAIFUIApplication app;
|
||||||
|
private TCSession session;
|
||||||
|
private String exeType;
|
||||||
|
private String path;
|
||||||
|
private String errInfo = "";
|
||||||
|
private CreateTZDialog dialog;
|
||||||
|
private String folderName;
|
||||||
|
public CreateTZOperation(AbstractAIFUIApplication app, TCSession session, CreateTZDialog dialog, String exeType,String folderName) {
|
||||||
|
this.app = app;
|
||||||
|
this.session = session;
|
||||||
|
this.dialog = dialog;
|
||||||
|
this.exeType = exeType;
|
||||||
|
this.folderName = folderName;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeOperation() throws Exception {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
new Thread() {
|
||||||
|
public void run() {
|
||||||
|
WaitingDialog dia = new WaitingDialog(app.getDesktop(), "INFOMATION", "正在"+exeType+"......");
|
||||||
|
dia.setVisible(true);
|
||||||
|
try {
|
||||||
|
|
||||||
|
boolean flag = false;
|
||||||
|
switch (exeType) {
|
||||||
|
case "创建":
|
||||||
|
flag = create();
|
||||||
|
if (flag) {
|
||||||
|
dia.setVisible(false);
|
||||||
|
// MessageBox.post("已成功创建到"+folderName+"下!", "", MessageBox.INFORMATION);
|
||||||
|
} else {
|
||||||
|
dia.setVisible(false);
|
||||||
|
MessageBox.post(errInfo+"创建失败!", "", MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}finally {
|
||||||
|
dialog.dispose();
|
||||||
|
dia.setVisible(false);
|
||||||
|
dia.dispose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean create() {
|
||||||
|
try {
|
||||||
|
dialog.create();
|
||||||
|
}catch (Exception e) {
|
||||||
|
// TODO: handle exception
|
||||||
|
e.printStackTrace();
|
||||||
|
errInfo = errInfo + e.getMessage();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
class WaitingDialog extends com.teamcenter.rac.aif.AbstractAIFDialog {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
public JPanel panel;
|
||||||
|
JProgressBar progressBar = null;
|
||||||
|
|
||||||
|
public WaitingDialog(Frame arg0, String title, String message) {
|
||||||
|
super(arg0, title);
|
||||||
|
this.setModal(false);
|
||||||
|
|
||||||
|
panel = new JPanel(new BorderLayout());
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JLabel label = new JLabel(message); System.out.println("message:"+message);
|
||||||
|
* System.out.println("label:"+label); panel.add(label);
|
||||||
|
*/
|
||||||
|
|
||||||
|
progressBar = new JProgressBar(SwingConstants.HORIZONTAL);
|
||||||
|
progressBar.setVisible(true);
|
||||||
|
progressBar.setIndeterminate(true);
|
||||||
|
|
||||||
|
panel.add(BorderLayout.CENTER, new Label(message));
|
||||||
|
panel.add(BorderLayout.SOUTH, progressBar);
|
||||||
|
|
||||||
|
panel.setPreferredSize(new Dimension(350, 60));
|
||||||
|
|
||||||
|
this.getContentPane().add(panel);
|
||||||
|
|
||||||
|
centerToScreen();
|
||||||
|
setAlwaysOnTop(true);
|
||||||
|
pack();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,424 @@
|
|||||||
|
package com.connor.zf.createTZ;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.FlowLayout;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.swing.BorderFactory;
|
||||||
|
import javax.swing.ButtonGroup;
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JComboBox;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JRadioButton;
|
||||||
|
import javax.swing.JScrollPane;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.tree.DefaultMutableTreeNode;
|
||||||
|
|
||||||
|
import com.connor.zf.util.CNClassPropBean;
|
||||||
|
import com.connor.zf.util.ClassProperty;
|
||||||
|
import com.connor.zf.util.JAutoCompleteComboBox;
|
||||||
|
import com.connor.zf.util.JDMethodUtil;
|
||||||
|
import com.connor.zf.util.SoaServerUtil;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFDialog;
|
||||||
|
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.TCClassificationService;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponent;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentFolder;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItem;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemType;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentType;
|
||||||
|
import com.teamcenter.rac.kernel.TCException;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.kernel.ics.ICSAdminClass;
|
||||||
|
import com.teamcenter.rac.kernel.ics.ICSAdminClassAttribute;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
import com.teamcenter.rac.util.PropertyLayout;
|
||||||
|
|
||||||
|
|
||||||
|
public class CreateZCTDialog extends AbstractAIFDialog implements ActionListener{
|
||||||
|
private AbstractAIFUIApplication app;
|
||||||
|
private TCSession session;
|
||||||
|
private TCComponentItemRevision target;
|
||||||
|
private TCComponentFolder folder;
|
||||||
|
private String folderName = "home";
|
||||||
|
private JButton createButton;
|
||||||
|
private JButton cancelButton;
|
||||||
|
private JPanel mainPanel;
|
||||||
|
private JPanel panel1;
|
||||||
|
private JPanel panel2;
|
||||||
|
private JPanel panel3;
|
||||||
|
private JScrollPane scrollPane1;
|
||||||
|
private JScrollPane scrollPane2;
|
||||||
|
private List<JTextField> textList = new ArrayList<JTextField>();
|
||||||
|
private List<JTextField> textList2 = new ArrayList<JTextField>();
|
||||||
|
private List<JComboBox> boxList = new ArrayList<JComboBox>();
|
||||||
|
private static TCClassificationService classService;
|
||||||
|
private static ICSAdminClass adminClass;
|
||||||
|
private List<JRadioButton> radioButtons = new ArrayList<JRadioButton>();
|
||||||
|
private JTextField xhmsField;
|
||||||
|
private Map<String,Map<String,String>> lovMap = new HashMap<String, Map<String,String>>();
|
||||||
|
private final static String PREF = "ZF_Revision_Rule";
|
||||||
|
private final static String PREF2 = "ZF_DeriveCreate_Type";
|
||||||
|
private JComboBox rev_rule_box;
|
||||||
|
// private JComboBox unitBox;
|
||||||
|
|
||||||
|
public CreateZCTDialog(AbstractAIFUIApplication app, TCSession session, TCComponentItemRevision target) {
|
||||||
|
this.app = app;
|
||||||
|
this.session = session;
|
||||||
|
this.target = target;
|
||||||
|
try {
|
||||||
|
AIFComponentContext[] whereReferenced = target.getItem().whereReferenced();
|
||||||
|
if(whereReferenced!=null) {
|
||||||
|
for(AIFComponentContext con:whereReferenced) {
|
||||||
|
InterfaceAIFComponent component2 = con.getComponent();
|
||||||
|
if(component2 instanceof TCComponentFolder) {
|
||||||
|
TCComponentFolder tempfolder = (TCComponentFolder) component2;
|
||||||
|
String owning_user = tempfolder.getProperty("owning_user");
|
||||||
|
String string = session.getUser().toString();
|
||||||
|
// System.out.println("文件夹所有者:"+owning_user);
|
||||||
|
// System.out.println("当前用户:"+string);
|
||||||
|
if(string.equals(owning_user)) {
|
||||||
|
folder = tempfolder;
|
||||||
|
folderName = folder.getStringProperty("object_name");
|
||||||
|
System.out.println("找到文件夹"+folderName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (TCException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
init();
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void init() throws Exception{
|
||||||
|
setTitle("总成图创建");
|
||||||
|
mainPanel = new JPanel(new BorderLayout());
|
||||||
|
panel1 = new JPanel(new BorderLayout());
|
||||||
|
scrollPane1 = new JScrollPane();
|
||||||
|
scrollPane2 = new JScrollPane();
|
||||||
|
initAttributePanel(scrollPane1);
|
||||||
|
initClassAttributePanel(scrollPane2);
|
||||||
|
panel1.add(scrollPane1,BorderLayout.CENTER);
|
||||||
|
panel1.add(scrollPane2,BorderLayout.SOUTH);
|
||||||
|
mainPanel.add(panel1,BorderLayout.CENTER);
|
||||||
|
mainPanel.add(initButton(),BorderLayout.SOUTH);
|
||||||
|
add(mainPanel);
|
||||||
|
pack();
|
||||||
|
setAlwaysOnTop(true);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
|
setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void create() throws Exception{
|
||||||
|
String parentId = target.getStringProperty("item_id");
|
||||||
|
String zf6_th = target.getStringProperty("zf6_th");
|
||||||
|
System.out.println("zf6_th="+zf6_th);
|
||||||
|
// String postfix1 = config.get(tree.getLastSelectedPathComponent().toString()).get(1);
|
||||||
|
String classId = target.getClassificationClass();
|
||||||
|
String newId = parentId+xhmsField.getText();
|
||||||
|
// boolean isExist = true;
|
||||||
|
TCComponentItemType itemType = (TCComponentItemType)session.getTypeService().getTypeComponent("Item");
|
||||||
|
String revId = rev_rule_box.getSelectedItem().toString();
|
||||||
|
// String revId = itemType.getNewRev(null);
|
||||||
|
TCComponentItem item = null;
|
||||||
|
String th = "";
|
||||||
|
String preTH = "Q/JS A-";
|
||||||
|
String postTH = "-00";
|
||||||
|
int tempIndex = 0;
|
||||||
|
TCComponent[] search = session.search("总成图查询", new String[] {"图号"}, new String[] {preTH+"*"+postTH});
|
||||||
|
if(search == null) {
|
||||||
|
th = preTH + "0" + postTH;
|
||||||
|
}else {
|
||||||
|
for(TCComponent comp:search) {
|
||||||
|
TCComponentItemRevision tempRev = (TCComponentItemRevision)comp;
|
||||||
|
String tempTH = tempRev.getStringProperty("zf6_th");
|
||||||
|
String[] split = tempTH.split("-",-1);
|
||||||
|
if(split.length == 3) {
|
||||||
|
Integer nowIndex = Integer.valueOf(split[1]);
|
||||||
|
if(nowIndex > tempIndex) {
|
||||||
|
tempIndex = nowIndex;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
System.out.println(comp+"图号不符合规范:"+tempTH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
th = preTH + (tempIndex+1) + postTH;
|
||||||
|
}
|
||||||
|
item = itemType.create(newId, revId, "ZF6_ZCT", "总成图", "", null);
|
||||||
|
if(folder!=null) {
|
||||||
|
folder.add("contents", item);
|
||||||
|
}else {
|
||||||
|
System.out.println("目标上层引用未找到文件夹,"+item+"放到home下");
|
||||||
|
session.getUser().getHomeFolder().add("contents", item);
|
||||||
|
}
|
||||||
|
//设置版本属性
|
||||||
|
TCComponentItemRevision rev = item.getLatestItemRevision();
|
||||||
|
Map<String,String> tempMap = new HashMap<String, String>();
|
||||||
|
for(JTextField t:textList) {
|
||||||
|
String name = t.getName();
|
||||||
|
String text = t.getText();
|
||||||
|
tempMap.put(name,text);
|
||||||
|
if(name.equals("object_name"))item.setStringProperty("object_name", text);
|
||||||
|
}
|
||||||
|
//颜色暂时取消下拉框
|
||||||
|
// tempMap.put("zf6_ys",combo.getSelectedItem().toString());
|
||||||
|
tempMap.put("zf6_th",th);
|
||||||
|
for(JRadioButton bu:radioButtons) {
|
||||||
|
if(bu.isSelected()) {
|
||||||
|
String text = bu.getText();
|
||||||
|
if(text.equals("是")) {
|
||||||
|
System.out.println("设置zf6_sfdxlb为true");
|
||||||
|
// rev.setLogicalProperty("zf6_sfdxlb", true);
|
||||||
|
tempMap.put("zf6_sfdxlb", "true");
|
||||||
|
}else {
|
||||||
|
System.out.println("设置zf6_sfdxlb为false");
|
||||||
|
// rev.setLogicalProperty("zf6_sfdxlb", false);
|
||||||
|
tempMap.put("zf6_sfdxlb", "false");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rev.setProperties(tempMap);
|
||||||
|
rev.refresh();
|
||||||
|
List<ClassProperty> propList = new ArrayList<>();
|
||||||
|
for(JTextField t:textList2) {
|
||||||
|
String name = t.getName();
|
||||||
|
String text = t.getText();
|
||||||
|
ClassProperty prop = new ClassProperty(Integer.valueOf(name), text);
|
||||||
|
propList.add(prop);
|
||||||
|
}
|
||||||
|
for(JComboBox t:boxList) {
|
||||||
|
String name = t.getName();
|
||||||
|
String text = lovMap.get(name).get(t.getSelectedItem().toString());
|
||||||
|
ClassProperty prop = new ClassProperty(Integer.valueOf(name), text);
|
||||||
|
propList.add(prop);
|
||||||
|
}
|
||||||
|
String json = SoaServerUtil.objectToJson(propList);
|
||||||
|
String url = JDMethodUtil.getPrefStr("Autocode_SendClassServer_URL", session);
|
||||||
|
SoaServerUtil.sendToClass(rev.getUid(), classId, json, url);
|
||||||
|
MessageBox.post(item.getStringProperty("object_string")+"已成功创建到"+folderName+"文件夹下!", "", MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initRadioPanel() {
|
||||||
|
JPanel panel = new JPanel(new PropertyLayout());
|
||||||
|
ButtonGroup bg = new ButtonGroup();
|
||||||
|
radioButtons.clear();
|
||||||
|
JRadioButton radioButton1 = new JRadioButton("是");
|
||||||
|
JRadioButton radioButton2 = new JRadioButton("否");
|
||||||
|
radioButton1.setSelected(true);
|
||||||
|
radioButtons.add(radioButton1);
|
||||||
|
radioButtons.add(radioButton2);
|
||||||
|
bg.add(radioButton1);
|
||||||
|
bg.add(radioButton2);
|
||||||
|
panel.add("1.1.left.left",radioButton1);
|
||||||
|
panel.add("2.1.left.left",radioButton2);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initButton() {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
|
||||||
|
createButton = new JButton("创建");
|
||||||
|
cancelButton = new JButton("取消");
|
||||||
|
createButton.addActionListener(this);
|
||||||
|
cancelButton.addActionListener(this);
|
||||||
|
panel.add(createButton);
|
||||||
|
panel.add(new JLabel(" "));
|
||||||
|
panel.add(cancelButton);
|
||||||
|
panel.setBorder(BorderFactory.createEtchedBorder());
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JScrollPane initAttributePanel(JScrollPane scrollPane) throws Exception{
|
||||||
|
textList.clear();
|
||||||
|
JPanel panel = new JPanel(new PropertyLayout());
|
||||||
|
xhmsField = new JTextField(20);
|
||||||
|
panel.add("1.1.left.left",new JLabel("版本属性:"));
|
||||||
|
JPanel tempPanel1 = new JPanel(new FlowLayout());
|
||||||
|
tempPanel1.add(new JLabel("型号描述"));
|
||||||
|
tempPanel1.add(xhmsField);
|
||||||
|
panel.add("2.1.left.left",tempPanel1);
|
||||||
|
// JPanel tempPanel2 = new JPanel(new FlowLayout());
|
||||||
|
// tempPanel2.add(new JLabel("度量单位"));
|
||||||
|
// //单位
|
||||||
|
// TCComponentType typeComponent = session.getTypeComponent("UnitOfMeasure");
|
||||||
|
// TCComponent[] extent = typeComponent.extent();
|
||||||
|
// unitBox = new JAutoCompleteComboBox();
|
||||||
|
// unitBox.addItem(null);
|
||||||
|
// for(int ii = 0;ii<extent.length;ii++) {
|
||||||
|
// unitBox.addItem(extent[ii]);
|
||||||
|
// }
|
||||||
|
// unitBox.setSelectedIndex(1);
|
||||||
|
// tempPanel2.add(unitBox);
|
||||||
|
// panel.add("3.1.left.left",tempPanel2);
|
||||||
|
rev_rule_box = new JComboBox();
|
||||||
|
String[] stringValues = session.getPreferenceService().getStringValues(PREF);
|
||||||
|
if(stringValues!=null) {
|
||||||
|
for(String s:stringValues) {
|
||||||
|
rev_rule_box.addItem(s);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("未配置首选项"+PREF,"",MessageBox.INFORMATION);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String[] stringValues2 = session.getPreferenceService().getStringValues(PREF2);
|
||||||
|
Map<String,String> revAttrMap = new HashMap();
|
||||||
|
List<String> list = new ArrayList<String>();
|
||||||
|
if(stringValues2!=null) {
|
||||||
|
for(String s:stringValues2) {
|
||||||
|
String[] split1 = s.split("[|]");
|
||||||
|
if(split1[0].equals("ZF6_ZCT")) {
|
||||||
|
String[] split2 = split1[1].split(";");
|
||||||
|
for(String s2:split2) {
|
||||||
|
String[] split = s2.split("=");
|
||||||
|
revAttrMap.put(split[0], split[1]);
|
||||||
|
list.add(split[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("未配置首选项"+PREF2,"",MessageBox.INFORMATION);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
JPanel tempPanel2 = new JPanel(new FlowLayout());
|
||||||
|
tempPanel2.add(new JLabel("版本"));
|
||||||
|
tempPanel2.add(rev_rule_box);
|
||||||
|
panel.add("3.1.left.left",tempPanel2);
|
||||||
|
int i = 4;
|
||||||
|
for(;i<list.size()+4;i++) {
|
||||||
|
panel.add(i+".1.left.left",initTextPanel(list.get(i-4),revAttrMap.get(list.get(i-4))));
|
||||||
|
}
|
||||||
|
// panel.add("4.1.left.left",initTextPanel("名称", "object_name"));
|
||||||
|
// panel.add("5.1.left.left",initTextPanel("单重", "zf6_dz"));
|
||||||
|
// panel.add("6.1.left.left",initTextPanel("材料", "zf6_cl"));
|
||||||
|
// combo = new JComboBox();
|
||||||
|
// combo.addItem("黑色");
|
||||||
|
// combo.addItem("白色");
|
||||||
|
// JPanel tempPanel1 = new JPanel(new FlowLayout());
|
||||||
|
// tempPanel1.add(new JLabel("颜色"));
|
||||||
|
// tempPanel1.add(combo);
|
||||||
|
// panel.add("5.1.left.left",tempPanel1);
|
||||||
|
// panel.add("7.1.left.left",initTextPanel("颜色", "zf6_ys"));
|
||||||
|
// panel.add("8.1.left.left",initTextPanel("客户名称", "zf6_khmc"));
|
||||||
|
// panel.add("9.1.left.left",initTextPanel("样品来源", "zf6_yply"));
|
||||||
|
// panel.add("11.1.left.left",initTextPanel("备注", "zf6_bz"));
|
||||||
|
JPanel tempPanel3 = new JPanel(new FlowLayout());
|
||||||
|
tempPanel3.add(new JLabel("是否带修理包"));
|
||||||
|
tempPanel3.add(initRadioPanel());
|
||||||
|
panel.add(i+".1.left.left",tempPanel3);
|
||||||
|
|
||||||
|
|
||||||
|
scrollPane.setViewportView(panel);
|
||||||
|
scrollPane.setPreferredSize(new Dimension(400,300));
|
||||||
|
return scrollPane;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JPanel initTextPanel(String name,String propName) {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout());
|
||||||
|
panel.add(new JLabel(name));
|
||||||
|
JTextField textField = new JTextField(20);
|
||||||
|
textField.setName(propName);
|
||||||
|
panel.add(textField);
|
||||||
|
textList.add(textField);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private JScrollPane initClassAttributePanel(JScrollPane scrollPane) throws Exception{
|
||||||
|
textList2.clear();
|
||||||
|
boxList.clear();
|
||||||
|
if (classService == null) {
|
||||||
|
classService = session.getClassificationService();
|
||||||
|
}
|
||||||
|
if (adminClass == null) {
|
||||||
|
adminClass = classService.newICSAdminClass();
|
||||||
|
}
|
||||||
|
String classid = target.getClassificationClass();
|
||||||
|
System.out.println("当前分类id="+classid);
|
||||||
|
if(classid == null || "".equals(classid)) {
|
||||||
|
MessageBox.post("当前对象未分类!","",MessageBox.INFORMATION);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
adminClass.load(classid);
|
||||||
|
ICSAdminClassAttribute[] icsAttrS = adminClass.getAttributes();
|
||||||
|
if (icsAttrS != null) {
|
||||||
|
JPanel panel = new JPanel(new PropertyLayout());
|
||||||
|
panel.add("1.1.left.left",new JLabel("分类属性:"));
|
||||||
|
int i = 2;
|
||||||
|
for (ICSAdminClassAttribute attr : icsAttrS) {
|
||||||
|
CNClassPropBean bean = new CNClassPropBean(attr);
|
||||||
|
int attributeId = attr.getAttributeId();
|
||||||
|
String name = attr.getName();
|
||||||
|
if (!bean.isLov) {
|
||||||
|
|
||||||
|
panel.add(i+".1.left.left",initTextPanel2(name, attributeId+""));
|
||||||
|
}else {
|
||||||
|
String[] lov_values = bean.keyList.toArray(new String[bean.keyList.size()]);
|
||||||
|
lovMap.put(attributeId+"",bean.lovMapping);
|
||||||
|
panel.add(i+".1.left.left",initComboPanel2(name, attributeId+"",lov_values));
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
scrollPane.setViewportView(panel);
|
||||||
|
scrollPane.setPreferredSize(new Dimension(400,300));
|
||||||
|
return scrollPane;
|
||||||
|
}else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private JPanel initTextPanel2(String name,String propName) {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout());
|
||||||
|
panel.add(new JLabel(name));
|
||||||
|
JTextField textField = new JTextField(20);
|
||||||
|
textField.setName(propName);
|
||||||
|
panel.add(textField);
|
||||||
|
textList2.add(textField);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
private JPanel initComboPanel2(String name,String propName, String [] values) {
|
||||||
|
JPanel panel = new JPanel(new FlowLayout());
|
||||||
|
panel.add(new JLabel(name));
|
||||||
|
JComboBox box = new JComboBox();
|
||||||
|
for(String s:values) {
|
||||||
|
box.addItem(s);
|
||||||
|
}
|
||||||
|
box.setName(propName);
|
||||||
|
panel.add(box);
|
||||||
|
boxList.add(box);
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
Object source = e.getSource();
|
||||||
|
if(source == createButton) {
|
||||||
|
CreateZCTOperation operation = new CreateZCTOperation(app, session, CreateZCTDialog.this, folderName);
|
||||||
|
session.queueOperation(operation);
|
||||||
|
}else if(source == cancelButton) {
|
||||||
|
CreateZCTDialog.this.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.connor.zf.createTZ;
|
||||||
|
|
||||||
|
import org.eclipse.core.commands.AbstractHandler;
|
||||||
|
import org.eclipse.core.commands.ExecutionEvent;
|
||||||
|
import org.eclipse.core.commands.ExecutionException;
|
||||||
|
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFUIApplication;
|
||||||
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
||||||
|
import com.teamcenter.rac.aifrcp.AIFUtility;
|
||||||
|
import com.teamcenter.rac.kernel.TCComponentItemRevision;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class CreateZCTHandler extends AbstractHandler{
|
||||||
|
@Override
|
||||||
|
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||||
|
AbstractAIFUIApplication app = AIFUtility.getCurrentApplication();
|
||||||
|
TCSession session = (TCSession) app.getSession();
|
||||||
|
InterfaceAIFComponent targetComponent = app.getTargetComponent();
|
||||||
|
if(targetComponent instanceof TCComponentItemRevision) {
|
||||||
|
TCComponentItemRevision rev = (TCComponentItemRevision)targetComponent;
|
||||||
|
String type = rev.getType();
|
||||||
|
if(type.equals("ZF6_ZCTRevision")) {
|
||||||
|
CreateZCTDialog dialog = new CreateZCTDialog(app, session, rev);
|
||||||
|
new Thread(dialog).start();
|
||||||
|
}else {
|
||||||
|
MessageBox.post("请选择总成图版本!","",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
MessageBox.post("请选择总成图版本!","",MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,110 @@
|
|||||||
|
package com.connor.zf.createTZ;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.Frame;
|
||||||
|
import java.awt.Label;
|
||||||
|
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JProgressBar;
|
||||||
|
import javax.swing.SwingConstants;
|
||||||
|
|
||||||
|
import com.connor.zf.createTZ.CreateTZOperation.WaitingDialog;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFOperation;
|
||||||
|
import com.teamcenter.rac.aif.AbstractAIFUIApplication;
|
||||||
|
import com.teamcenter.rac.kernel.TCSession;
|
||||||
|
import com.teamcenter.rac.util.MessageBox;
|
||||||
|
|
||||||
|
public class CreateZCTOperation extends AbstractAIFOperation{
|
||||||
|
private AbstractAIFUIApplication app;
|
||||||
|
private TCSession session;
|
||||||
|
private String path;
|
||||||
|
private String errInfo = "";
|
||||||
|
private CreateZCTDialog dialog;
|
||||||
|
private String folderName;
|
||||||
|
|
||||||
|
public CreateZCTOperation(AbstractAIFUIApplication app, TCSession session, CreateZCTDialog dialog,String folderName) {
|
||||||
|
this.app = app;
|
||||||
|
this.session = session;
|
||||||
|
this.dialog = dialog;
|
||||||
|
this.folderName = folderName;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void executeOperation() throws Exception {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
new Thread() {
|
||||||
|
public void run() {
|
||||||
|
WaitingDialog dia = new WaitingDialog(app.getDesktop(), "INFOMATION", "正在创建......");
|
||||||
|
dia.setVisible(true);
|
||||||
|
try {
|
||||||
|
|
||||||
|
boolean flag = false;
|
||||||
|
// switch (exeType) {
|
||||||
|
// case "创建":
|
||||||
|
flag = create();
|
||||||
|
if (flag) {
|
||||||
|
dia.setVisible(false);
|
||||||
|
// MessageBox.post("已成功创建到"+folderName+"下!", "", MessageBox.INFORMATION);
|
||||||
|
} else {
|
||||||
|
dia.setVisible(false);
|
||||||
|
MessageBox.post(errInfo+"创建失败!", "", MessageBox.INFORMATION);
|
||||||
|
}
|
||||||
|
// break;
|
||||||
|
//
|
||||||
|
// default:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
}finally {
|
||||||
|
dialog.dispose();
|
||||||
|
dia.setVisible(false);
|
||||||
|
dia.dispose();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean create() {
|
||||||
|
try {
|
||||||
|
dialog.create();
|
||||||
|
}catch (Exception e) {
|
||||||
|
// TODO: handle exception
|
||||||
|
e.printStackTrace();
|
||||||
|
errInfo = errInfo + e.getMessage();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
class WaitingDialog extends com.teamcenter.rac.aif.AbstractAIFDialog {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
public JPanel panel;
|
||||||
|
JProgressBar progressBar = null;
|
||||||
|
|
||||||
|
public WaitingDialog(Frame arg0, String title, String message) {
|
||||||
|
super(arg0, title);
|
||||||
|
this.setModal(false);
|
||||||
|
|
||||||
|
panel = new JPanel(new BorderLayout());
|
||||||
|
|
||||||
|
/*
|
||||||
|
* JLabel label = new JLabel(message); System.out.println("message:"+message);
|
||||||
|
* System.out.println("label:"+label); panel.add(label);
|
||||||
|
*/
|
||||||
|
|
||||||
|
progressBar = new JProgressBar(SwingConstants.HORIZONTAL);
|
||||||
|
progressBar.setVisible(true);
|
||||||
|
progressBar.setIndeterminate(true);
|
||||||
|
|
||||||
|
panel.add(BorderLayout.CENTER, new Label(message));
|
||||||
|
panel.add(BorderLayout.SOUTH, progressBar);
|
||||||
|
|
||||||
|
panel.setPreferredSize(new Dimension(350, 60));
|
||||||
|
|
||||||
|
this.getContentPane().add(panel);
|
||||||
|
|
||||||
|
centerToScreen();
|
||||||
|
setAlwaysOnTop(true);
|
||||||
|
pack();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue