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