|
|
@ -40,6 +40,7 @@ import com.connor.jd.plm.table.JCheckPanel;
|
|
|
|
import com.connor.jd.plm.table.JRadioPanel;
|
|
|
|
import com.connor.jd.plm.table.JRadioPanel;
|
|
|
|
import com.connor.jd.plm.table.MyCellEditor;
|
|
|
|
import com.connor.jd.plm.table.MyCellEditor;
|
|
|
|
import com.connor.jd.plm.table.MyCellEditor1;
|
|
|
|
import com.connor.jd.plm.table.MyCellEditor1;
|
|
|
|
|
|
|
|
import com.connor.jd.plm.table.MyCellEditor2;
|
|
|
|
import com.connor.jd.plm.table.TCTableUtil;
|
|
|
|
import com.connor.jd.plm.table.TCTableUtil;
|
|
|
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
|
|
|
import com.teamcenter.rac.aif.AbstractAIFApplication;
|
|
|
|
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
|
|
|
|
import com.teamcenter.rac.aif.kernel.AIFComponentContext;
|
|
|
@ -61,21 +62,26 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
private JPanel center = null;
|
|
|
|
private JPanel center = null;
|
|
|
|
private JPopupMenu menu = new JPopupMenu();
|
|
|
|
private JPopupMenu menu = new JPopupMenu();
|
|
|
|
private JPopupMenu menu2 = new JPopupMenu();
|
|
|
|
private JPopupMenu menu2 = new JPopupMenu();
|
|
|
|
|
|
|
|
private JPopupMenu menu3 = new JPopupMenu();
|
|
|
|
private JPanel confirmPanel = new JPanel();
|
|
|
|
private JPanel confirmPanel = new JPanel();
|
|
|
|
private JPanel examinePanel = new JPanel();
|
|
|
|
private JPanel examinePanel = new JPanel();
|
|
|
|
private CTMap model;
|
|
|
|
private CTMap model;
|
|
|
|
private CTMap model2;
|
|
|
|
private CTMap model2;
|
|
|
|
|
|
|
|
private CTMap model3;
|
|
|
|
private CTable table;
|
|
|
|
private CTable table;
|
|
|
|
private CTable table2;
|
|
|
|
private CTable table2;
|
|
|
|
|
|
|
|
private CTable table3;
|
|
|
|
private int top = 13;// 头部行数
|
|
|
|
private int top = 13;// 头部行数
|
|
|
|
private int bottom;// 中间部分结束
|
|
|
|
private int bottom;// 中间部分结束
|
|
|
|
private int end = 14;// 尾部行数+1
|
|
|
|
private int end = 1;// 尾部行数+1
|
|
|
|
private int top2 = 4;
|
|
|
|
private int top2 = 4;
|
|
|
|
private int bottom2;
|
|
|
|
private int bottom2;
|
|
|
|
private int end2 = 16;
|
|
|
|
private int end2 = 16;
|
|
|
|
private Map<String, String> prop;
|
|
|
|
private Map<String, String> prop;
|
|
|
|
private Map<String, int[]> general;
|
|
|
|
private Map<String, int[]> general;
|
|
|
|
|
|
|
|
private Map<String, int[]> general3;
|
|
|
|
private List<String> disableEdit;
|
|
|
|
private List<String> disableEdit;
|
|
|
|
|
|
|
|
private List<String> disableEdit3;
|
|
|
|
private Map<String, int[]> pic;
|
|
|
|
private Map<String, int[]> pic;
|
|
|
|
private List<String> disableEdit2;
|
|
|
|
private List<String> disableEdit2;
|
|
|
|
private JRadioPanel yssl;
|
|
|
|
private JRadioPanel yssl;
|
|
|
@ -128,13 +134,11 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
// 确认单
|
|
|
|
// 确认单
|
|
|
|
confirmPanel.setBorder(BorderFactory.createLineBorder(Color.black, 1));
|
|
|
|
confirmPanel.setBorder(BorderFactory.createLineBorder(Color.black, 1));
|
|
|
|
confirmPanel.setLayout(new BorderLayout());
|
|
|
|
confirmPanel.setLayout(new BorderLayout());
|
|
|
|
|
|
|
|
confirmPanel.setPreferredSize(new Dimension(800, 600));
|
|
|
|
|
|
|
|
|
|
|
|
// 设置属性
|
|
|
|
// 设置属性
|
|
|
|
model = new CTMap(47, 20);
|
|
|
|
model = new CTMap(30, 20);
|
|
|
|
bottom = model.getRowCount() - end;
|
|
|
|
bottom = model.getRowCount() - end;
|
|
|
|
|
|
|
|
|
|
|
|
// 合并单元格
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initModel();
|
|
|
|
initModel();
|
|
|
|
|
|
|
|
|
|
|
|
table = new CTable(model) {
|
|
|
|
table = new CTable(model) {
|
|
|
@ -166,10 +170,6 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
boolean hasFocus, int row, int column) {
|
|
|
|
boolean hasFocus, int row, int column) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
if (value instanceof JLabel) {
|
|
|
|
|
|
|
|
return (JLabel) value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (value instanceof JPanel) {
|
|
|
|
if (value instanceof JPanel) {
|
|
|
|
return (JPanel) value;
|
|
|
|
return (JPanel) value;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -202,7 +202,71 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
table.getColumnModel().getColumn(i).setCellEditor(new MyCellEditor(new JTextField(), top, end, bottom));
|
|
|
|
table.getColumnModel().getColumn(i).setCellEditor(new MyCellEditor(new JTextField(), top, end, bottom));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
table.addMouseListener(rightClick());
|
|
|
|
table.addMouseListener(rightClick());
|
|
|
|
confirmPanel.add(table, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
|
|
model3 = new CTMap(13, 20);
|
|
|
|
|
|
|
|
initModel3();
|
|
|
|
|
|
|
|
table3 = new CTable(model3) {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean isCellEditable(int row, int col) {
|
|
|
|
|
|
|
|
if (isEditorDisable(disableEdit3, row, col)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
table3.setRowHeight(25);
|
|
|
|
|
|
|
|
table3.setBorder(BorderFactory.createLineBorder(Color.black));
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(0).setPreferredWidth(40);
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(1).setPreferredWidth(60);
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(2).setPreferredWidth(50);
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(3).setPreferredWidth(50);
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(4).setPreferredWidth(50);
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(5).setPreferredWidth(60);
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(6).setPreferredWidth(60);
|
|
|
|
|
|
|
|
for (int i = 7; i < model3.getColumnCount() - 1; i++) {
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(i).setPreferredWidth(45);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(model3.getColumnCount() - 1).setPreferredWidth(80);
|
|
|
|
|
|
|
|
DefaultTableCellRenderer tcr3 = new DefaultTableCellRenderer() {
|
|
|
|
|
|
|
|
// 重写方法
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
|
|
|
|
|
|
|
|
boolean hasFocus, int row, int column) {
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (value instanceof JLabel) {
|
|
|
|
|
|
|
|
return (JLabel) value;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int maxPreferredHeight = 0;
|
|
|
|
|
|
|
|
for (int i = 0; i < table.getColumnCount(); i++) {
|
|
|
|
|
|
|
|
setText("" + table.getValueAt(row, i));
|
|
|
|
|
|
|
|
setSize(table.getColumnModel().getColumn(column).getWidth(), 0);
|
|
|
|
|
|
|
|
maxPreferredHeight = Math.max(maxPreferredHeight, getPreferredSize().height);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setBackground(Color.white);
|
|
|
|
|
|
|
|
// if(points1.contains(new Point(row,column)))
|
|
|
|
|
|
|
|
// setForeground(new Color(0,0,255));
|
|
|
|
|
|
|
|
// else
|
|
|
|
|
|
|
|
setForeground(Color.black);
|
|
|
|
|
|
|
|
if (isSelected) {
|
|
|
|
|
|
|
|
setBackground(new Color(0, 120, 215));
|
|
|
|
|
|
|
|
setForeground(Color.white);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (table.getRowHeight(row) != maxPreferredHeight) // 少了这行则处理器瞎忙
|
|
|
|
|
|
|
|
table.setRowHeight(row, maxPreferredHeight);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setText(value == null ? "" : value.toString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
tcr3.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
|
|
|
|
|
table3.setDefaultRenderer(Object.class, tcr3);
|
|
|
|
|
|
|
|
for (int i = 0; i < model3.getColumnCount(); i++) {
|
|
|
|
|
|
|
|
table3.getColumnModel().getColumn(i).setCellEditor(new MyCellEditor2(new JTextField()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
table3.addMouseListener(rightClick3());
|
|
|
|
|
|
|
|
|
|
|
|
// 填写数据
|
|
|
|
// 填写数据
|
|
|
|
prop = form.getProperties();
|
|
|
|
prop = form.getProperties();
|
|
|
@ -214,6 +278,14 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
System.out.println("属性‘" + entry.getKey() + "’未找到");
|
|
|
|
System.out.println("属性‘" + entry.getKey() + "’未找到");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (Entry<String, int[]> entry : general3.entrySet()) {
|
|
|
|
|
|
|
|
if (prop.containsKey(entry.getKey())) {
|
|
|
|
|
|
|
|
model3.setValueAt(prop.get(entry.getKey()), entry.getValue()[0], entry.getValue()[1]);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
model3.setValueAt("", entry.getValue()[0], entry.getValue()[1]);
|
|
|
|
|
|
|
|
System.out.println("属性‘" + entry.getKey() + "’未找到");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if (prop.containsKey("jd2_yssl")) {
|
|
|
|
if (prop.containsKey("jd2_yssl")) {
|
|
|
|
yssl.setSelected(prop.get("jd2_yssl"));
|
|
|
|
yssl.setSelected(prop.get("jd2_yssl"));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -244,32 +316,32 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
|
|
|
|
|
|
|
|
ImageIcon icon = new ImageIcon(img.getPath());
|
|
|
|
ImageIcon icon = new ImageIcon(img.getPath());
|
|
|
|
|
|
|
|
|
|
|
|
int[] arr = model.getSpan(row, col);
|
|
|
|
int[] arr = model3.getSpan(row, col);
|
|
|
|
int width = 0;
|
|
|
|
int width = 0;
|
|
|
|
for (int i = 0; i < arr[1]; i++) {
|
|
|
|
for (int i = 0; i < arr[1]; i++) {
|
|
|
|
// width+=table.getColumnModel().getColumn()
|
|
|
|
// width+=table3.getColumnModel().getColumn()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
System.out.println("row:" + arr[0] + ",col:" + arr[1]);
|
|
|
|
System.out.println("row:" + arr[0] + ",col:" + arr[1]);
|
|
|
|
icon.setImage(icon.getImage().getScaledInstance(
|
|
|
|
icon.setImage(icon.getImage().getScaledInstance(
|
|
|
|
table.getColumnModel().getColumn(col).getPreferredWidth() * arr[1],
|
|
|
|
table3.getColumnModel().getColumn(col).getPreferredWidth() * arr[1],
|
|
|
|
table.getRowHeight() * arr[0], Image.SCALE_SMOOTH));
|
|
|
|
table3.getRowHeight() * arr[0], Image.SCALE_SMOOTH));
|
|
|
|
JLabel label = new JLabel();
|
|
|
|
JLabel label = new JLabel();
|
|
|
|
label.setLayout(new FlowLayout(FlowLayout.CENTER));
|
|
|
|
label.setLayout(new FlowLayout(FlowLayout.CENTER));
|
|
|
|
label.setIcon(icon);
|
|
|
|
label.setIcon(icon);
|
|
|
|
label.addMouseListener(showImg(img.getPath()));
|
|
|
|
label.addMouseListener(showImg(img.getPath()));
|
|
|
|
label.setToolTipText(dataset.getUid());
|
|
|
|
label.setToolTipText(dataset.getUid());
|
|
|
|
model.setValueAt(label, row, col);
|
|
|
|
model3.setValueAt(label, row, col);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
model.setValueAt(new JLabel(""), row, col);
|
|
|
|
model3.setValueAt(new JLabel(""), row, col);
|
|
|
|
System.out.println("未找到uid为\"" + prop.get(entry.getKey()) + "\"的数据集");
|
|
|
|
// System.out.println("未找到uid为\"" + prop.get(entry.getKey()) + "\"的数据集");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
model.setValueAt(new JLabel(""), row, col);
|
|
|
|
model3.setValueAt(new JLabel(""), row, col);
|
|
|
|
e.printStackTrace(System.out);
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
model.setValueAt(new JLabel(""), row, col);
|
|
|
|
model3.setValueAt(new JLabel(""), row, col);
|
|
|
|
System.out.println("属性‘" + entry.getKey() + "’未找到");
|
|
|
|
System.out.println("属性‘" + entry.getKey() + "’未找到");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -292,8 +364,12 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
System.out.println("属性‘jd2_ypqrdtable’未找到");
|
|
|
|
System.out.println("属性‘jd2_ypqrdtable’未找到");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ScrollPane confirmScrollPanel = new ScrollPane();
|
|
|
|
ScrollPane confirmScrollPanel1 = new ScrollPane();
|
|
|
|
confirmScrollPanel.add(confirmPanel);
|
|
|
|
confirmScrollPanel1.add(table);
|
|
|
|
|
|
|
|
ScrollPane confirmScrollPanel3 = new ScrollPane();
|
|
|
|
|
|
|
|
confirmScrollPanel3.add(table3);
|
|
|
|
|
|
|
|
confirmPanel.add(confirmScrollPanel1, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
confirmPanel.add(confirmScrollPanel3, BorderLayout.SOUTH);
|
|
|
|
// 检查表
|
|
|
|
// 检查表
|
|
|
|
examinePanel.setBorder(BorderFactory.createLineBorder(Color.black, 1));
|
|
|
|
examinePanel.setBorder(BorderFactory.createLineBorder(Color.black, 1));
|
|
|
|
examinePanel.setLayout(new BorderLayout());
|
|
|
|
examinePanel.setLayout(new BorderLayout());
|
|
|
@ -321,21 +397,21 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
disableEdit2.add(i + ",0");
|
|
|
|
disableEdit2.add(i + ",0");
|
|
|
|
model2.combine(new int[] { i }, new int[] { 0, 1 });
|
|
|
|
model2.combine(new int[] { i }, new int[] { 0, 1 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
model2.setValueAt("MIN", bottom + 1, 0);
|
|
|
|
model2.setValueAt("MIN", bottom2 + 1, 0);
|
|
|
|
model2.setValueAt("MAX", bottom + 2, 0);
|
|
|
|
model2.setValueAt("MAX", bottom2 + 2, 0);
|
|
|
|
model2.setValueAt("R", bottom + 3, 0);
|
|
|
|
model2.setValueAt("R", bottom2 + 3, 0);
|
|
|
|
model2.setValueAt("标准偏差", bottom + 4, 0);
|
|
|
|
model2.setValueAt("标准偏差", bottom2 + 4, 0);
|
|
|
|
model2.setValueAt("平均", bottom + 5, 0);
|
|
|
|
model2.setValueAt("平均", bottom2 + 5, 0);
|
|
|
|
model2.setValueAt("X,BAR-3S", bottom + 6, 0);
|
|
|
|
model2.setValueAt("X,BAR-3S", bottom2 + 6, 0);
|
|
|
|
model2.setValueAt("X,BAR+3S", bottom + 7, 0);
|
|
|
|
model2.setValueAt("X,BAR+3S", bottom2 + 7, 0);
|
|
|
|
model2.setValueAt("CP", bottom + 8, 0);
|
|
|
|
model2.setValueAt("CP", bottom2 + 8, 0);
|
|
|
|
model2.setValueAt("Cpu", bottom + 9, 0);
|
|
|
|
model2.setValueAt("Cpu", bottom2 + 9, 0);
|
|
|
|
model2.setValueAt("Cpl", bottom + 10, 0);
|
|
|
|
model2.setValueAt("Cpl", bottom2 + 10, 0);
|
|
|
|
model2.setValueAt("CPK", bottom + 11, 0);
|
|
|
|
model2.setValueAt("CPK", bottom2 + 11, 0);
|
|
|
|
model2.setValueAt("SU 预测不良", bottom + 12, 0);
|
|
|
|
model2.setValueAt("SU 预测不良", bottom2 + 12, 0);
|
|
|
|
model2.setValueAt("SL 预测不良", bottom + 13, 0);
|
|
|
|
model2.setValueAt("SL 预测不良", bottom2 + 13, 0);
|
|
|
|
model2.setValueAt("预测不良(PPM)", bottom + 14, 0);
|
|
|
|
model2.setValueAt("预测不良(PPM)", bottom2 + 14, 0);
|
|
|
|
model2.setValueAt("工程能力意义", bottom + 15, 0);
|
|
|
|
model2.setValueAt("工程能力意义", bottom2 + 15, 0);
|
|
|
|
|
|
|
|
|
|
|
|
table2 = new CTable(model2) {
|
|
|
|
table2 = new CTable(model2) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -444,14 +520,6 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
|
|
|
|
|
|
|
|
// 确认单右键菜单
|
|
|
|
// 确认单右键菜单
|
|
|
|
menu.setVisible(false);
|
|
|
|
menu.setVisible(false);
|
|
|
|
addP = new JMenuItem("添加图片");
|
|
|
|
|
|
|
|
addP.setEnabled(false);
|
|
|
|
|
|
|
|
menu.add(addP);
|
|
|
|
|
|
|
|
addP.addActionListener(addPic());
|
|
|
|
|
|
|
|
delP = new JMenuItem("删除图片");
|
|
|
|
|
|
|
|
delP.setEnabled(false);
|
|
|
|
|
|
|
|
menu.add(delP);
|
|
|
|
|
|
|
|
delP.addActionListener(delPic());
|
|
|
|
|
|
|
|
addR = new JMenuItem("添加行");
|
|
|
|
addR = new JMenuItem("添加行");
|
|
|
|
addR.setEnabled(false);
|
|
|
|
addR.setEnabled(false);
|
|
|
|
menu.add(addR);
|
|
|
|
menu.add(addR);
|
|
|
@ -465,6 +533,16 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
menu.add(delR);
|
|
|
|
menu.add(delR);
|
|
|
|
delR.addActionListener(deleteRow());
|
|
|
|
delR.addActionListener(deleteRow());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
menu3.setVisible(false);
|
|
|
|
|
|
|
|
addP = new JMenuItem("添加图片");
|
|
|
|
|
|
|
|
addP.setEnabled(false);
|
|
|
|
|
|
|
|
menu3.add(addP);
|
|
|
|
|
|
|
|
addP.addActionListener(addPic());
|
|
|
|
|
|
|
|
delP = new JMenuItem("删除图片");
|
|
|
|
|
|
|
|
delP.setEnabled(false);
|
|
|
|
|
|
|
|
menu3.add(delP);
|
|
|
|
|
|
|
|
delP.addActionListener(delPic());
|
|
|
|
|
|
|
|
|
|
|
|
// 检验单右键菜单
|
|
|
|
// 检验单右键菜单
|
|
|
|
menu2.setVisible(false);
|
|
|
|
menu2.setVisible(false);
|
|
|
|
addR2 = new JMenuItem("添加行");
|
|
|
|
addR2 = new JMenuItem("添加行");
|
|
|
@ -480,12 +558,13 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
menu2.add(delR2);
|
|
|
|
menu2.add(delR2);
|
|
|
|
delR2.addActionListener(deleteRow2());
|
|
|
|
delR2.addActionListener(deleteRow2());
|
|
|
|
|
|
|
|
|
|
|
|
center.add("confirm", confirmScrollPanel);
|
|
|
|
center.add("confirm", confirmPanel);
|
|
|
|
center.add("examine", examineScrollPanel);
|
|
|
|
center.add("examine", examineScrollPanel);
|
|
|
|
root.add(buttons, BorderLayout.NORTH);
|
|
|
|
root.add(buttons, BorderLayout.NORTH);
|
|
|
|
root.add(center, BorderLayout.CENTER);
|
|
|
|
root.add(center, BorderLayout.CENTER);
|
|
|
|
this.add(menu);
|
|
|
|
this.add(menu);
|
|
|
|
this.add(menu2);
|
|
|
|
this.add(menu2);
|
|
|
|
|
|
|
|
this.add(menu3);
|
|
|
|
this.add(root, BorderLayout.CENTER);
|
|
|
|
this.add(root, BorderLayout.CENTER);
|
|
|
|
|
|
|
|
|
|
|
|
cl.show(center, "confirm");
|
|
|
|
cl.show(center, "confirm");
|
|
|
@ -494,7 +573,6 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
private void initModel() {
|
|
|
|
private void initModel() {
|
|
|
|
disableEdit = new ArrayList<>();// 不允许编辑
|
|
|
|
disableEdit = new ArrayList<>();// 不允许编辑
|
|
|
|
general = new HashMap<String, int[]>();// 要填写的一般属性
|
|
|
|
general = new HashMap<String, int[]>();// 要填写的一般属性
|
|
|
|
pic = new HashMap<String, int[]>();// 图片
|
|
|
|
|
|
|
|
model.setValueAt("样品确认单", 0, 0);
|
|
|
|
model.setValueAt("样品确认单", 0, 0);
|
|
|
|
disableEdit.add("0,0");
|
|
|
|
disableEdit.add("0,0");
|
|
|
|
model.setValueAt("提交", 0, 14);
|
|
|
|
model.setValueAt("提交", 0, 14);
|
|
|
@ -595,77 +673,9 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
for (int i = top + 2; i <= bottom; i++) {
|
|
|
|
for (int i = top + 2; i <= bottom; i++) {
|
|
|
|
model.setValueAt(i - 1 - top, i, 0);
|
|
|
|
model.setValueAt(i - 1 - top, i, 0);
|
|
|
|
disableEdit.add(i + ",0");
|
|
|
|
disableEdit.add(i + ",0");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.setValueAt("被标记为“CTQ”的尺寸非常重要", bottom + 1, 0);// 从“底部”开始
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 1 + ",0");
|
|
|
|
|
|
|
|
model.setValueAt("SPL Picture", bottom + 2, 0);
|
|
|
|
|
|
|
|
pic.put("jd2_ypzp", new int[] { bottom + 3, 0 });
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",0");
|
|
|
|
|
|
|
|
model.setValueAt("注塑条件", bottom + 2, 4);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",4");
|
|
|
|
|
|
|
|
model.setValueAt("C/Time", bottom + 2, 5);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",5");
|
|
|
|
|
|
|
|
model.setValueAt("注塑", bottom + 2, 6);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",6");
|
|
|
|
|
|
|
|
model.setValueAt("冷却", bottom + 2, 7);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",7");
|
|
|
|
|
|
|
|
model.setValueAt("包装", bottom + 2, 8);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",8");
|
|
|
|
|
|
|
|
model.setValueAt("供方自检报告", bottom + 2, 9);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",9");
|
|
|
|
|
|
|
|
model.setValueAt("供方作业指导书", bottom + 2, 12);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",12");
|
|
|
|
|
|
|
|
model.setValueAt("供方QC工程图", bottom + 2, 15);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",15");
|
|
|
|
|
|
|
|
model.setValueAt("物料包装及标签", bottom + 2, 18);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 2 + ",18");
|
|
|
|
|
|
|
|
general.put("jd2_Ctime", new int[] { bottom + 3, 5 });
|
|
|
|
|
|
|
|
general.put("jd2_zs", new int[] { bottom + 3, 6 });
|
|
|
|
|
|
|
|
general.put("jd2_lq", new int[] { bottom + 3, 7 });
|
|
|
|
|
|
|
|
general.put("jd2_baoz", new int[] { bottom + 3, 8 });
|
|
|
|
|
|
|
|
pic.put("jd2_gfzjbg", new int[] { bottom + 3, 9 });
|
|
|
|
|
|
|
|
pic.put("jd2_gfzyzds", new int[] { bottom + 3, 12 });
|
|
|
|
|
|
|
|
pic.put("jd2_gfqcgct", new int[] { bottom + 3, 15 });
|
|
|
|
|
|
|
|
pic.put("jd2_wlbzjbq", new int[] { bottom + 3, 18 });
|
|
|
|
|
|
|
|
model.setValueAt("Shot/24Hr", bottom + 4, 5);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 4 + ",5");
|
|
|
|
|
|
|
|
model.setValueAt("吨", bottom + 4, 6);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 4 + ",6");
|
|
|
|
|
|
|
|
general.put("jd2_Shot24Hr", new int[] { bottom + 5, 5 });
|
|
|
|
|
|
|
|
general.put("jd2_d", new int[] { bottom + 5, 6 });
|
|
|
|
|
|
|
|
model.setValueAt("3D重量", bottom + 6, 4);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 6 + ",4");
|
|
|
|
|
|
|
|
model.setValueAt("jd2_3Dzl", bottom + 6, 5);
|
|
|
|
|
|
|
|
general.put("jd2_3Dzl", new int[] { bottom + 6, 5 });
|
|
|
|
|
|
|
|
model.setValueAt("注塑工艺条件", bottom + 6, 7);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 6 + ",7");
|
|
|
|
|
|
|
|
model.setValueAt("IQC首检报告", bottom + 6, 9);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 6 + ",9");
|
|
|
|
|
|
|
|
model.setValueAt("测试报告", bottom + 6, 12);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 6 + ",12");
|
|
|
|
|
|
|
|
model.setValueAt("材质报告", bottom + 6, 15);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 6 + ",15");
|
|
|
|
|
|
|
|
model.setValueAt("模具标识", bottom + 6, 18);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 6 + ",18");
|
|
|
|
|
|
|
|
pic.put("jd2_zsgytj", new int[] { bottom + 7, 7 });
|
|
|
|
|
|
|
|
pic.put("jd2_icqsjbg", new int[] { bottom + 7, 9 });
|
|
|
|
|
|
|
|
pic.put("jd2_csbg", new int[] { bottom + 7, 12 });
|
|
|
|
|
|
|
|
pic.put("jd2_czbg", new int[] { bottom + 7, 15 });
|
|
|
|
|
|
|
|
pic.put("jd2_mjbs", new int[] { bottom + 7, 18 });
|
|
|
|
|
|
|
|
model.setValueAt("实测重量", bottom + 8, 4);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 8 + ",4");
|
|
|
|
|
|
|
|
general.put("jd2_sczl", new int[] { bottom + 8, 5 });
|
|
|
|
|
|
|
|
model.setValueAt("IQC作业指导书", bottom + 10, 4);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 10 + ",4");
|
|
|
|
|
|
|
|
pic.put("jd2_icqjyzds", new int[] { bottom + 11, 4 });
|
|
|
|
|
|
|
|
model.setValueAt("决定", bottom + 12, 12);
|
|
|
|
|
|
|
|
disableEdit.add(bottom + 12 + ",12");
|
|
|
|
|
|
|
|
general.put("jd2_jued", new int[] { bottom + 12, 15 });
|
|
|
|
|
|
|
|
pic.put("jd2_qtbg", new int[] { bottom + 10, 7 });
|
|
|
|
|
|
|
|
for (int i = top + 2; i <= bottom; i++) {
|
|
|
|
|
|
|
|
model.combine(new int[] { i }, new int[] { 2, 3, 4 });
|
|
|
|
model.combine(new int[] { i }, new int[] { 2, 3, 4 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
model.combine(new int[] { 0, 1 }, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 });
|
|
|
|
model.combine(new int[] { 0, 1 }, new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 });
|
|
|
|
model.combine(new int[] { 0, 1 }, new int[] { 14, 15 });
|
|
|
|
model.combine(new int[] { 0, 1 }, new int[] { 14, 15 });
|
|
|
|
model.combine(new int[] { 0, 1 }, new int[] { 16, 17 });
|
|
|
|
model.combine(new int[] { 0, 1 }, new int[] { 16, 17 });
|
|
|
@ -715,42 +725,115 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
model.combine(new int[] { top, top + 1 }, new int[] { 19 });
|
|
|
|
model.combine(new int[] { top, top + 1 }, new int[] { 19 });
|
|
|
|
model.combine(new int[] { top + 1 }, new int[] { 1, 2, 3, 4 });
|
|
|
|
model.combine(new int[] { top + 1 }, new int[] { 1, 2, 3, 4 });
|
|
|
|
model.combine(new int[] { top + 1 }, new int[] { 5, 6 });
|
|
|
|
model.combine(new int[] { top + 1 }, new int[] { 5, 6 });
|
|
|
|
model.combine(new int[] { bottom + 1 }, new int[] { 0, 1, 2, 3, 4, 5 });
|
|
|
|
|
|
|
|
model.combine(new int[] { bottom + 2 }, new int[] { 0, 1 });
|
|
|
|
}
|
|
|
|
model.combine(new int[] { bottom + 2 }, new int[] { 2, 3 });
|
|
|
|
|
|
|
|
model.combine(new int[] { bottom + 3, bottom + 4, bottom + 5, bottom + 6, bottom + 7, bottom + 8, bottom + 9,
|
|
|
|
private void initModel3() {
|
|
|
|
bottom + 10, bottom + 11, bottom + 12, bottom + 13 }, new int[] { 0, 1, 2, 3 });
|
|
|
|
disableEdit3 = new ArrayList<>();// 不允许编辑
|
|
|
|
model.combine(new int[] { bottom + 2, bottom + 3, bottom + 4, bottom + 5 }, new int[] { 4 });
|
|
|
|
general3 = new HashMap<String, int[]>();// 要填写的一般属性
|
|
|
|
model.combine(new int[] { bottom + 2 }, new int[] { 9, 10, 11 });
|
|
|
|
pic = new HashMap<String, int[]>();// 图片
|
|
|
|
model.combine(new int[] { bottom + 2 }, new int[] { 12, 13, 14 });
|
|
|
|
model3.setValueAt("被标记为“CTQ”的尺寸非常重要", 0, 0);// 从“底部”开始
|
|
|
|
model.combine(new int[] { bottom + 2 }, new int[] { 15, 16, 17 });
|
|
|
|
disableEdit3.add(0 + ",0");
|
|
|
|
model.combine(new int[] { bottom + 2 }, new int[] { 18, 19 });
|
|
|
|
model3.setValueAt("SPL Picture", 1, 0);
|
|
|
|
model.combine(new int[] { bottom + 4, bottom + 5 }, new int[] { 7, 8 });
|
|
|
|
pic.put("jd2_ypzp", new int[] { 2, 0 });
|
|
|
|
model.combine(new int[] { bottom + 3, bottom + 4, bottom + 5 }, new int[] { 9, 10, 11 });
|
|
|
|
disableEdit3.add(1 + ",0");
|
|
|
|
model.combine(new int[] { bottom + 3, bottom + 4, bottom + 5 }, new int[] { 12, 13, 14 });
|
|
|
|
model3.setValueAt("注塑条件", 1, 4);
|
|
|
|
model.combine(new int[] { bottom + 3, bottom + 4, bottom + 5 }, new int[] { 15, 16, 17 });
|
|
|
|
disableEdit3.add(1 + ",4");
|
|
|
|
model.combine(new int[] { bottom + 3, bottom + 4, bottom + 5 }, new int[] { 18, 19 });
|
|
|
|
model3.setValueAt("C/Time", 1, 5);
|
|
|
|
model.combine(new int[] { bottom + 6, bottom + 7 }, new int[] { 4 });
|
|
|
|
disableEdit3.add(1 + ",5");
|
|
|
|
model.combine(new int[] { bottom + 8, bottom + 9 }, new int[] { 4 });
|
|
|
|
model3.setValueAt("注塑", 1, 6);
|
|
|
|
model.combine(new int[] { bottom + 6, bottom + 7 }, new int[] { 5 });
|
|
|
|
disableEdit3.add(1 + ",6");
|
|
|
|
model.combine(new int[] { bottom + 8, bottom + 9 }, new int[] { 5 });
|
|
|
|
model3.setValueAt("冷却", 1, 7);
|
|
|
|
model.combine(new int[] { bottom + 6, bottom + 7, bottom + 8, bottom + 9 }, new int[] { 6 });
|
|
|
|
disableEdit3.add(1 + ",7");
|
|
|
|
model.combine(new int[] { bottom + 6 }, new int[] { 7, 8 });
|
|
|
|
model3.setValueAt("包装", 1, 8);
|
|
|
|
model.combine(new int[] { bottom + 6 }, new int[] { 9, 10, 11 });
|
|
|
|
disableEdit3.add(1 + ",8");
|
|
|
|
model.combine(new int[] { bottom + 6 }, new int[] { 12, 13, 14 });
|
|
|
|
model3.setValueAt("供方自检报告", 1, 9);
|
|
|
|
model.combine(new int[] { bottom + 6 }, new int[] { 15, 16, 17 });
|
|
|
|
disableEdit3.add(1 + ",9");
|
|
|
|
model.combine(new int[] { bottom + 6 }, new int[] { 18, 19 });
|
|
|
|
model3.setValueAt("供方作业指导书", 1, 12);
|
|
|
|
model.combine(new int[] { bottom + 7, bottom + 8, bottom + 9 }, new int[] { 7, 8 });
|
|
|
|
disableEdit3.add(1 + ",12");
|
|
|
|
model.combine(new int[] { bottom + 7, bottom + 8, bottom + 9 }, new int[] { 9, 10, 11 });
|
|
|
|
model3.setValueAt("供方QC工程图", 1, 15);
|
|
|
|
model.combine(new int[] { bottom + 7, bottom + 8, bottom + 9 }, new int[] { 12, 13, 14 });
|
|
|
|
disableEdit3.add(1 + ",15");
|
|
|
|
model.combine(new int[] { bottom + 7, bottom + 8, bottom + 9 }, new int[] { 15, 16, 17 });
|
|
|
|
model3.setValueAt("物料包装及标签", 1, 18);
|
|
|
|
model.combine(new int[] { bottom + 7, bottom + 8, bottom + 9 }, new int[] { 18, 19 });
|
|
|
|
disableEdit3.add(1 + ",18");
|
|
|
|
model.combine(new int[] { bottom + 10 }, new int[] { 4, 5, 6 });
|
|
|
|
general3.put("jd2_Ctime", new int[] { 2, 5 });
|
|
|
|
model.combine(new int[] { bottom + 11, bottom + 12, bottom + 13 }, new int[] { 4, 5, 6 });
|
|
|
|
general3.put("jd2_zs", new int[] { 2, 6 });
|
|
|
|
model.combine(new int[] { bottom + 10, bottom + 11, bottom + 12, bottom + 13 }, new int[] { 7, 8, 9, 10, 11 });
|
|
|
|
general3.put("jd2_lq", new int[] { 2, 7 });
|
|
|
|
model.combine(new int[] { bottom + 10, bottom + 11 }, new int[] { 12, 13, 14, 15, 16, 17, 18, 19 });
|
|
|
|
general3.put("jd2_baoz", new int[] { 2, 8 });
|
|
|
|
model.combine(new int[] { bottom + 12, bottom + 13 }, new int[] { 12, 13, 14 });
|
|
|
|
pic.put("jd2_gfzjbg", new int[] { 2, 9 });
|
|
|
|
model.combine(new int[] { bottom + 12, bottom + 13 }, new int[] { 15, 16, 17, 18, 19 });
|
|
|
|
pic.put("jd2_gfzyzds", new int[] { 2, 12 });
|
|
|
|
|
|
|
|
pic.put("jd2_gfqcgct", new int[] { 2, 15 });
|
|
|
|
|
|
|
|
pic.put("jd2_wlbzjbq", new int[] { 2, 18 });
|
|
|
|
|
|
|
|
model3.setValueAt("Shot/24Hr", 3, 5);
|
|
|
|
|
|
|
|
disableEdit3.add(3 + ",5");
|
|
|
|
|
|
|
|
model3.setValueAt("吨", 3, 6);
|
|
|
|
|
|
|
|
disableEdit3.add(3 + ",6");
|
|
|
|
|
|
|
|
general3.put("jd2_Shot24Hr", new int[] { 4, 5 });
|
|
|
|
|
|
|
|
general3.put("jd2_d", new int[] { 4, 6 });
|
|
|
|
|
|
|
|
model3.setValueAt("3D重量", 5, 4);
|
|
|
|
|
|
|
|
disableEdit3.add(5 + ",4");
|
|
|
|
|
|
|
|
model3.setValueAt("jd2_3Dzl", 5, 5);
|
|
|
|
|
|
|
|
general3.put("jd2_3Dzl", new int[] { 5, 5 });
|
|
|
|
|
|
|
|
model3.setValueAt("注塑工艺条件", 5, 7);
|
|
|
|
|
|
|
|
disableEdit3.add(5 + ",7");
|
|
|
|
|
|
|
|
model3.setValueAt("IQC首检报告", 5, 9);
|
|
|
|
|
|
|
|
disableEdit3.add(5 + ",9");
|
|
|
|
|
|
|
|
model3.setValueAt("测试报告", 5, 12);
|
|
|
|
|
|
|
|
disableEdit3.add(5 + ",12");
|
|
|
|
|
|
|
|
model3.setValueAt("材质报告", 5, 15);
|
|
|
|
|
|
|
|
disableEdit3.add(5 + ",15");
|
|
|
|
|
|
|
|
model3.setValueAt("模具标识", 5, 18);
|
|
|
|
|
|
|
|
disableEdit3.add(5 + ",18");
|
|
|
|
|
|
|
|
pic.put("jd2_zsgytj", new int[] { 6, 7 });
|
|
|
|
|
|
|
|
pic.put("jd2_icqsjbg", new int[] { 6, 9 });
|
|
|
|
|
|
|
|
pic.put("jd2_csbg", new int[] { 6, 12 });
|
|
|
|
|
|
|
|
pic.put("jd2_czbg", new int[] { 6, 15 });
|
|
|
|
|
|
|
|
pic.put("jd2_mjbs", new int[] { 6, 18 });
|
|
|
|
|
|
|
|
model3.setValueAt("实测重量", 7, 4);
|
|
|
|
|
|
|
|
disableEdit3.add(7 + ",4");
|
|
|
|
|
|
|
|
general3.put("jd2_sczl", new int[] { 7, 5 });
|
|
|
|
|
|
|
|
model3.setValueAt("IQC作业指导书", 9, 4);
|
|
|
|
|
|
|
|
disableEdit3.add(9 + ",4");
|
|
|
|
|
|
|
|
pic.put("jd2_icqjyzds", new int[] { 10, 4 });
|
|
|
|
|
|
|
|
model3.setValueAt("决定", 11, 12);
|
|
|
|
|
|
|
|
disableEdit3.add(11 + ",12");
|
|
|
|
|
|
|
|
general3.put("jd2_jued", new int[] { 11, 15 });
|
|
|
|
|
|
|
|
pic.put("jd2_qtbg", new int[] { 9, 7 });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model3.combine(new int[] { 0 }, new int[] { 0, 1, 2, 3, 4, 5 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 1 }, new int[] { 0, 1 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 1 }, new int[] { 2, 3 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, new int[] { 0, 1, 2, 3 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 1, 2, 3, 4 }, new int[] { 4 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 1 }, new int[] { 9, 10, 11 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 1 }, new int[] { 12, 13, 14 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 1 }, new int[] { 15, 16, 17 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 1 }, new int[] { 18, 19 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 3, 4 }, new int[] { 7, 8 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 2, 3, 4 }, new int[] { 9, 10, 11 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 2, 3, 4 }, new int[] { 12, 13, 14 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 2, 3, 4 }, new int[] { 15, 16, 17 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 2, 3, 4 }, new int[] { 18, 19 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5, 6 }, new int[] { 4 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 7, 8 }, new int[] { 4 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5, 6 }, new int[] { 5 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 7, 8 }, new int[] { 5 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5, 6, 7, 8 }, new int[] { 6 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5 }, new int[] { 7, 8 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5 }, new int[] { 9, 10, 11 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5 }, new int[] { 12, 13, 14 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5 }, new int[] { 15, 16, 17 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 5 }, new int[] { 18, 19 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 6, 7, 8 }, new int[] { 7, 8 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 6, 7, 8 }, new int[] { 9, 10, 11 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 6, 7, 8 }, new int[] { 12, 13, 14 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 6, 7, 8 }, new int[] { 15, 16, 17 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 6, 7, 8 }, new int[] { 18, 19 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 9 }, new int[] { 4, 5, 6 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 10, 11, 12 }, new int[] { 4, 5, 6 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 9, 10, 11, 12 }, new int[] { 7, 8, 9, 10, 11 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 9, 10 }, new int[] { 12, 13, 14, 15, 16, 17, 18, 19 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 11, 12 }, new int[] { 12, 13, 14 });
|
|
|
|
|
|
|
|
model3.combine(new int[] { 11, 12 }, new int[] { 15, 16, 17, 18, 19 });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -760,9 +843,9 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
for (Entry<String, int[]> entry : pic.entrySet()) {
|
|
|
|
for (Entry<String, int[]> entry : pic.entrySet()) {
|
|
|
|
if (prop.containsKey(entry.getKey())) {
|
|
|
|
if (prop.containsKey(entry.getKey())) {
|
|
|
|
System.out.println(entry.getKey());
|
|
|
|
System.out.println(entry.getKey());
|
|
|
|
label = (JLabel) model.getValueAt(entry.getValue()[0], entry.getValue()[1]);
|
|
|
|
label = (JLabel) model3.getValueAt(entry.getValue()[0], entry.getValue()[1]);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
form.setProperty(entry.getKey(), label.getToolTipText());
|
|
|
|
form.setProperty(entry.getKey(), label.getToolTipText() == null ? "" : label.getToolTipText());
|
|
|
|
} catch (TCException e) {
|
|
|
|
} catch (TCException e) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
@ -808,6 +891,22 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (Entry<String, int[]> entry : general3.entrySet()) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (prop.containsKey(entry.getKey())) {
|
|
|
|
|
|
|
|
String value = model3.getValueAt(entry.getValue()[0], entry.getValue()[1]).toString();
|
|
|
|
|
|
|
|
if (form.getTCProperty(entry.getKey()).getLOV() != null && !"".equals(value)) {
|
|
|
|
|
|
|
|
value = (String) form.getTCProperty(entry.getKey()).getLOV().getListOfValues()
|
|
|
|
|
|
|
|
.getRealValue(value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println(entry.getKey() + ":" + value);
|
|
|
|
|
|
|
|
form.setProperty(entry.getKey(), value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (TCException e) {
|
|
|
|
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// 保存表格
|
|
|
|
// 保存表格
|
|
|
|
if (prop.containsKey("jd2_ypqrdtable")) {
|
|
|
|
if (prop.containsKey("jd2_ypqrdtable")) {
|
|
|
|
List<String[]> data = new ArrayList<String[]>();
|
|
|
|
List<String[]> data = new ArrayList<String[]>();
|
|
|
@ -936,8 +1035,6 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
addR.setEnabled(flag);
|
|
|
|
addR.setEnabled(flag);
|
|
|
|
insertR.setEnabled(flag);
|
|
|
|
insertR.setEnabled(flag);
|
|
|
|
delR.setEnabled(flag);
|
|
|
|
delR.setEnabled(flag);
|
|
|
|
flag = row > bottom;
|
|
|
|
|
|
|
|
addP.setEnabled(flag);
|
|
|
|
|
|
|
|
menu.show(e.getComponent(), e.getX(), e.getY());
|
|
|
|
menu.show(e.getComponent(), e.getX(), e.getY());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -962,6 +1059,30 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
return mouseAdapter;
|
|
|
|
return mouseAdapter;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private MouseAdapter rightClick3() {
|
|
|
|
|
|
|
|
MouseAdapter mouseAdapter = new MouseAdapter() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void mouseClicked(MouseEvent e) {
|
|
|
|
|
|
|
|
if (e.getButton() == MouseEvent.BUTTON3 && form.isCheckedOut() && table3.getSelectedRow() != -1) {
|
|
|
|
|
|
|
|
int row = table3.getSelectedRow();
|
|
|
|
|
|
|
|
int col = table3.getSelectedColumn();
|
|
|
|
|
|
|
|
boolean flag = false;
|
|
|
|
|
|
|
|
for (Entry<String, int[]> entry : pic.entrySet()) {
|
|
|
|
|
|
|
|
if (entry.getValue()[0] == row && entry.getValue()[1] == col) {
|
|
|
|
|
|
|
|
flag = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
addP.setEnabled(flag);
|
|
|
|
|
|
|
|
delP.setEnabled(flag);
|
|
|
|
|
|
|
|
menu3.show(e.getComponent(), e.getX(), e.getY());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
return mouseAdapter;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private ActionListener addPic() {
|
|
|
|
private ActionListener addPic() {
|
|
|
|
ActionListener actionListener = new ActionListener() {
|
|
|
|
ActionListener actionListener = new ActionListener() {
|
|
|
|
|
|
|
|
|
|
|
@ -1004,19 +1125,19 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
String uid = dataset.getUid();
|
|
|
|
String uid = dataset.getUid();
|
|
|
|
System.out.println("uid:" + uid);
|
|
|
|
System.out.println("uid:" + uid);
|
|
|
|
ImageIcon icon = new ImageIcon(file.getPath());
|
|
|
|
ImageIcon icon = new ImageIcon(file.getPath());
|
|
|
|
int row = table.getSelectedRow();
|
|
|
|
int row = table3.getSelectedRow();
|
|
|
|
int col = table.getSelectedColumn();
|
|
|
|
int col = table3.getSelectedColumn();
|
|
|
|
int[] arr = model.getSpan(row, col);
|
|
|
|
int[] arr = model3.getSpan(row, col);
|
|
|
|
System.out.println("row:" + arr[0] + ",col:" + arr[1]);
|
|
|
|
System.out.println("row:" + arr[0] + ",col:" + arr[1]);
|
|
|
|
icon.setImage(icon.getImage().getScaledInstance(
|
|
|
|
icon.setImage(icon.getImage().getScaledInstance(
|
|
|
|
table.getColumnModel().getColumn(col).getPreferredWidth() * arr[1],
|
|
|
|
table3.getColumnModel().getColumn(col).getPreferredWidth() * arr[1],
|
|
|
|
table.getRowHeight() * arr[0], Image.SCALE_SMOOTH));
|
|
|
|
table3.getRowHeight() * arr[0], Image.SCALE_SMOOTH));
|
|
|
|
JLabel label = new JLabel();
|
|
|
|
JLabel label = new JLabel();
|
|
|
|
label.setLayout(new FlowLayout(FlowLayout.CENTER));
|
|
|
|
label.setLayout(new FlowLayout(FlowLayout.CENTER));
|
|
|
|
label.setIcon(icon);
|
|
|
|
label.setIcon(icon);
|
|
|
|
label.addMouseListener(showImg(file.getPath()));
|
|
|
|
label.addMouseListener(showImg(file.getPath()));
|
|
|
|
label.setToolTipText(uid);
|
|
|
|
label.setToolTipText(uid);
|
|
|
|
model.setValueAt(label, table.getSelectedRow(), table.getSelectedColumn());
|
|
|
|
model3.setValueAt(label, table3.getSelectedRow(), table3.getSelectedColumn());
|
|
|
|
} catch (TCException e1) {
|
|
|
|
} catch (TCException e1) {
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
// TODO Auto-generated catch block
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
@ -1034,9 +1155,9 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
int row = table.getSelectedRow();
|
|
|
|
int row = table3.getSelectedRow();
|
|
|
|
int col = table.getSelectedColumn();
|
|
|
|
int col = table3.getSelectedColumn();
|
|
|
|
model.setValueAt(new JLabel(""), row, col);
|
|
|
|
model3.setValueAt(new JLabel(""), row, col);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -1051,11 +1172,11 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
int num = Integer.parseInt(model.getValueAt(bottom, 0).toString());
|
|
|
|
int num = Integer.parseInt(model.getValueAt(bottom, 0).toString());
|
|
|
|
model.insertRow(++bottom);
|
|
|
|
model.insertRow(++bottom);
|
|
|
|
// model.setValueAt(num + 1, bottom, 0);
|
|
|
|
model.setValueAt(num + 1, bottom, 0);
|
|
|
|
// model.combine(new int[] { bottom }, new int[] { 2, 3, 4 });
|
|
|
|
model.combine(new int[] { bottom }, new int[] { 2, 3, 4 });
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(bottom);
|
|
|
|
// System.out.println(bottom);
|
|
|
|
initModel();
|
|
|
|
// initModel();
|
|
|
|
table.revalidate();
|
|
|
|
table.revalidate();
|
|
|
|
table.repaint();
|
|
|
|
table.repaint();
|
|
|
|
|
|
|
|
|
|
|
@ -1094,8 +1215,8 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
model.combine(new int[] { row }, new int[] { 2, 3, 4 });
|
|
|
|
model.combine(new int[] { row }, new int[] { 2, 3, 4 });
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(bottom);
|
|
|
|
// System.out.println(bottom);
|
|
|
|
initModel();
|
|
|
|
// initModel();
|
|
|
|
table.revalidate();
|
|
|
|
table.revalidate();
|
|
|
|
table.repaint();
|
|
|
|
table.repaint();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1138,8 +1259,8 @@ public class SampleConfirmationForm extends AbstractRendering {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(bottom);
|
|
|
|
// System.out.println(bottom);
|
|
|
|
initModel();
|
|
|
|
// initModel();
|
|
|
|
table.revalidate();
|
|
|
|
table.revalidate();
|
|
|
|
table.repaint();
|
|
|
|
table.repaint();
|
|
|
|
}
|
|
|
|
}
|
|
|
|