JScrollPane scrollPaneInspection = new JScrollPane();
scrollPaneInspection.setBounds(16, 24, 655, 132);
panelInspection.add(scrollPaneInspection);
listInspection = new JList4j();
listInspection.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
if (arg0.getClickCount() == 2)
{
editInspectionRecord();
}
}
});
listInspection.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent arg0) {
String selectedItem = "";
if (listInspection.getSelectedIndex() >=0)
{
selectedItem = ((JDBQMInspection) listInspection.getSelectedValue()).getInspectionID();
}
populateActivityList(selectedItem,"");
}
});
//listInspection.setLocation(0, 58);
scrollPaneInspection.setViewportView(listInspection);
JButton4j btnAdd1 = new JButton4j(lang.get("btn_Add"));
btnAdd1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
addInspectionRecord();
}
});
btnAdd1.setIcon(Common.icon_add);
btnAdd1.setBounds(683, 24, 117, 28);
btnAdd1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
panelInspection.add(btnAdd1);
JButton4j btnDelete1 = new JButton4j(lang.get("btn_Delete"));
btnDelete1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
deleteInspectionRecord();
}
});
btnDelete1.setBounds(683, 80, 117, 28);
btnDelete1.setIcon(Common.icon_delete);
btnDelete1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
panelInspection.add(btnDelete1);
JButton4j btnEdit1 = new JButton4j(lang.get("btn_Edit"));
btnEdit1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
editInspectionRecord();
}
});
btnEdit1.setIcon(Common.icon_edit);
btnEdit1.setBounds(683, 52, 117, 28);
btnEdit1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
panelInspection.add(btnEdit1);
JPanel panelActivity = new JPanel();
panelActivity.setBackground(Color.WHITE);
panelActivity.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), lang.get("lbl_Activity"), TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
panelActivity.setBounds(6, 245, 810, 184);
panelActivity.setFont(Common.font_title);
desktopPane.add(panelActivity);
panelActivity.setLayout(null);
JScrollPane scrollPaneActivity = new JScrollPane();
scrollPaneActivity.setBounds(16, 24, 655, 143);
panelActivity.add(scrollPaneActivity);
listActivity = new JList4j();
listActivity.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2)
{
editActivityRecord();
}
}
});
listActivity.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent e) {
String selectedItemInsp = "";
String selectedItemAct = "";
if (listActivity.getSelectedIndex() >=0)
{
selectedItemInsp = ((JDBQMActivity) listActivity.getSelectedValue()).getInspectionID();
selectedItemAct = ((JDBQMActivity) listActivity.getSelectedValue()).getActivityID();
}
populateTestList(selectedItemInsp,selectedItemAct,"");
}
});
scrollPaneActivity.setViewportView(listActivity);
JButton4j btnDelete2 = new JButton4j(lang.get("btn_Delete"));
btnDelete2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
deleteActivityRecord();
}
});
btnDelete2.setBounds(683, 80, 117, 28);
btnDelete2.setIcon(Common.icon_delete);
btnDelete2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
panelActivity.add(btnDelete2);
JButton4j btnEdit2 = new JButton4j(lang.get("btn_Edit"));
btnEdit2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
editActivityRecord();
}
});
btnEdit2.setIcon(Common.icon_edit);
btnEdit2.setBounds(683, 52, 117, 28);
btnEdit2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
panelActivity.add(btnEdit2);
JButton4j btnAdd2 = new JButton4j(lang.get("btn_Add"));
btnAdd2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
addActivityRecord();
}
});
btnAdd2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
btnAdd2.setBounds(683, 24, 117, 28);
btnAdd2.setIcon(Common.icon_add);
panelActivity.add(btnAdd2);
JPanel panelTests = new JPanel();
panelTests.setBackground(Color.WHITE);
panelTests.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), lang.get("lbl_Test"), TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
panelTests.setBounds(6, 426, 810, 238);
panelTests.setFont(Common.font_title);
desktopPane.add(panelTests);
panelTests.setLayout(null);
JScrollPane scrollPaneTests = new JScrollPane();
scrollPaneTests.setBounds(16, 23, 659, 197);
panelTests.add(scrollPaneTests);
listTest = new JList4j();
listTest.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2)
{