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

us.ihmc.simulationconstructionset.gui.actions.ZoomOutAction 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.ZoomGraphCommandExecutor;
import us.ihmc.simulationconstructionset.gui.actions.dialogActions.AbstractActionTools;

public class ZoomOutAction extends AbstractAction
{
   private static final long serialVersionUID = 5487975503056238066L;

   private ZoomGraphCommandExecutor executor;

   public ZoomOutAction(ZoomGraphCommandExecutor executor)
   {
      super("Zoom Out");
      this.executor = executor;

      String iconFilename = "icons/ZoomOut.png";
      int shortKey = KeyEvent.VK_O;
      String longDescription = "Zoom Out";
      String shortDescription = "Zoom Out";

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

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

   public void closeAndDispose()
   {
      executor = null;
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy