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

us.ihmc.simulationconstructionset.gui.actions.SimulateAction Maven / Gradle / Ivy

There is a newer version: 0.25.2
Show newest version
package us.ihmc.simulationconstructionset.gui.actions;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;

import us.ihmc.simulationconstructionset.commands.SimulateCommandExecutor;
import us.ihmc.simulationconstructionset.gui.actions.dialogActions.AbstractActionTools;

public class SimulateAction extends AbstractAction
{
   private static final long serialVersionUID = 2609814986889034283L;

   private final SimulateCommandExecutor executor;

   public SimulateAction(SimulateCommandExecutor listener)
   {
      super("Simulate");
      executor = listener;

      String iconFilename = "icons/Simulate.png";
      int shortKey = KeyEvent.VK_S;
      String longDescription = "Start simulating.";
      String shortDescription = "Simulate";

      AbstractActionTools.setupIconButton(this, iconFilename, shortKey, longDescription, shortDescription);
   }

   @Override
   public void actionPerformed(ActionEvent actionEvent)
   {
      executor.simulate();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy