JPanel fp = new JPanel(new BorderLayout(Utils.MARGIN, Utils.MARGIN));
fp.add(oidsPanel, BorderLayout.NORTH);
JPanel fieldsPanel = new JPanel(new BorderLayout());
fieldsPanel.add(new HeaderPanel(Translation.get("gb.properties"), "vcard_16x16.png"), BorderLayout.NORTH);
fieldsPanel.add(fp, BorderLayout.CENTER);
saveUserButton = new JButton(Translation.get("gb.save"));
saveUserButton.setEnabled(false);
saveUserButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setEditable(false);
String username = ucm.user.username;
oidsPanel.updateUser(ucm);
saveUser(username, ucm);
}
});
editUserButton = new JButton(Translation.get("gb.edit"));
editUserButton.setEnabled(false);
editUserButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
setEditable(true);
}
});
JPanel userControls = new JPanel(new FlowLayout(FlowLayout.LEFT));
userControls.add(editUserButton);
userControls.add(saveUserButton);
fieldsPanel.add(userControls, BorderLayout.SOUTH);
JPanel certificatesPanel = new JPanel(new BorderLayout());
certificatesPanel.add(new HeaderPanel(Translation.get("gb.certificates"), "rosette_16x16.png"), BorderLayout.NORTH);
tableModel = new CertificatesTableModel();
table = Utils.newTable(tableModel, Utils.DATE_FORMAT);
table.setRowSorter(new TableRowSorter<CertificatesTableModel>(tableModel));
table.setDefaultRenderer(CertificateStatus.class, new CertificateStatusRenderer());
table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {