us.ihmc.simulationconstructionset.gui.actions.configActions.SelectGraphConfigurationAction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simulation-construction-set
Show all versions of simulation-construction-set
Simulation Construction Set
package us.ihmc.simulationconstructionset.gui.actions.configActions;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import us.ihmc.simulationconstructionset.commands.SelectGraphConfigurationCommandExecutor;
public class SelectGraphConfigurationAction extends AbstractAction
{
private static final long serialVersionUID = -8579530834957317679L;
private String name;
private SelectGraphConfigurationCommandExecutor executor;
public SelectGraphConfigurationAction(SelectGraphConfigurationCommandExecutor executor, String name)
{
super(name);
this.executor = executor;
this.name = name;
putValue(Action.LONG_DESCRIPTION, "Select Graph Configuration: " + name);
putValue(Action.SHORT_DESCRIPTION, "Select " + name);
}
@Override
public void actionPerformed(ActionEvent actionEvent)
{
executor.selectGraphConfiguration(name);
}
}