001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.actions;
003
004import java.awt.event.ActionEvent;
005import java.util.List;
006import java.util.Map;
007
008/**
009 * Interface for (toolbar-)actions that have additional parameters which need
010 * to be saved to the preferences (and loaded back).
011 */
012public interface ParameterizedAction extends AdaptableAction {
013
014    /**
015     * Get the list of parameters that describe the action.
016     * @return the list of parameters that describe the action
017     */
018    List<ActionParameter<?>> getActionParameters();
019
020    /**
021     * Invoke action using the given parameters.
022     * @param e the ActionEvent
023     * @param parameters parameter map
024     */
025    void actionPerformed(ActionEvent e, Map<String, Object> parameters);
026}