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