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({
"UnpinAccountsAction.pluralText=Remove Selected Accounts",
31 "UnpinAccountsAction.singularText=Remove Selected Account"})
32 final class UnpinAccountsAction extends AbstractCVTAction {
34 static final private ImageIcon ICON = ImageUtilities.loadImageIcon(
35 "org/sleuthkit/autopsy/communications/images/marker--minus.png",
false);
36 private static final String SINGULAR_TEXT = Bundle.UnpinAccountsAction_singularText();
37 private static final String PLURAL_TEXT = Bundle.UnpinAccountsAction_pluralText();
39 private static final UnpinAccountsAction instance =
new UnpinAccountsAction();
41 static UnpinAccountsAction getInstance() {
46 public void actionPerformed(
final ActionEvent event) {
47 CVTEvents.getCVTEventBus().post(
new CVTEvents.UnpinAccountsEvent(getSelectedAccounts()));
51 String getActionDisplayName() {
52 return getSelectedAccounts().size() > 1 ? PLURAL_TEXT : SINGULAR_TEXT;