Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-11-30 15:00:12 +0000
committeratikhomirov2006-11-30 15:00:12 +0000
commit981c9ed99ae3c22e1cbe711e66c6bcce41c26c61 (patch)
treee92fc6e3f3e9349e146af33b6d81892c57ceac24 /plugins/org.eclipse.gmf.graphdef.codegen
parent0ad0d41a1a6cf03fcb165c502d41ad18017a190b (diff)
downloadorg.eclipse.gmf-tooling-981c9ed99ae3c22e1cbe711e66c6bcce41c26c61.tar.gz
org.eclipse.gmf-tooling-981c9ed99ae3c22e1cbe711e66c6bcce41c26c61.tar.xz
org.eclipse.gmf-tooling-981c9ed99ae3c22e1cbe711e66c6bcce41c26c61.zip
[165782] mgolubev - set GridLayout properties
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/Layout.xpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/Layout.xpt b/plugins/org.eclipse.gmf.graphdef.codegen/templates/Layout.xpt
index c9f99b0f6..f57cbd208 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/Layout.xpt
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/Layout.xpt
@@ -8,6 +8,7 @@
*
* Contributors:
* Artem Tikhomirov (Borland) - initial API and implementation
+ * Michael Golubev (Borland) - GridLayout attributes
*/
«IMPORT "http://www.eclipse.org/gmf/2005/GraphicalDefinition"»
@@ -29,6 +30,23 @@
«ENDLET»
«ENDDEFINE»
+«DEFINE Init(EString owningFigureVariable) FOR gmfgraph::GridLayout»
+«LET "layout" + owningFigureVariable.toFirstUpper() AS layoutVarName»
+ «qualifiedClassNameGEF()» «layoutVarName» = new «qualifiedClassNameGEF()»();
+ «layoutVarName».numColumns = «numColumns»;
+ «layoutVarName».makeColumnsEqualWidth = «equalWidth»;
+«IF null != spacing-»
+ «layoutVarName».horizontalSpacing = «spacing.dx»;
+ «layoutVarName».verticalSpacing = «spacing.dy»;
+«ENDIF-»
+«IF null != margins-»
+ «layoutVarName».marginWidth = «margins.dx»;
+ «layoutVarName».marginHeight = «margins.dy»;
+«ENDIF-»
+ «owningFigureVariable».setLayoutManager(«layoutVarName»);
+«ENDLET»
+«ENDDEFINE»
+
«DEFINE Init(EString owningFigureVariable) FOR gmfgraph::FlowLayout»
«LET "layout" + owningFigureVariable.toFirstUpper() AS layoutVarName»
«qualifiedClassNameGEF()» «layoutVarName» = new «qualifiedClassNameGEF()»();

Back to the top