]> gerrit.simantics Code Review - simantics/platform.git/blob - 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
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.scenegraph.g2d.events.command;\r
13 \r
14 import java.awt.geom.Point2D;\r
15 \r
16 /**\r
17  * Static commands are listed in this class\r
18  * \r
19  * @see Command\r
20  * @see CommandKeyBinding Command to key binding and default bindings\r
21  * @see KeyToCommand Participant that transforms key presses to commands\r
22  * \r
23  * @author Toni Kalajainen\r
24  */\r
25 public class Commands {\r
26 \r
27     public static final Command ENABLE_PAINTING = new Command("enablePainting");\r
28 \r
29     public static final Command FULL_SCREEN = new Command("fullScreen");\r
30 \r
31     public static final Command PAN_LEFT = new Command("panLeft");\r
32     public static final Command PAN_RIGHT = new Command("panRight");\r
33     public static final Command PAN_UP = new Command("panUp");\r
34     public static final Command PAN_DOWN = new Command("panDown");\r
35     public static final Command ZOOM_IN = new Command("zoomIn");\r
36     public static final Command ZOOM_OUT = new Command("zoomOut");\r
37     public static final Command ZOOM_TO_FIT = new Command("zoomToFit");\r
38     public static final Command ZOOM_TO_FIT_HORIZ = new Command("org.simantics.chart.zoomToFitHoriz");\r
39     public static final Command ZOOM_TO_FIT_VERT = new Command("org.simantics.chart.zoomToFitVert");\r
40     public static final Command ZOOM_TO_SELECTION = new Command("zoomToSelection");\r
41     public static final Command AUTOSCALE = new Command("org.simantics.chart.autoscale");\r
42     public static final Command ZOOM_TO_AREA = new Command("zoomToArea");\r
43     public static final Command ZOOM_TO_PAGE = new Command("zoomToPage");\r
44 \r
45     public static final Command UNDO = new Command("org.eclipse.ui.edit.undo");\r
46     public static final Command REDO = new Command("org.eclipse.ui.edit.redo");\r
47 \r
48     public static final Command CLOSE = new Command("org.eclipse.ui.file.close");\r
49     public static final Command IMPORT = new Command("org.eclipse.ui.file.import");\r
50     public static final Command EXPORT = new Command("org.eclipse.ui.file.export");\r
51     public static final Command PRINT = new Command("org.eclipse.ui.file.print");\r
52     public static final Command PDFPRINT = new Command("org.simantics.ui.file.pdfprint");\r
53     public static final Command REFRESH = new Command("org.eclipse.ui.file.refresh");\r
54 \r
55     public static final Command BACK = new Command("org.eclipse.ui.navigate.back");\r
56     public static final Command FORWARD = new Command("org.eclipse.ui.navigate.forward");\r
57     public static final Command UP = new Command("org.eclipse.ui.navigate.up");\r
58 \r
59     public static final Command RENAME = new Command("org.eclipse.ui.edit.rename");\r
60 \r
61     public static final Command DELETE = new Command("org.eclipse.ui.edit.delete");\r
62     public static final Command CUT = new Command("org.eclipse.ui.edit.cut");\r
63     public static final Command COPY = new Command("org.eclipse.ui.edit.copy");\r
64     public static final Command PASTE = new Command("org.eclipse.ui.edit.paste");\r
65     public static final Command ROTATE_ELEMENT_CW = new Command("rotateElementCW");\r
66     public static final Command ROTATE_ELEMENT_CCW = new Command("rotateElementCCW");\r
67     public static final Command FLIP_ELEMENT_HORIZONTAL = new Command("flipElementHorizontal");\r
68     public static final Command FLIP_ELEMENT_VERTICAL = new Command("flipElementVertical");\r
69     public static final Command SCALE_ELEMENT = new Command("scaleElement");\r
70 \r
71     public static final Command ROTATE_CANVAS_CW = new Command("rotateCW");\r
72     public static final Command ROTATE_CANVAS_CCW = new Command("rotateCCW");\r
73 \r
74     public static final Command CANCEL = new Command("cancel");\r
75     public static final Command SELECT_ALL = new Command("org.eclipse.ui.edit.selectAll");\r
76     public static final Command INVERT_SELECTION = new Command("invertSelection");\r
77     public static final Command EXPAND_SELECTION = new Command("expandSelection");\r
78 \r
79     public static final Command BRING_TO_TOP = new Command("bringToTop");\r
80     public static final Command SEND_TO_BOTTOM = new Command("sendToBottom");\r
81     public static final Command BRING_UP = new Command("bringUp");\r
82     public static final Command SEND_DOWN = new Command("sendDown");\r
83 \r
84     public static final Command GRID_TOGGLE = new Command("gridToggle");\r
85     public static final Command GRID_ENABLE = new Command("gridEnable");\r
86     public static final Command GRID_DISABLE = new Command("gridDisable");\r
87 \r
88     public static final Command SNAP_TOGGLE = new Command("snapToggle");\r
89     public static final Command SNAP_ENABLE = new Command("snapEnable");\r
90     public static final Command SNAP_DISABLE = new Command("snapDisable");\r
91 \r
92     public static final Command RULER_TOGGLE = new Command("rulerToggle");\r
93     public static final Command RULER_ENABLE = new Command("rulerEnable");\r
94     public static final Command RULER_DISABLE = new Command("rulerDisable");\r
95     \r
96     public static final Command MAP_TOGGLE = new Command("mapToggle");\r
97     public static final Command MAP_ENABLE = new Command("mapEnable");\r
98     public static final Command MAP_DISABLE = new Command("mapDisable");\r
99 \r
100     public static final Command ROTATE_CANVAS_CW_GRAB = new Command("grabRotateCW");\r
101     public static final Command ROTATE_CANVAS_CCW_GRAB = new Command("grabRotateCCW");\r
102 \r
103     public static final Command ROTATE_CANVAS_CW_RELEASE = new Command("releaseRotateCW");\r
104     public static final Command ROTATE_CANVAS_CCW_RELEASE = new Command("releaseRotateCCW");\r
105 \r
106     public static final Command SPLIT_CONNECTION = new Command("splitConnection");\r
107 \r
108     public static final Command FOCUS_TOOLTIP = new Command("focusTooltip");\r
109 \r
110     \r
111     public static Command showPopup(Point2D atControlPosition) {\r
112         return new ShowPopup(atControlPosition);\r
113     }\r
114 \r
115 }\r