Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordstadnik2008-08-01 07:54:02 -0400
committerdstadnik2008-08-01 07:54:02 -0400
commit41cf107b5cf159c5bf8dfac47f679914cabb14de (patch)
tree96e7fce59e94c48e985827df198b9d94de8fc95e
parent4c9b60035655aed50f1572ba5393f7a18d1820ef (diff)
downloadorg.eclipse.gmf-tooling-41cf107b5cf159c5bf8dfac47f679914cabb14de.tar.gz
org.eclipse.gmf-tooling-41cf107b5cf159c5bf8dfac47f679914cabb14de.tar.xz
org.eclipse.gmf-tooling-41cf107b5cf159c5bf8dfac47f679914cabb14de.zip
regenerated
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/META-INF/MANIFEST.MF3
-rw-r--r--examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java71
2 files changed, 69 insertions, 5 deletions
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/META-INF/MANIFEST.MF b/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/META-INF/MANIFEST.MF
index 530da9426..1470c8177 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/META-INF/MANIFEST.MF
@@ -29,5 +29,6 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.gmf.examples.taipan.edit;visibility:=reexport,
org.eclipse.ocl.ecore;visibility:=reexport,
org.eclipse.emf.validation;visibility:=reexport,
- org.eclipse.gef;visibility:=reexport
+ org.eclipse.gef;visibility:=reexport,
+ org.eclipse.gmf.runtime.lite.svg;visibility:=reexport
Eclipse-LazyStart: true
diff --git a/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java b/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java
index fd0c4e443..09fc55e1e 100644
--- a/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java
+++ b/examples/org.eclipse.gmf.examples.taipan.gmf.editor.rcp/src/org/eclipse/gmf/examples/taipan/gmf/editor/edit/parts/EmptyBoxEditPart.java
@@ -21,14 +21,17 @@ import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.LayoutEditPolicy;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.gmf.examples.taipan.figures.BoxShape;
import org.eclipse.gmf.examples.taipan.gmf.editor.edit.policies.EmptyBoxItemSemanticEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.lite.svg.SVGFigure;
+import org.eclipse.gmf.runtime.lite.svg.SVGUtils;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.swt.graphics.Color;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
/**
* @generated
@@ -97,14 +100,15 @@ public class EmptyBoxEditPart extends ShapeNodeEditPart {
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new BoxShape();
+ EmptyBoxFigure figure = new EmptyBoxFigure();
+ return primaryShape = figure;
}
/**
* @generated
*/
- public BoxShape getPrimaryShape() {
- return (BoxShape) primaryShape;
+ public EmptyBoxFigure getPrimaryShape() {
+ return (EmptyBoxFigure) primaryShape;
}
/**
@@ -188,4 +192,63 @@ public class EmptyBoxEditPart extends ShapeNodeEditPart {
}
}
+ /**
+ * @generated
+ */
+ public class EmptyBoxFigure extends SVGFigure {
+
+ /**
+ * @generated
+ */
+ public EmptyBoxFigure() {
+ this.setURI("platform:/plugin/org.eclipse.gmf.examples.taipan/images/box.svg", true);
+ }
+
+ /**
+ * @generated
+ */
+ public void setBackgroundColor(Color value) {
+ String svalue = SVGUtils.toSVGColor(getDocument(), value);
+ NodeList nodes = getNodes("//:rect"); //$NON-NLS-1$
+ for (int i = 0; i < nodes.getLength(); i++) {
+ ((Element) nodes.item(i)).setAttributeNS(null, "fill", //$NON-NLS-1$
+ svalue);
+ }
+ super.setBackgroundColor(value);
+ }
+
+ /**
+ * @generated
+ */
+ public void setForegroundColor(Color value) {
+ String svalue = SVGUtils.toSVGColor(getDocument(), value);
+ NodeList nodes = getNodes("//:line|//:rect"); //$NON-NLS-1$
+ for (int i = 0; i < nodes.getLength(); i++) {
+ ((Element) nodes.item(i)).setAttributeNS(null, "stroke", //$NON-NLS-1$
+ svalue);
+ }
+ super.setForegroundColor(value);
+ }
+
+ /**
+ * @generated
+ */
+ private boolean myUseLocalCoordinates = false;
+
+ /**
+ * @generated
+ */
+ protected boolean useLocalCoordinates() {
+ return myUseLocalCoordinates;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
+ myUseLocalCoordinates = useLocalCoordinates;
+ }
+
+ }
+
}

Back to the top