Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates/rt_mm/MapMode.xpt')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/rt_mm/MapMode.xpt58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/rt_mm/MapMode.xpt b/plugins/org.eclipse.gmf.graphdef.codegen/templates/rt_mm/MapMode.xpt
new file mode 100644
index 000000000..feb2c53d3
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/rt_mm/MapMode.xpt
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2006 Borland Software Corporation
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ */
+
+«IMPORT "http://www.eclipse.org/gmf/2005/GraphicalDefinition"»
+«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
+«EXTENSION rt_mm::MapModeUtil»
+
+«REM»Using MapMode«ENDREM»
+
+«DEFINE map FOR gmfgraph::Dimension-»
+«EXPAND deviceToLogic FOR dx», «EXPAND deviceToLogic FOR dy-»
+«ENDDEFINE»
+
+«DEFINE map FOR gmfgraph::Point-»
+«EXPAND deviceToLogic FOR x», «EXPAND deviceToLogic FOR y-»
+«ENDDEFINE»
+
+«DEFINE map FOR int-»
+«EXPAND deviceToLogic-»
+«ENDDEFINE»
+
+«DEFINE map FOR gmfgraph::Insets-»
+«EXPAND deviceToLogic FOR top», «EXPAND deviceToLogic FOR left», «EXPAND deviceToLogic FOR bottom», «EXPAND deviceToLogic FOR right-»
+«ENDDEFINE»
+
+«DEFINE deviceToLogic FOR int-»
+«mapModeAccessor()»getMapMode().DPtoLP(«this»)
+«ENDDEFINE»
+
+«DEFINE Activator FOR Object-»
+ private org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode myMapMode = org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeTypes.IDENTITY_MM;
+
+ /**
+ * @generated
+ */
+ public void setMapMode(org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode mapMode) {
+ myMapMode = mapMode;
+ if (myMapMode == null){
+ myMapMode = org.eclipse.gmf.runtime.draw2d.ui.mapmode.MapModeTypes.IDENTITY_MM;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public org.eclipse.gmf.runtime.draw2d.ui.mapmode.IMapMode getMapMode() {
+ return myMapMode;
+ }
+«ENDDEFINE» \ No newline at end of file

Back to the top