|
|
@ -164,6 +164,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
this.setLayout(new BorderLayout());
|
|
|
|
this.setLayout(new BorderLayout());
|
|
|
|
|
|
|
|
|
|
|
|
JPanel topPanel = getTopPanel();
|
|
|
|
JPanel topPanel = getTopPanel();
|
|
|
|
|
|
|
|
System.out.println("topPanel is null? " + (topPanel == null));
|
|
|
|
|
|
|
|
|
|
|
|
JPanel btnPanel = getBtnPanel();
|
|
|
|
JPanel btnPanel = getBtnPanel();
|
|
|
|
|
|
|
|
|
|
|
@ -184,6 +185,11 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
|
|
// this.validate();
|
|
|
|
// this.validate();
|
|
|
|
this.setVisible(true);
|
|
|
|
this.setVisible(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//强制刷新界面
|
|
|
|
|
|
|
|
this.revalidate();
|
|
|
|
|
|
|
|
this.repaint();
|
|
|
|
|
|
|
|
|
|
|
|
String groupID = getGroupID();
|
|
|
|
String groupID = getGroupID();
|
|
|
|
System.out.println("groupID==========" + groupID);
|
|
|
|
System.out.println("groupID==========" + groupID);
|
|
|
|
String factory = "";
|
|
|
|
String factory = "";
|
|
|
@ -286,7 +292,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Object source = e.getSource();
|
|
|
|
Object source = e.getSource();
|
|
|
|
System.out.println("source==>+" + source);
|
|
|
|
System.out.println("source==>+" + source);
|
|
|
@ -542,6 +548,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(errMsg.length() > 0) {
|
|
|
|
if(errMsg.length() > 0) {
|
|
|
|
MessageBox.post(errMsg.toString(), "提示 ", MessageBox.INFORMATION);
|
|
|
|
MessageBox.post(errMsg.toString(), "提示 ", MessageBox.INFORMATION);
|
|
|
|
KUtil.setByPass(false);
|
|
|
|
KUtil.setByPass(false);
|
|
|
@ -578,10 +585,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (tempMrevList.size() == 0) {
|
|
|
|
|
|
|
|
// MessageBox.post(eId + "对象未创建MPart!", "提示 ", MessageBox.INFORMATION);
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
// } else
|
|
|
|
|
|
|
|
if (tempMrevList.size() == 1) {
|
|
|
|
if (tempMrevList.size() == 1) {
|
|
|
|
// 把M放bom下
|
|
|
|
// 把M放bom下
|
|
|
|
addList.put(tempMrevList.get(0),sl);
|
|
|
|
addList.put(tempMrevList.get(0),sl);
|
|
|
@ -806,7 +810,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
} catch (Exception e1) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -833,7 +837,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
"com.teamcenter.rac.pse.PSEPerspective",
|
|
|
|
"com.teamcenter.rac.pse.PSEPerspective",
|
|
|
|
new InterfaceAIFComponent[] { table2RevList.get(t_part2.getSelectedRow()).getItem() });
|
|
|
|
new InterfaceAIFComponent[] { table2RevList.get(t_part2.getSelectedRow()).getItem() });
|
|
|
|
} catch (TCException e1) {
|
|
|
|
} catch (TCException e1) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -850,7 +854,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
userName = user.getUserName()+"_"+user.getUserId();
|
|
|
|
userName = user.getUserName()+"_"+user.getUserId();
|
|
|
|
} catch (TCException e1) {
|
|
|
|
} catch (TCException e1) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
MessageBox.post("请选择用户!", "提示 ", MessageBox.INFORMATION);
|
|
|
|
MessageBox.post("请选择用户!", "提示 ", MessageBox.INFORMATION);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -899,6 +903,7 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private JPanel getTablePanel() {
|
|
|
|
private JPanel getTablePanel() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
JPanel panel = new JPanel(new BorderLayout());
|
|
|
|
JPanel panel = new JPanel(new BorderLayout());
|
|
|
|
panel.setPreferredSize(new Dimension(1100, 600));
|
|
|
|
panel.setPreferredSize(new Dimension(1100, 600));
|
|
|
|
tm_part = new DefaultTableModel();
|
|
|
|
tm_part = new DefaultTableModel();
|
|
|
@ -1134,10 +1139,17 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
|
|
panel.setBorder(BorderFactory.createLoweredBevelBorder());
|
|
|
|
panel.setBorder(BorderFactory.createLoweredBevelBorder());
|
|
|
|
return panel;
|
|
|
|
return panel;
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
// TODO: handle exception
|
|
|
|
|
|
|
|
System.out.println("查询部分左边panel渲染异常!错误信息如下:"+e.getMessage());
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//获取右边的panel
|
|
|
|
//获取右边的panel
|
|
|
|
private JPanel getTablePanel2() {
|
|
|
|
private JPanel getTablePanel2() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
JPanel panel = new JPanel(new BorderLayout());
|
|
|
|
JPanel panel = new JPanel(new BorderLayout());
|
|
|
|
panel.setPreferredSize(new Dimension(200, 600));
|
|
|
|
panel.setPreferredSize(new Dimension(200, 600));
|
|
|
|
tm_part2 = new DefaultTableModel();
|
|
|
|
tm_part2 = new DefaultTableModel();
|
|
|
@ -1244,6 +1256,12 @@ public class MpartDialog extends JFrame implements ActionListener {
|
|
|
|
|
|
|
|
|
|
|
|
panel.setBorder(BorderFactory.createLoweredBevelBorder());
|
|
|
|
panel.setBorder(BorderFactory.createLoweredBevelBorder());
|
|
|
|
return panel;
|
|
|
|
return panel;
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
// TODO: handle exception
|
|
|
|
|
|
|
|
System.out.println("查询部分右边panel渲染异常!错误信息如下:"+e.getMessage());
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getGroupID() throws TCException {
|
|
|
|
public String getGroupID() throws TCException {
|
|
|
|