Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-01-23 20:00:49 +0000
committerashatalin2006-01-23 20:00:49 +0000
commit18c9b4e6b1efbe088b9e40e1b6dfcb37f3a5fc05 (patch)
tree30bca551e208b8f0556044dc25492a00536f65ae /plugins/org.eclipse.gmf.graphdef.codegen/templates
parent4490adb6795f64d3c372b53d6639ec3cb036c85c (diff)
downloadorg.eclipse.gmf-tooling-18c9b4e6b1efbe088b9e40e1b6dfcb37f3a5fc05.tar.gz
org.eclipse.gmf-tooling-18c9b4e6b1efbe088b9e40e1b6dfcb37f3a5fc05.tar.xz
org.eclipse.gmf-tooling-18c9b4e6b1efbe088b9e40e1b6dfcb37f3a5fc05.zip
- Generating figures for Child node
- Transforming coordinates for rounded rectangles
Diffstat (limited to 'plugins/org.eclipse.gmf.graphdef.codegen/templates')
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/Label.javajet20
-rw-r--r--plugins/org.eclipse.gmf.graphdef.codegen/templates/ShapeAttrs.jetinc2
2 files changed, 21 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/Label.javajet b/plugins/org.eclipse.gmf.graphdef.codegen/templates/Label.javajet
new file mode 100644
index 000000000..c964bddff
--- /dev/null
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/Label.javajet
@@ -0,0 +1,20 @@
+<%@ jet package="org.eclipse.gmf.graphdef.codegen.templates" class="LabelGenerator"
+ imports="org.eclipse.gmf.gmfgraph.*"%>
+
+<%
+Label figure = (Label) argument;
+%>
+
+/**
+ * @generated
+ */
+public class <%=figure.getName()%> extends org.eclipse.draw2d.Label {
+
+ /**
+ * @generated
+ */
+ public <%=figure.getName()%>() {
+ super();
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.graphdef.codegen/templates/ShapeAttrs.jetinc b/plugins/org.eclipse.gmf.graphdef.codegen/templates/ShapeAttrs.jetinc
index 74945d200..9dfc6a9f6 100644
--- a/plugins/org.eclipse.gmf.graphdef.codegen/templates/ShapeAttrs.jetinc
+++ b/plugins/org.eclipse.gmf.graphdef.codegen/templates/ShapeAttrs.jetinc
@@ -18,5 +18,5 @@
<%=shapeVarName%>.addPoint(new org.eclipse.draw2d.geometry.Point(<%=p.getX()%>, <%=p.getY()%>));
<%}%><%} else if (shapeFigure instanceof RoundedRectangle) {
RoundedRectangle rrFigure = (RoundedRectangle) shapeFigure;%>
- <%=shapeVarName%>.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(<%=rrFigure.getCornerWidth()%>, <%=rrFigure.getCornerHeight()%>));
+ <%=shapeVarName%>.setCornerDimensions(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(<%=rrFigure.getCornerWidth()%>), getMapMode().DPtoLP(<%=rrFigure.getCornerHeight()%>)));
<%}%><%@ include file="FigureAttrs.jetinc"%> \ No newline at end of file

Back to the top