19 package org.sleuthkit.autopsy.datamodel.persons;
21 import java.awt.Frame;
22 import java.awt.event.ActionEvent;
23 import java.util.logging.Level;
24 import javax.swing.AbstractAction;
25 import javax.swing.JOptionPane;
26 import org.openide.util.NbBundle.Messages;
27 import org.openide.windows.WindowManager;
38 "EditPersonAction_menuTitle=Edit Person...",
39 "EditPersonAction_onError_title=Error Editing Person",
41 "EditPersonAction_onError_description=There was an error editing person: {0}.",})
54 super(Bundle.EditPersonAction_menuTitle());
62 String newPersonName = getEditedPersonName(person);
63 if (newPersonName != null) {
64 person.setName(newPersonName);
68 String personName = this.person == null || this.person.getName() == null ?
"" : this.person.getName();
69 logger.log(Level.WARNING, String.format(
"Unable to update person: %s", personName), ex);
71 JOptionPane.showMessageDialog(
72 WindowManager.getDefault().getMainWindow(),
73 Bundle.EditPersonAction_onError_description(personName),
74 Bundle.EditPersonAction_onError_title(),
75 JOptionPane.WARNING_MESSAGE);
87 Frame parent = WindowManager.getDefault().getMainWindow();
95 addEditDialog.setResizable(
false);
96 addEditDialog.setLocationRelativeTo(parent);
97 addEditDialog.setVisible(
true);
98 addEditDialog.toFront();
101 String newHostName = addEditDialog.
getValue();
String getEditedPersonName(Person person)
void actionPerformed(ActionEvent e)
SleuthkitCase getSleuthkitCase()
synchronized static Logger getLogger(String name)
EditPersonAction(Person person)
static Case getCurrentCaseThrows()