19 package org.sleuthkit.autopsy.communications;
21 import java.awt.event.ActionEvent;
22 import javax.swing.ImageIcon;
23 import org.openide.util.ImageUtilities;
24 import org.openide.util.NbBundle;
30 @NbBundle.Messages(value = {
"ResetAndPinAccountsAction.singularText=Visualize Only Selected Account",
31 "ResetAndPinAccountsAction.pluralText=Visualize Only Selected Accounts"})
32 final class ResetAndPinAccountsAction extends AbstractCVTAction {
34 private static final ImageIcon ICON = ImageUtilities.loadImageIcon(
35 "org/sleuthkit/autopsy/communications/images/marker--pin.png",
false);
36 private static final String SINGULAR_TEXT = Bundle.ResetAndPinAccountsAction_singularText();
37 private static final String PLURAL_TEXT = Bundle.ResetAndPinAccountsAction_pluralText();
39 private static final ResetAndPinAccountsAction instance =
new ResetAndPinAccountsAction();
41 static ResetAndPinAccountsAction getInstance() {
46 public void actionPerformed(ActionEvent event) {
47 CVTEvents.getCVTEventBus().post(
new CVTEvents.PinAccountsEvent(getSelectedAccounts(),
true));
51 protected String getActionDisplayName() {
52 return getSelectedAccounts().size() > 1 ? PLURAL_TEXT : SINGULAR_TEXT;