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