001package jmri.util.usb;
002
003import jmri.util.startup.AbstractStartupActionFactory;
004import jmri.util.startup.StartupActionFactory;
005import java.util.Locale;
006import org.openide.util.lookup.ServiceProvider;
007
008/**
009 * {@link jmri.util.startup.StartupActionFactory} for the
010 * {@link jmri.util.usb.UsbBrowserAction}.
011 *
012 * @author Randall Wood Copyright (C) 2017
013 */
014@ServiceProvider(service = StartupActionFactory.class)
015public final class UsbBrowserStartupActionFactory extends AbstractStartupActionFactory {
016
017    @Override
018    public String getTitle(Class<?> clazz, Locale locale) throws IllegalArgumentException {
019        if (clazz.equals(UsbBrowserAction.class)) {
020            return Bundle.getMessage(locale, "StartUsbBrowserAction"); // NOI18N
021        }
022        throw new IllegalArgumentException(clazz.getName() + " is not supported by " + this.getClass().getName());
023    }
024
025    @Override
026    public Class<?>[] getActionClasses() {
027        return new Class[]{UsbBrowserAction.class};
028    }
029
030    @Override
031    public String[] getOverriddenClasses(Class<?> clazz) throws IllegalArgumentException {
032        return new String[]{"jmri.jmrix.libusb.UsbViewAction"};
033    }
034}