Go to the documentation of this file.
19package org.sleuthkit.autopsy.datamodel.persons;
22import java.awt.event.ActionEvent;
23import java.util.logging.Level;
24import javax.swing.AbstractAction;
25import javax.swing.JOptionPane;
26import org.openide.util.NbBundle.Messages;
27import org.openide.windows.WindowManager;
28import org.sleuthkit.autopsy.casemodule.Case;
29import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
30import org.sleuthkit.datamodel.TskCoreException;
31import org.sleuthkit.autopsy.coreutils.Logger;
32import org.sleuthkit.datamodel.Person;
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());
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();
SleuthkitCase getSleuthkitCase()
static Case getCurrentCaseThrows()
synchronized static Logger getLogger(String name)
EditPersonAction(Person person)
void actionPerformed(ActionEvent e)
static final Logger logger
String getEditedPersonName(Person person)
Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.