From 29783932c267a47df0de751294dd182d72b5a152 Mon Sep 17 00:00:00 2001 From: liujl Date: Fri, 3 Jan 2020 13:35:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=8C=E5=87=BB=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=96=87=E4=BB=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/connor/jd/plm/form/CSJHForm.java | 37 ++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/com.connor.jd.plm/src/com/connor/jd/plm/form/CSJHForm.java b/com.connor.jd.plm/src/com/connor/jd/plm/form/CSJHForm.java index 81f0a03..31bdb3d 100644 --- a/com.connor.jd.plm/src/com/connor/jd/plm/form/CSJHForm.java +++ b/com.connor.jd.plm/src/com/connor/jd/plm/form/CSJHForm.java @@ -390,26 +390,29 @@ public class CSJHForm extends AbstractRendering { table.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - if (e.getClickCount() == 2) { - System.out.println("双击了"); - int selectedRow = table.getSelectedRow(); // 获得选中行索引 - String value = (String) model.getValueAt(selectedRow, 15); - if (value == null) - value = ""; - if (!value.equals("")) { - try { - TCComponent[] result = session.search("零组件 ID", new String[] { "零组件 ID" }, - new String[] { value }); - TCComponentItem item = (TCComponentItem) result[0]; - TCComponent[] tccitem = item.getLatestItemRevision().getTCProperty("IMAN_specification") - .getReferenceValueArray(); - TCComponentDataset dataset = (TCComponentDataset) tccitem[0]; - dataset.open(); - } catch (Exception e1) { - e1.printStackTrace(); + if (table.getSelectedColumn() == 15) { + if (e.getClickCount() == 2) { + System.out.println("双击了"); + int selectedRow = table.getSelectedRow(); // 获得选中行索引 + String value = (String) model.getValueAt(selectedRow, 15); + if (value == null) + value = ""; + if (!value.equals("")) { + try { + TCComponent[] result = session.search("零组件 ID", new String[] { "零组件 ID" }, + new String[] { value }); + TCComponentItem item = (TCComponentItem) result[0]; + TCComponent[] tccitem = item.getLatestItemRevision().getTCProperty("IMAN_specification") + .getReferenceValueArray(); + TCComponentDataset dataset = (TCComponentDataset) tccitem[0]; + dataset.open(); + } catch (Exception e1) { + e1.printStackTrace(); + } } } } + } });