001package jmri.util.startup;
002
003import java.awt.event.ActionEvent;
004
005import javax.swing.Action;
006
007import jmri.JmriException;
008
009/**
010 * Invokes a Swing Action when the program is started.
011 * <p>
012 * The list of actions available is defined in the {@link AbstractActionModel}
013 * superclass.
014 * <p>
015 * This is a separate class, even though it has no additional behavior, so that
016 * persistence systems realize the type of data being stored.
017 * <p>
018 * This class remains in the {@code apps} package for historical reasons related
019 * to preferences storage.
020 *
021 * @author Bob Jacobsen Copyright 2003
022 * @see jmri.util.startup.PerformActionModelFactory
023 */
024public class PerformActionModel extends AbstractActionModel {
025
026    public PerformActionModel() {
027        super();
028    }
029
030    @Override
031    protected void performAction(Action action) throws JmriException {
032        action.actionPerformed(new ActionEvent("prefs", ActionEvent.ACTION_PERFORMED, ""));
033    }
034}