]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.charts/src/org/simantics/charts/editor/SendCommandAction.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.charts / src / org / simantics / charts / editor / SendCommandAction.java
1 package org.simantics.charts.editor;
2
3 import org.eclipse.jface.action.Action;
4 import org.eclipse.jface.resource.ImageDescriptor;
5 import org.simantics.g2d.canvas.ICanvasContext;
6 import org.simantics.g2d.utils.CanvasUtils;
7 import org.simantics.scenegraph.g2d.events.command.Command;
8
9 /**
10  * @author Tuukka Lehtonen
11  */
12 public class SendCommandAction extends Action {
13
14     private final ICanvasContext ctx;
15     private final Command command;
16
17     public SendCommandAction(String name, ImageDescriptor image, ICanvasContext ctx, Command command) {
18         super(name, image);
19         this.ctx = ctx;
20         this.command = command;
21     }
22
23     @Override
24     public void run() {
25         CanvasUtils.sendCommand(ctx, command);
26     }
27
28 }