Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 52c7ec1cd5c32ce6b96ce55c13d069f67826f2cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="InitGridLayoutGenerator"
	imports="org.eclipse.gmf.gmfgraph.* org.eclipse.gmf.graphdef.codegen.*"%>
<%
GraphDefDispatcher.LayoutArgs argsBundle = (GraphDefDispatcher.LayoutArgs) argument;
final GridLayout gmfLayout = (GridLayout) argsBundle.getLayout();
final String layouterVarName = argsBundle.getManagerVariableName();
%>
		<%=layouterVarName%>.numColumns = <%=gmfLayout.getNumColumns()%>;
		<%=layouterVarName%>.makeColumnsEqualWidth = <%=gmfLayout.isEqualWidth()%>;
<%
Dimension margins = gmfLayout.getMargins();
if (margins != null){
%>
		<%=layouterVarName%>.marginWidth = <%=margins.getDx()%>;
		<%=layouterVarName%>.marginHeight = <%=margins.getDy()%>;
<%
}
Dimension spacing = gmfLayout.getSpacing();
if (spacing != null){
%>
		<%=layouterVarName%>.horizontalSpacing = <%=spacing.getDx()%>;
		<%=layouterVarName%>.verticalSpacing = <%=spacing.getDy()%>;
<%
}
%>

Back to the top