You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.3 KiB
89 lines
2.3 KiB
package com.connor.kwc.createBom;
|
|
|
|
import java.awt.EventQueue;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import javax.swing.JFrame;
|
|
import javax.swing.JLabel;
|
|
import javax.swing.JPanel;
|
|
import javax.swing.JTextArea;
|
|
import javax.swing.JTextField;
|
|
|
|
import com.teamcenter.rac.aif.AbstractAIFOperation;
|
|
import com.teamcenter.rac.aif.kernel.InterfaceAIFComponent;
|
|
import com.teamcenter.rac.kernel.TCComponentBOMLine;
|
|
import com.teamcenter.rac.kernel.TCComponentFolder;
|
|
import com.teamcenter.rac.kernel.TCSession;
|
|
|
|
/**
|
|
*
|
|
* @ClassName: CreateBOMOperation
|
|
* @Description: 创建BOM实现类
|
|
* @author hcj
|
|
* @date 2023年12月18日
|
|
*
|
|
*/
|
|
public class CreateBOMOperation extends AbstractAIFOperation {
|
|
private TCSession session;
|
|
private Map<String, Object> dataMap;
|
|
private String type;
|
|
private JFrame jFrame;
|
|
private InterfaceAIFComponent target;
|
|
|
|
/**
|
|
* 创建一个新的实例 CreateBOMOperation
|
|
*
|
|
* @param session
|
|
* @param dataMap
|
|
* @param target
|
|
* @param type
|
|
*/
|
|
public CreateBOMOperation(TCSession session, Map<String, Object> dataMap, InterfaceAIFComponent target,
|
|
String type) {
|
|
// TODO Auto-generated constructor stub
|
|
this.session = session;
|
|
this.dataMap = dataMap;
|
|
this.target = target;
|
|
this.type = type;
|
|
}
|
|
|
|
/*
|
|
* Title: executeOperation Description:
|
|
*
|
|
* @throws Exception
|
|
*
|
|
* @see com.teamcenter.rac.aif.AbstractAIFOperation#executeOperation()
|
|
*/
|
|
@Override
|
|
public void executeOperation() throws Exception {
|
|
// TODO Auto-generated method stub
|
|
init();
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @Title: init
|
|
* @Description: 初始化窗口
|
|
* @param 参数
|
|
* @return void 返回类型
|
|
* @throws
|
|
*/
|
|
public void init() {
|
|
EventQueue.invokeLater(new Runnable() {
|
|
public void run() {
|
|
if ("folder".equals(type)) {
|
|
NewJFrame2 newJFrame2 = new NewJFrame2(session, dataMap, (TCComponentFolder) target);
|
|
newJFrame2.setVisible(true);
|
|
} else if ("revision".equals(type)) {
|
|
// NewJFrame1 newJFrame2 = new NewJFrame1(session,dataMap);
|
|
// newJFrame2.setVisible(true);
|
|
}
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
}
|