001package apps.gui3.tabbedpreferences;
002
003import java.util.Locale;
004import jmri.util.startup.AbstractStartupActionFactory;
005import jmri.util.startup.StartupActionFactory;
006import org.openide.util.lookup.ServiceProvider;
007
008/**
009 * Preferences startup action factory.
010 * 
011 * @author Randall Wood Copyright 2020
012 */
013@ServiceProvider(service = StartupActionFactory.class)
014public final class TabbedPreferencesActionFactory extends AbstractStartupActionFactory {
015
016    @Override
017    public String getTitle(Class<?> clazz, Locale locale) throws IllegalArgumentException {
018        if (clazz.equals(TabbedPreferencesAction.class)) {
019            return Bundle.getMessage(locale, "MenuItemPreferences");
020        } else if (clazz.equals(TabbedPreferencesProfileAction.class)) {
021            return Bundle.getMessage(locale, "MenuItemPreferencesProfile");
022        }
023        throw new IllegalArgumentException(clazz.getName() + " is not supported by " + this.getClass().getName());
024    }
025
026    @Override
027    public Class<?>[] getActionClasses() {
028        return new Class[]{TabbedPreferencesAction.class, TabbedPreferencesProfileAction.class};
029    }
030
031}