All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.simulationconstructionset.gui.actions.configActions.SelectGraphConfigurationAction Maven / Gradle / Ivy

There is a newer version: 0.25.2
Show newest version
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);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy