|
|
|
@ -69,6 +69,7 @@ public class TransformDesignToPartDialog extends AbstractAIFDialog implements Ac
|
|
|
|
|
private int index = 1;
|
|
|
|
|
private String[] types;
|
|
|
|
|
TCComponentBOMWindow win;
|
|
|
|
|
private JButton testBtn;
|
|
|
|
|
|
|
|
|
|
public TransformDesignToPartDialog(AbstractAIFApplication app, TCComponentBOMLine topBomline, String[] types) {
|
|
|
|
|
// TODO Auto-generated constructor stub
|
|
|
|
@ -173,10 +174,14 @@ public class TransformDesignToPartDialog extends AbstractAIFDialog implements Ac
|
|
|
|
|
okButton.addActionListener(this);
|
|
|
|
|
celButton = new JButton("Í˳ö");
|
|
|
|
|
celButton.addActionListener(this);
|
|
|
|
|
testBtn = new JButton("²âÊÔ");
|
|
|
|
|
testBtn.addActionListener(this);
|
|
|
|
|
|
|
|
|
|
botomJPanel.add("1.1.left.top", okButton);
|
|
|
|
|
botomJPanel.add("1.2.left.top", new JLabel(" "));
|
|
|
|
|
botomJPanel.add("1.3.left.top", celButton);
|
|
|
|
|
botomJPanel.add("1.4.left.top", new JLabel(" "));
|
|
|
|
|
botomJPanel.add("1.5.left.top", testBtn);
|
|
|
|
|
JPanel rootJPanel = new JPanel(new PropertyLayout());
|
|
|
|
|
rootJPanel.add("1.1.left.top", leftJPanel);
|
|
|
|
|
rootJPanel.add("1.2.left.top", rightroot);
|
|
|
|
@ -270,6 +275,21 @@ public class TransformDesignToPartDialog extends AbstractAIFDialog implements Ac
|
|
|
|
|
} else if (e.getSource().equals(celButton)) {
|
|
|
|
|
|
|
|
|
|
dispose();
|
|
|
|
|
} else if (e.getSource().equals(testBtn)) {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
TCComponent[] comps = session.search("Item Name", new String[] { "Áã×é¼þÃû³Æ" },
|
|
|
|
|
new String[] { "dtoeTest*" });
|
|
|
|
|
TCComponentItem parent = (TCComponentItem) comps[0];
|
|
|
|
|
List<TCComponentItemRevision> childRevList = new ArrayList<TCComponentItemRevision>();
|
|
|
|
|
for (int i = 1; i < comps.length; i++) {
|
|
|
|
|
childRevList.add(((TCComponentItem) comps[i]).getLatestItemRevision());
|
|
|
|
|
}
|
|
|
|
|
createBom(parent.getLatestItemRevision(), childRevList, null, null);
|
|
|
|
|
} catch (Exception e1) {
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -718,12 +738,12 @@ public class TransformDesignToPartDialog extends AbstractAIFDialog implements Ac
|
|
|
|
|
line.lock();
|
|
|
|
|
System.out.println("line object_string=====>" + line.getItemRevision().getProperty("object_string"));
|
|
|
|
|
session.getUserService().call("bs_bypass", new Object[] { true });
|
|
|
|
|
TCComponentBOMLine childBomLine = line.add(rev.getItem(), rev, null, false, "");
|
|
|
|
|
TCComponentBOMLine childBomLine = line.add(rev.getItem(), rev, null, false);
|
|
|
|
|
session.getUserService().call("bs_bypass", new Object[] { false });
|
|
|
|
|
line.save();
|
|
|
|
|
line.unlock();
|
|
|
|
|
|
|
|
|
|
if (countNoList.get(i) != null && !countNoList.get(i).equals("")) {
|
|
|
|
|
if (countNoList != null && countNoList.get(i) != null && !countNoList.get(i).equals("")) {
|
|
|
|
|
childBomLine.lock();
|
|
|
|
|
childBomLine.setProperties(setProps, new String[] { countNoList.get(i) });
|
|
|
|
|
childBomLine.save();
|
|
|
|
|