Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2006-01-25 19:16:55 +0000
committeratikhomirov2006-01-25 19:16:55 +0000
commit879ee913f970f175f507e59d38962b905277e7bd (patch)
treef00da37c1de56f8048308225f45054bd229632a7 /plugins/org.eclipse.gmf.graphdef.codegen/templates
parent632d0a48867e992c79f0bbe62c486e87ff28b87b (diff)
downloadorg.eclipse.gmf-tooling-879ee913f970f175f507e59d38962b905277e7bd.tar.gz
org.eclipse.gmf-tooling-879ee913f970f175f507e59d38962b905277e7bd.tar.xz
org.eclipse.gmf-tooling-879ee913f970f175f507e59d38962b905277e7bd.zip
support figure's preferred size
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/FigureAttrs.jetinc3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/FigureAttrs.jetinc b/plugins/org.eclipse.gmf.graphdef.codegen/templates/FigureAttrs.jetinc
index 828d28083..b16cc7aaa 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/FigureAttrs.jetinc
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/FigureAttrs.jetinc
@@ -5,4 +5,7 @@ if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_ForegroundColor())
<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_BackgroundColor())) {
colorVal = figureInstance.getBackgroundColor();%>
<%=figureVarName%>.setBackgroundColor(<%@ include file="Color.jetinc"%>);
+<%} if (figureInstance.eIsSet(GMFGraphPackage.eINSTANCE.getFigure_PreferredSize())) {
+ Dimension d = figureInstance.getPreferredSize();%>
+ <%=figureVarName%>.setPreferredSize(getMapMode().DPtoLP(<%=d.getDx()%>), getMapMode().DPtoLP(<%=d.getDy()%>));
<%}%> \ No newline at end of file

Back to the top