|
|
@@ -0,0 +1,659 @@
|
|
|
+package com.mes.component;
|
|
|
+
|
|
|
+import com.mes.entity.ToolParam;
|
|
|
+import com.mes.ui.MesClient;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+
|
|
|
+import javax.swing.*;
|
|
|
+import java.awt.*;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+public class CncLifeDialog extends JDialog {
|
|
|
+ public final Logger log = LoggerFactory.getLogger(CncLifeDialog.class);
|
|
|
+
|
|
|
+ public CncLifeDialog(Frame owner, int[] toolNums,String[] toolTitle,String[] toolLife){
|
|
|
+ super(owner, "刀具寿命");
|
|
|
+
|
|
|
+ init(toolNums,toolTitle,toolLife);
|
|
|
+ }
|
|
|
+
|
|
|
+ public JLabel toolTitle1;
|
|
|
+ public JTextField toolNum1;
|
|
|
+ public JTextField toolLife1;
|
|
|
+ public JLabel toolTitle2;
|
|
|
+ public JTextField toolNum2;
|
|
|
+ public JTextField toolLife2;
|
|
|
+ public JLabel toolTitle3;
|
|
|
+ public JTextField toolNum3;
|
|
|
+ public JTextField toolLife3;
|
|
|
+ public JLabel toolTitle4;
|
|
|
+ public JTextField toolNum4;
|
|
|
+ public JTextField toolLife4;
|
|
|
+ public JLabel toolTitle5;
|
|
|
+ public JLabel toolTitle9;
|
|
|
+ public JLabel toolTitle13;
|
|
|
+ public JLabel toolTitle17;
|
|
|
+ public JTextField toolNum5;
|
|
|
+ public JTextField toolNum9;
|
|
|
+ public JTextField toolNum13;
|
|
|
+ public JTextField toolNum17;
|
|
|
+ public JTextField toolLife5;
|
|
|
+ public JTextField toolLife13;
|
|
|
+ public JTextField toolLife17;
|
|
|
+ public JLabel toolTitle6;
|
|
|
+ public JLabel toolTitle10;
|
|
|
+ public JLabel toolTitle14;
|
|
|
+ public JLabel toolTitle18;
|
|
|
+ public JTextField toolNum6;
|
|
|
+ public JTextField toolNum10;
|
|
|
+ public JTextField toolNum14;
|
|
|
+ public JTextField toolNum18;
|
|
|
+ public JTextField toolLife6;
|
|
|
+ public JTextField toolLife9;
|
|
|
+ public JTextField toolLife10;
|
|
|
+ public JTextField toolLife14;
|
|
|
+ public JTextField toolLife18;
|
|
|
+ public JLabel toolTitle7;
|
|
|
+ public JLabel toolTitle11;
|
|
|
+ public JLabel toolTitle15;
|
|
|
+ public JLabel toolTitle19;
|
|
|
+ public JTextField toolNum7;
|
|
|
+ public JTextField toolNum11;
|
|
|
+ public JTextField toolNum15;
|
|
|
+ public JTextField toolNum19;
|
|
|
+ public JTextField toolLife7;
|
|
|
+ public JTextField toolLife11;
|
|
|
+ public JTextField toolLife15;
|
|
|
+ public JTextField toolLife19;
|
|
|
+ public JLabel toolTitle8;
|
|
|
+ public JLabel toolTitle12;
|
|
|
+ public JLabel toolTitle16;
|
|
|
+ public JLabel toolTitle20;
|
|
|
+ public JTextField toolNum8;
|
|
|
+ public JTextField toolNum12;
|
|
|
+ public JTextField toolNum16;
|
|
|
+ public JTextField toolNum20;
|
|
|
+ public JTextField toolLife8;
|
|
|
+ public JTextField toolLife12;
|
|
|
+ public JTextField toolLife16;
|
|
|
+ public JTextField toolLife20;
|
|
|
+ public List<ToolParam> toolParams = new ArrayList<ToolParam>();
|
|
|
+
|
|
|
+ private void init(int[] toolNums,String[] toolTitle,String[] toolLife){
|
|
|
+ Container container = this.getContentPane();
|
|
|
+ container.setLayout(null);
|
|
|
+ this.setSize(1024,468);
|
|
|
+ this.setLocationRelativeTo(null);
|
|
|
+
|
|
|
+ toolTitle1 = new JLabel("");
|
|
|
+ toolTitle1.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle1.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle1.setBounds(50, 70, 100, 30);
|
|
|
+ container.add(toolTitle1);
|
|
|
+
|
|
|
+ toolNum1 = new JTextField();
|
|
|
+ toolNum1.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum1.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum1.setText("1");
|
|
|
+ toolNum1.setEnabled(false);
|
|
|
+ toolNum1.setBounds(154, 70, 30, 30);
|
|
|
+ container.add(toolNum1);
|
|
|
+ toolNum1.setColumns(10);
|
|
|
+
|
|
|
+ toolLife1 = new JTextField();
|
|
|
+ toolLife1.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife1.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife1.setEnabled(false);
|
|
|
+ toolLife1.setColumns(10);
|
|
|
+ toolLife1.setBounds(187, 70, 60, 30);
|
|
|
+ container.add(toolLife1);
|
|
|
+
|
|
|
+ toolTitle2 = new JLabel("");
|
|
|
+ toolTitle2.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle2.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle2.setBounds(258, 70, 100, 30);
|
|
|
+ container.add(toolTitle2);
|
|
|
+
|
|
|
+ toolNum2 = new JTextField();
|
|
|
+ toolNum2.setText("2");
|
|
|
+ toolNum2.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum2.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum2.setEnabled(false);
|
|
|
+ toolNum2.setColumns(10);
|
|
|
+ toolNum2.setBounds(359, 70, 30, 30);
|
|
|
+ container.add(toolNum2);
|
|
|
+
|
|
|
+ toolLife2 = new JTextField();
|
|
|
+ toolLife2.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife2.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife2.setEnabled(false);
|
|
|
+ toolLife2.setColumns(10);
|
|
|
+ toolLife2.setBounds(393, 70, 60, 30);
|
|
|
+ container.add(toolLife2);
|
|
|
+
|
|
|
+ toolTitle3 = new JLabel("");
|
|
|
+ toolTitle3.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle3.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle3.setBounds(472, 70, 100, 30);
|
|
|
+ container.add(toolTitle3);
|
|
|
+
|
|
|
+ toolNum3 = new JTextField();
|
|
|
+ toolNum3.setText("3");
|
|
|
+ toolNum3.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum3.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum3.setEnabled(false);
|
|
|
+ toolNum3.setColumns(10);
|
|
|
+ toolNum3.setBounds(572, 70, 30, 30);
|
|
|
+ container.add(toolNum3);
|
|
|
+
|
|
|
+ toolLife3 = new JTextField();
|
|
|
+ toolLife3.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife3.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife3.setEnabled(false);
|
|
|
+ toolLife3.setColumns(10);
|
|
|
+ toolLife3.setBounds(606, 70, 60, 30);
|
|
|
+ container.add(toolLife3);
|
|
|
+
|
|
|
+ toolTitle4 = new JLabel("");
|
|
|
+ toolTitle4.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle4.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle4.setBounds(676, 70, 100, 30);
|
|
|
+ container.add(toolTitle4);
|
|
|
+
|
|
|
+ toolNum4 = new JTextField();
|
|
|
+ toolNum4.setText("4");
|
|
|
+ toolNum4.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum4.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum4.setEnabled(false);
|
|
|
+ toolNum4.setColumns(10);
|
|
|
+ toolNum4.setBounds(776, 70, 30, 30);
|
|
|
+ container.add(toolNum4);
|
|
|
+
|
|
|
+ toolLife4 = new JTextField();
|
|
|
+ toolLife4.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife4.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife4.setEnabled(false);
|
|
|
+ toolLife4.setColumns(10);
|
|
|
+ toolLife4.setBounds(810, 70, 60, 30);
|
|
|
+ container.add(toolLife4);
|
|
|
+
|
|
|
+ toolTitle5 = new JLabel("");
|
|
|
+ toolTitle5.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle5.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle5.setBounds(50, 110, 100, 30);
|
|
|
+ container.add(toolTitle5);
|
|
|
+
|
|
|
+ toolTitle9 = new JLabel("");
|
|
|
+ toolTitle9.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle9.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle9.setBounds(50, 150, 100, 30);
|
|
|
+ container.add(toolTitle9);
|
|
|
+
|
|
|
+ toolTitle13 = new JLabel("");
|
|
|
+ toolTitle13.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle13.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle13.setBounds(50, 190, 100, 30);
|
|
|
+ container.add(toolTitle13);
|
|
|
+
|
|
|
+ toolTitle17 = new JLabel("");
|
|
|
+ toolTitle17.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle17.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle17.setBounds(50, 230, 100, 30);
|
|
|
+ container.add(toolTitle17);
|
|
|
+
|
|
|
+ toolNum5 = new JTextField();
|
|
|
+ toolNum5.setText("5");
|
|
|
+ toolNum5.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum5.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum5.setEnabled(false);
|
|
|
+ toolNum5.setColumns(10);
|
|
|
+ toolNum5.setBounds(154, 110, 30, 30);
|
|
|
+ container.add(toolNum5);
|
|
|
+
|
|
|
+ toolNum9 = new JTextField();
|
|
|
+ toolNum9.setText("9");
|
|
|
+ toolNum9.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum9.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum9.setEnabled(false);
|
|
|
+ toolNum9.setColumns(10);
|
|
|
+ toolNum9.setBounds(154, 150, 30, 30);
|
|
|
+ container.add(toolNum9);
|
|
|
+
|
|
|
+ toolNum13 = new JTextField();
|
|
|
+ toolNum13.setText("13");
|
|
|
+ toolNum13.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum13.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum13.setEnabled(false);
|
|
|
+ toolNum13.setColumns(10);
|
|
|
+ toolNum13.setBounds(154, 190, 30, 30);
|
|
|
+ container.add(toolNum13);
|
|
|
+
|
|
|
+ toolNum17 = new JTextField();
|
|
|
+ toolNum17.setText("17");
|
|
|
+ toolNum17.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum17.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum17.setEnabled(false);
|
|
|
+ toolNum17.setColumns(10);
|
|
|
+ toolNum17.setBounds(154, 230, 30, 30);
|
|
|
+ container.add(toolNum17);
|
|
|
+
|
|
|
+ toolLife5 = new JTextField();
|
|
|
+ toolLife5.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife5.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife5.setEnabled(false);
|
|
|
+ toolLife5.setColumns(10);
|
|
|
+ toolLife5.setBounds(186, 110, 60, 30);
|
|
|
+ container.add(toolLife5);
|
|
|
+
|
|
|
+ toolLife9 = new JTextField();
|
|
|
+ toolLife9.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife9.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife9.setEnabled(false);
|
|
|
+ toolLife9.setColumns(10);
|
|
|
+ toolLife9.setBounds(187, 150, 60, 30);
|
|
|
+ container.add(toolLife9);
|
|
|
+
|
|
|
+ toolLife13 = new JTextField();
|
|
|
+ toolLife13.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife13.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife13.setEnabled(false);
|
|
|
+ toolLife13.setColumns(10);
|
|
|
+ toolLife13.setBounds(187, 190, 60, 30);
|
|
|
+ container.add(toolLife13);
|
|
|
+
|
|
|
+ toolLife17 = new JTextField();
|
|
|
+ toolLife17.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife17.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife17.setEnabled(false);
|
|
|
+ toolLife17.setColumns(10);
|
|
|
+ toolLife17.setBounds(187, 230, 60, 30);
|
|
|
+ container.add(toolLife17);
|
|
|
+
|
|
|
+ toolTitle6 = new JLabel("");
|
|
|
+ toolTitle6.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle6.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle6.setBounds(258, 110, 100, 30);
|
|
|
+ container.add(toolTitle6);
|
|
|
+
|
|
|
+ toolTitle10 = new JLabel("");
|
|
|
+ toolTitle10.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle10.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle10.setBounds(258, 150, 100, 30);
|
|
|
+ container.add(toolTitle10);
|
|
|
+
|
|
|
+ toolTitle14 = new JLabel("");
|
|
|
+ toolTitle14.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle14.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle14.setBounds(258, 190, 100, 30);
|
|
|
+ container.add(toolTitle14);
|
|
|
+
|
|
|
+ toolTitle18 = new JLabel("");
|
|
|
+ toolTitle18.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle18.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle18.setBounds(258, 230, 100, 30);
|
|
|
+ container.add(toolTitle18);
|
|
|
+
|
|
|
+ toolNum6 = new JTextField();
|
|
|
+ toolNum6.setText("6");
|
|
|
+ toolNum6.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum6.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum6.setEnabled(false);
|
|
|
+ toolNum6.setColumns(10);
|
|
|
+ toolNum6.setBounds(359, 110, 30, 30);
|
|
|
+ container.add(toolNum6);
|
|
|
+
|
|
|
+ toolNum10 = new JTextField();
|
|
|
+ toolNum10.setText("10");
|
|
|
+ toolNum10.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum10.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum10.setEnabled(false);
|
|
|
+ toolNum10.setColumns(10);
|
|
|
+ toolNum10.setBounds(359, 150, 30, 30);
|
|
|
+ container.add(toolNum10);
|
|
|
+
|
|
|
+ toolNum14 = new JTextField();
|
|
|
+ toolNum14.setText("14");
|
|
|
+ toolNum14.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum14.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum14.setEnabled(false);
|
|
|
+ toolNum14.setColumns(10);
|
|
|
+ toolNum14.setBounds(359, 190, 30, 30);
|
|
|
+ container.add(toolNum14);
|
|
|
+
|
|
|
+ toolNum18 = new JTextField();
|
|
|
+ toolNum18.setText("18");
|
|
|
+ toolNum18.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum18.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum18.setEnabled(false);
|
|
|
+ toolNum18.setColumns(10);
|
|
|
+ toolNum18.setBounds(359, 230, 30, 30);
|
|
|
+ container.add(toolNum18);
|
|
|
+
|
|
|
+ toolLife6 = new JTextField();
|
|
|
+ toolLife6.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife6.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife6.setEnabled(false);
|
|
|
+ toolLife6.setColumns(10);
|
|
|
+ toolLife6.setBounds(393, 110, 60, 30);
|
|
|
+ container.add(toolLife6);
|
|
|
+
|
|
|
+ toolLife10 = new JTextField();
|
|
|
+ toolLife10.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife10.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife10.setEnabled(false);
|
|
|
+ toolLife10.setColumns(10);
|
|
|
+ toolLife10.setBounds(393, 150, 60, 30);
|
|
|
+ container.add(toolLife10);
|
|
|
+
|
|
|
+ toolLife14 = new JTextField();
|
|
|
+ toolLife14.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife14.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife14.setEnabled(false);
|
|
|
+ toolLife14.setColumns(10);
|
|
|
+ toolLife14.setBounds(393, 190, 60, 30);
|
|
|
+ container.add(toolLife14);
|
|
|
+
|
|
|
+ toolLife18 = new JTextField();
|
|
|
+ toolLife18.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife18.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife18.setEnabled(false);
|
|
|
+ toolLife18.setColumns(10);
|
|
|
+ toolLife18.setBounds(393, 230, 60, 30);
|
|
|
+ container.add(toolLife18);
|
|
|
+
|
|
|
+ toolTitle7 = new JLabel("");
|
|
|
+ toolTitle7.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle7.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle7.setBounds(472, 110, 100, 30);
|
|
|
+ container.add(toolTitle7);
|
|
|
+
|
|
|
+ toolTitle11 = new JLabel("");
|
|
|
+ toolTitle11.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle11.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle11.setBounds(472, 150, 100, 30);
|
|
|
+ container.add(toolTitle11);
|
|
|
+
|
|
|
+ toolTitle15 = new JLabel("");
|
|
|
+ toolTitle15.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle15.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle15.setBounds(472, 190, 100, 30);
|
|
|
+ container.add(toolTitle15);
|
|
|
+
|
|
|
+ toolTitle19 = new JLabel("");
|
|
|
+ toolTitle19.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle19.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle19.setBounds(472, 230, 100, 30);
|
|
|
+ container.add(toolTitle19);
|
|
|
+
|
|
|
+ toolNum7 = new JTextField();
|
|
|
+ toolNum7.setText("7");
|
|
|
+ toolNum7.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum7.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum7.setEnabled(false);
|
|
|
+ toolNum7.setColumns(10);
|
|
|
+ toolNum7.setBounds(572, 110, 30, 30);
|
|
|
+ container.add(toolNum7);
|
|
|
+
|
|
|
+ toolNum11 = new JTextField();
|
|
|
+ toolNum11.setText("11");
|
|
|
+ toolNum11.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum11.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum11.setEnabled(false);
|
|
|
+ toolNum11.setColumns(10);
|
|
|
+ toolNum11.setBounds(572, 150, 30, 30);
|
|
|
+ container.add(toolNum11);
|
|
|
+
|
|
|
+ toolNum15 = new JTextField();
|
|
|
+ toolNum15.setText("15");
|
|
|
+ toolNum15.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum15.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum15.setEnabled(false);
|
|
|
+ toolNum15.setColumns(10);
|
|
|
+ toolNum15.setBounds(572, 190, 30, 30);
|
|
|
+ container.add(toolNum15);
|
|
|
+
|
|
|
+ toolNum19 = new JTextField();
|
|
|
+ toolNum19.setText("19");
|
|
|
+ toolNum19.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum19.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum19.setEnabled(false);
|
|
|
+ toolNum19.setColumns(10);
|
|
|
+ toolNum19.setBounds(572, 230, 30, 30);
|
|
|
+ container.add(toolNum19);
|
|
|
+
|
|
|
+ toolLife7 = new JTextField();
|
|
|
+ toolLife7.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife7.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife7.setEnabled(false);
|
|
|
+ toolLife7.setColumns(10);
|
|
|
+ toolLife7.setBounds(606, 110, 60, 30);
|
|
|
+ container.add(toolLife7);
|
|
|
+
|
|
|
+ toolLife11 = new JTextField();
|
|
|
+ toolLife11.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife11.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife11.setEnabled(false);
|
|
|
+ toolLife11.setColumns(10);
|
|
|
+ toolLife11.setBounds(606, 150, 60, 30);
|
|
|
+ container.add(toolLife11);
|
|
|
+
|
|
|
+ toolLife15 = new JTextField();
|
|
|
+ toolLife15.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife15.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife15.setEnabled(false);
|
|
|
+ toolLife15.setColumns(10);
|
|
|
+ toolLife15.setBounds(606, 190, 60, 30);
|
|
|
+ container.add(toolLife15);
|
|
|
+
|
|
|
+ toolLife19 = new JTextField();
|
|
|
+ toolLife19.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife19.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife19.setEnabled(false);
|
|
|
+ toolLife19.setColumns(10);
|
|
|
+ toolLife19.setBounds(606, 230, 60, 30);
|
|
|
+ container.add(toolLife19);
|
|
|
+
|
|
|
+ toolTitle8 = new JLabel("");
|
|
|
+ toolTitle8.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle8.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle8.setBounds(676, 110, 100, 30);
|
|
|
+ container.add(toolTitle8);
|
|
|
+
|
|
|
+ toolTitle12 = new JLabel("");
|
|
|
+ toolTitle12.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle12.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle12.setBounds(676, 150, 100, 30);
|
|
|
+ container.add(toolTitle12);
|
|
|
+
|
|
|
+ toolTitle16 = new JLabel("");
|
|
|
+ toolTitle16.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle16.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle16.setBounds(676, 190, 100, 30);
|
|
|
+ container.add(toolTitle16);
|
|
|
+
|
|
|
+ toolTitle20 = new JLabel("");
|
|
|
+ toolTitle20.setHorizontalAlignment(SwingConstants.RIGHT);
|
|
|
+ toolTitle20.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolTitle20.setBounds(676, 230, 100, 30);
|
|
|
+ container.add(toolTitle20);
|
|
|
+
|
|
|
+ toolNum8 = new JTextField();
|
|
|
+ toolNum8.setText("8");
|
|
|
+ toolNum8.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum8.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum8.setEnabled(false);
|
|
|
+ toolNum8.setColumns(10);
|
|
|
+ toolNum8.setBounds(776, 110, 30, 30);
|
|
|
+ container.add(toolNum8);
|
|
|
+
|
|
|
+ toolNum12 = new JTextField();
|
|
|
+ toolNum12.setText("12");
|
|
|
+ toolNum12.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum12.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum12.setEnabled(false);
|
|
|
+ toolNum12.setColumns(10);
|
|
|
+ toolNum12.setBounds(776, 150, 30, 30);
|
|
|
+ container.add(toolNum12);
|
|
|
+
|
|
|
+ toolNum16 = new JTextField();
|
|
|
+ toolNum16.setText("16");
|
|
|
+ toolNum16.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum16.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum16.setEnabled(false);
|
|
|
+ toolNum16.setColumns(10);
|
|
|
+ toolNum16.setBounds(776, 190, 30, 30);
|
|
|
+ container.add(toolNum16);
|
|
|
+
|
|
|
+ toolNum20 = new JTextField();
|
|
|
+ toolNum20.setText("20");
|
|
|
+ toolNum20.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolNum20.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolNum20.setEnabled(false);
|
|
|
+ toolNum20.setColumns(10);
|
|
|
+ toolNum20.setBounds(776, 230, 30, 30);
|
|
|
+ container.add(toolNum20);
|
|
|
+
|
|
|
+ toolLife8 = new JTextField();
|
|
|
+ toolLife8.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife8.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife8.setEnabled(false);
|
|
|
+ toolLife8.setColumns(10);
|
|
|
+ toolLife8.setBounds(810, 110, 60, 30);
|
|
|
+ container.add(toolLife8);
|
|
|
+
|
|
|
+ toolLife12 = new JTextField();
|
|
|
+ toolLife12.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife12.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife12.setEnabled(false);
|
|
|
+ toolLife12.setColumns(10);
|
|
|
+ toolLife12.setBounds(810, 150, 60, 30);
|
|
|
+ container.add(toolLife12);
|
|
|
+
|
|
|
+ toolLife16 = new JTextField();
|
|
|
+ toolLife16.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife16.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife16.setEnabled(false);
|
|
|
+ toolLife16.setColumns(10);
|
|
|
+ toolLife16.setBounds(810, 190, 60, 30);
|
|
|
+ container.add(toolLife16);
|
|
|
+
|
|
|
+ toolLife20 = new JTextField();
|
|
|
+ toolLife20.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ toolLife20.setFont(new Font("微软雅黑", Font.PLAIN, 14));
|
|
|
+ toolLife20.setEnabled(false);
|
|
|
+ toolLife20.setColumns(10);
|
|
|
+ toolLife20.setBounds(810, 230, 60, 30);
|
|
|
+ container.add(toolLife20);
|
|
|
+
|
|
|
+ setToolParamsVal(toolNums,toolTitle,toolLife);
|
|
|
+
|
|
|
+ this.setModal(true);
|
|
|
+ this.setVisible(true);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setToolParamsVal(int[] toolNums,String[] toolTitle,String[] toolLife) {
|
|
|
+ for (int i = 1; i < 21; i++) {
|
|
|
+ int j = 0;
|
|
|
+ for(Integer toolNum : toolNums){
|
|
|
+ if(toolNum == i){
|
|
|
+ ToolParam toolParam = new ToolParam();
|
|
|
+ toolParam.setNums(toolNum);
|
|
|
+ toolParam.setTitle(toolTitle[j]);
|
|
|
+ toolParam.setLife(toolLife[j]);
|
|
|
+ toolParams.add(toolParam);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ j++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ for (ToolParam toolParam : toolParams) {
|
|
|
+ switch (toolParam.getNums()) {
|
|
|
+ case 1:
|
|
|
+ toolTitle1.setText(toolParam.getTitle());
|
|
|
+ toolLife1.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ toolTitle2.setText(toolParam.getTitle());
|
|
|
+ toolLife2.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ toolTitle3.setText(toolParam.getTitle());
|
|
|
+ toolLife3.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ toolTitle4.setText(toolParam.getTitle());
|
|
|
+ toolLife4.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ toolTitle5.setText(toolParam.getTitle());
|
|
|
+ toolLife5.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ toolTitle6.setText(toolParam.getTitle());
|
|
|
+ toolLife6.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ toolTitle7.setText(toolParam.getTitle());
|
|
|
+ toolLife7.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 8:
|
|
|
+ toolTitle8.setText(toolParam.getTitle());
|
|
|
+ toolLife8.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ toolTitle9.setText(toolParam.getTitle());
|
|
|
+ toolLife9.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 10:
|
|
|
+ toolTitle10.setText(toolParam.getTitle());
|
|
|
+ toolLife10.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 11:
|
|
|
+ toolTitle11.setText(toolParam.getTitle());
|
|
|
+ toolLife11.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 12:
|
|
|
+ toolTitle12.setText(toolParam.getTitle());
|
|
|
+ toolLife12.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 13:
|
|
|
+ toolTitle13.setText(toolParam.getTitle());
|
|
|
+ toolLife13.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 14:
|
|
|
+ toolTitle14.setText(toolParam.getTitle());
|
|
|
+ toolLife14.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 15:
|
|
|
+ toolTitle15.setText(toolParam.getTitle());
|
|
|
+ toolLife15.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 16:
|
|
|
+ toolTitle16.setText(toolParam.getTitle());
|
|
|
+ toolLife16.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 17:
|
|
|
+ toolTitle17.setText(toolParam.getTitle());
|
|
|
+ toolLife17.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 18:
|
|
|
+ toolTitle18.setText(toolParam.getTitle());
|
|
|
+ toolLife18.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 19:
|
|
|
+ toolTitle19.setText(toolParam.getTitle());
|
|
|
+ toolLife19.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ case 20:
|
|
|
+ toolTitle20.setText(toolParam.getTitle());
|
|
|
+ toolLife20.setText(toolParam.getLife());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.repaint();
|
|
|
+ }
|
|
|
+}
|