]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/command/Commands.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / events / command / Commands.java
diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/command/Commands.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/events/command/Commands.java
new file mode 100644 (file)
index 0000000..4ab0b9c
--- /dev/null
@@ -0,0 +1,115 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.scenegraph.g2d.events.command;\r
+\r
+import java.awt.geom.Point2D;\r
+\r
+/**\r
+ * Static commands are listed in this class\r
+ * \r
+ * @see Command\r
+ * @see CommandKeyBinding Command to key binding and default bindings\r
+ * @see KeyToCommand Participant that transforms key presses to commands\r
+ * \r
+ * @author Toni Kalajainen\r
+ */\r
+public class Commands {\r
+\r
+    public static final Command ENABLE_PAINTING = new Command("enablePainting");\r
+\r
+    public static final Command FULL_SCREEN = new Command("fullScreen");\r
+\r
+    public static final Command PAN_LEFT = new Command("panLeft");\r
+    public static final Command PAN_RIGHT = new Command("panRight");\r
+    public static final Command PAN_UP = new Command("panUp");\r
+    public static final Command PAN_DOWN = new Command("panDown");\r
+    public static final Command ZOOM_IN = new Command("zoomIn");\r
+    public static final Command ZOOM_OUT = new Command("zoomOut");\r
+    public static final Command ZOOM_TO_FIT = new Command("zoomToFit");\r
+    public static final Command ZOOM_TO_FIT_HORIZ = new Command("org.simantics.chart.zoomToFitHoriz");\r
+    public static final Command ZOOM_TO_FIT_VERT = new Command("org.simantics.chart.zoomToFitVert");\r
+    public static final Command ZOOM_TO_SELECTION = new Command("zoomToSelection");\r
+    public static final Command AUTOSCALE = new Command("org.simantics.chart.autoscale");\r
+    public static final Command ZOOM_TO_AREA = new Command("zoomToArea");\r
+    public static final Command ZOOM_TO_PAGE = new Command("zoomToPage");\r
+\r
+    public static final Command UNDO = new Command("org.eclipse.ui.edit.undo");\r
+    public static final Command REDO = new Command("org.eclipse.ui.edit.redo");\r
+\r
+    public static final Command CLOSE = new Command("org.eclipse.ui.file.close");\r
+    public static final Command IMPORT = new Command("org.eclipse.ui.file.import");\r
+    public static final Command EXPORT = new Command("org.eclipse.ui.file.export");\r
+    public static final Command PRINT = new Command("org.eclipse.ui.file.print");\r
+    public static final Command PDFPRINT = new Command("org.simantics.ui.file.pdfprint");\r
+    public static final Command REFRESH = new Command("org.eclipse.ui.file.refresh");\r
+\r
+    public static final Command BACK = new Command("org.eclipse.ui.navigate.back");\r
+    public static final Command FORWARD = new Command("org.eclipse.ui.navigate.forward");\r
+    public static final Command UP = new Command("org.eclipse.ui.navigate.up");\r
+\r
+    public static final Command RENAME = new Command("org.eclipse.ui.edit.rename");\r
+\r
+    public static final Command DELETE = new Command("org.eclipse.ui.edit.delete");\r
+    public static final Command CUT = new Command("org.eclipse.ui.edit.cut");\r
+    public static final Command COPY = new Command("org.eclipse.ui.edit.copy");\r
+    public static final Command PASTE = new Command("org.eclipse.ui.edit.paste");\r
+    public static final Command ROTATE_ELEMENT_CW = new Command("rotateElementCW");\r
+    public static final Command ROTATE_ELEMENT_CCW = new Command("rotateElementCCW");\r
+    public static final Command FLIP_ELEMENT_HORIZONTAL = new Command("flipElementHorizontal");\r
+    public static final Command FLIP_ELEMENT_VERTICAL = new Command("flipElementVertical");\r
+    public static final Command SCALE_ELEMENT = new Command("scaleElement");\r
+\r
+    public static final Command ROTATE_CANVAS_CW = new Command("rotateCW");\r
+    public static final Command ROTATE_CANVAS_CCW = new Command("rotateCCW");\r
+\r
+    public static final Command CANCEL = new Command("cancel");\r
+    public static final Command SELECT_ALL = new Command("org.eclipse.ui.edit.selectAll");\r
+    public static final Command INVERT_SELECTION = new Command("invertSelection");\r
+    public static final Command EXPAND_SELECTION = new Command("expandSelection");\r
+\r
+    public static final Command BRING_TO_TOP = new Command("bringToTop");\r
+    public static final Command SEND_TO_BOTTOM = new Command("sendToBottom");\r
+    public static final Command BRING_UP = new Command("bringUp");\r
+    public static final Command SEND_DOWN = new Command("sendDown");\r
+\r
+    public static final Command GRID_TOGGLE = new Command("gridToggle");\r
+    public static final Command GRID_ENABLE = new Command("gridEnable");\r
+    public static final Command GRID_DISABLE = new Command("gridDisable");\r
+\r
+    public static final Command SNAP_TOGGLE = new Command("snapToggle");\r
+    public static final Command SNAP_ENABLE = new Command("snapEnable");\r
+    public static final Command SNAP_DISABLE = new Command("snapDisable");\r
+\r
+    public static final Command RULER_TOGGLE = new Command("rulerToggle");\r
+    public static final Command RULER_ENABLE = new Command("rulerEnable");\r
+    public static final Command RULER_DISABLE = new Command("rulerDisable");\r
+    \r
+    public static final Command MAP_TOGGLE = new Command("mapToggle");\r
+    public static final Command MAP_ENABLE = new Command("mapEnable");\r
+    public static final Command MAP_DISABLE = new Command("mapDisable");\r
+\r
+    public static final Command ROTATE_CANVAS_CW_GRAB = new Command("grabRotateCW");\r
+    public static final Command ROTATE_CANVAS_CCW_GRAB = new Command("grabRotateCCW");\r
+\r
+    public static final Command ROTATE_CANVAS_CW_RELEASE = new Command("releaseRotateCW");\r
+    public static final Command ROTATE_CANVAS_CCW_RELEASE = new Command("releaseRotateCCW");\r
+\r
+    public static final Command SPLIT_CONNECTION = new Command("splitConnection");\r
+\r
+    public static final Command FOCUS_TOOLTIP = new Command("focusTooltip");\r
+\r
+    \r
+    public static Command showPopup(Point2D atControlPosition) {\r
+        return new ShowPopup(atControlPosition);\r
+    }\r
+\r
+}\r