Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2008-08-01 11:09:39 +0000
committerdstadnik2008-08-01 11:09:39 +0000
commit74f6df50ff264df4920aa96cc3074a3487d26109 (patch)
treeaf0a8fb38ddd754add52d034a9ba514f68abeca9 /plugins
parent84b3b13ae83cdf6ce96f9e5458daac827ba48410 (diff)
downloadorg.eclipse.gmf-tooling-74f6df50ff264df4920aa96cc3074a3487d26109.tar.gz
org.eclipse.gmf-tooling-74f6df50ff264df4920aa96cc3074a3487d26109.tar.xz
org.eclipse.gmf-tooling-74f6df50ff264df4920aa96cc3074a3487d26109.zip
[242851] set node visual props to the primary shape
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt10
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt36
2 files changed, 45 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt
index 99d24f2b7..dd1bd30b2 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt
@@ -51,7 +51,15 @@ public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
«EXPAND impl::diagram::editparts::NodeEditPart::setupContentPane-»
«EXPAND impl::diagram::editparts::NodeEditPart::getContentPane-»
-
+
+ «EXPAND impl::diagram::editparts::NodeEditPart::setForegroundColor-»
+
+ «EXPAND impl::diagram::editparts::NodeEditPart::setBackgroundColor-»
+
+ «EXPAND impl::diagram::editparts::NodeEditPart::setLineWidth-»
+
+ «EXPAND impl::diagram::editparts::NodeEditPart::setLineStyle-»
+
«EXPAND impl::diagram::editparts::NodeEditPart::getPrimaryChildEditPart-»
«EXPAND handleNotificationEvent-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
index ba9b8c97f..d68495e2b 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
@@ -451,6 +451,42 @@
}
«ENDDEFINE»
+«DEFINE setForegroundColor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected void setForegroundColor(org.eclipse.swt.graphics.Color color) {
+ if (primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+«ENDDEFINE»
+
+«DEFINE setBackgroundColor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected void setBackgroundColor(org.eclipse.swt.graphics.Color color) {
+ if (primaryShape != null) {
+ primaryShape.setBackgroundColor(color);
+ }
+ }
+«ENDDEFINE»
+
+«DEFINE setLineWidth FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected void setLineWidth(int width) {
+ if (primaryShape instanceof org.eclipse.draw2d.Shape) {
+ ((org.eclipse.draw2d.Shape) primaryShape).setLineWidth(getMapMode().DPtoLP(width));
+ }
+ }
+«ENDDEFINE»
+
+«DEFINE setLineStyle FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected void setLineType(int style) {
+ if (primaryShape instanceof org.eclipse.draw2d.Shape) {
+ ((org.eclipse.draw2d.Shape) primaryShape).setLineStyle(style);
+ }
+ }
+«ENDDEFINE»
+
«DEFINE getPrimaryChildEditPart FOR gmfgen::GenNode-»
«IF !labels.isEmpty()-»
«EXPAND xpt::Common::generatedMemberComment»

Back to the top