Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 24b12f7cd98f102524198173941db22d92400b9e (plain) (tree)
1
2
3
4
5
6
7
8
9




                                                                                              

                                                                              
 
                                                                                                               



















                                                                                                               
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitXYLayoutDataGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
<%
GraphDefDispatcher.LayoutArgs argsBundle = (GraphDefDispatcher.LayoutArgs) argument;
final XYLayoutData gmfLayoutData = (XYLayoutData) argsBundle.getData();
final GraphDefDispatcher dispatcher = argsBundle.getDispatcher();
final String layoutConstraintVarName = argsBundle.getConstraintVariableName();

final String layoutImplClassName = dispatcher.getFQNSwitch().get(gmfLayoutData, dispatcher.getImportManager());
%>
			<%=layoutImplClassName%> <%=layoutConstraintVarName%> = new <%=layoutImplClassName%>();
<%
Point topLeft = gmfLayoutData.getTopLeft();
if (topLeft != null){
%>
			<%=layoutConstraintVarName%>.x = <%=topLeft.getX()%>;
			<%=layoutConstraintVarName%>.y = <%=topLeft.getY()%>;
<%
}
%>
<%
Dimension size = gmfLayoutData.getSize();
if (size != null){
%>
			<%=layoutConstraintVarName%>.width = <%=size.getDx()%>;
			<%=layoutConstraintVarName%>.height = <%=size.getDy()%>;
<%
}
%>

Back to the top