diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/.classpath b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/.classpath
new file mode 100644
index 0000000..a18cb2c
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/.classpath
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/.project b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/.project
new file mode 100644
index 0000000..8ea70c7
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/.project
@@ -0,0 +1,17 @@
+
+
+ VioletPlugin.UseCaseDiagram
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/horstmann.eclipse.code.formatter.xml b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/horstmann.eclipse.code.formatter.xml
new file mode 100644
index 0000000..bef0923
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/horstmann.eclipse.code.formatter.xml
@@ -0,0 +1,246 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/pom.xml b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/pom.xml
new file mode 100644
index 0000000..2272c98
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/pom.xml
@@ -0,0 +1,62 @@
+
+
+ 4.0.0
+ com.horstmann.violet.plugin
+ com.horstmann.violet.plugin.usecasediagram
+ Violet UML Editor Use Case Diagram Plugin
+ 2.0.0-SNAPSHOT
+
+ jar
+
+
+ com.horstmann.violet.framework
+ com.horstmann.violet.framework
+ 2.0.0-SNAPSHOT
+
+
+
+
+
+ src/main/resources
+
+
+ src/main/java
+
+ **/*.gif
+ **/*.jpg
+ **/*.properties
+ **/*.xml
+
+
+
+
+
+ maven-compiler-plugin
+ 2.0.2
+
+
+ 1.6
+
+
+
+
+
+
+ web.sourceforge.net
+ Violet's Maven Repository
+
+ sftp://web.sourceforge.net/home/groups/v/vi/violet/htdocs/maven2/repo
+
+
+
+
+
+ violet.repo
+ Violet's Maven repository (public access)
+ http://violet.sourceforge.net/maven2/repo/
+
+
+
\ No newline at end of file
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/ActorNode.java b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/ActorNode.java
new file mode 100644
index 0000000..1e2308f
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/ActorNode.java
@@ -0,0 +1,149 @@
+/*
+ Violet - A program for editing UML diagrams.
+
+ Copyright (C) 2007 Cay S. Horstmann (http://horstmann.com)
+ Alexandre de Pellegrin (http://alexdp.free.fr);
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package com.horstmann.violet.product.diagram.usecase;
+
+import java.awt.Graphics2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import com.horstmann.violet.product.diagram.abstracts.node.RectangularNode;
+import com.horstmann.violet.product.diagram.abstracts.property.MultiLineString;
+
+/**
+ * An actor node in a use case diagram.
+ */
+public class ActorNode extends RectangularNode
+{
+
+ /**
+ * Construct an actor node with a default size and name
+ */
+ public ActorNode()
+ {
+ name = new MultiLineString();
+ name.setText("Actor");
+ }
+
+ @Override
+ public Rectangle2D getBounds()
+ {
+ Rectangle2D top = new Rectangle2D.Double(0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT);
+ Rectangle2D bot = name.getBounds();
+ Point2D currentLocation = getLocation();
+ double x = currentLocation.getX();
+ double y = currentLocation.getY();
+ double w = Math.max(top.getWidth(), bot.getWidth());
+ double h = top.getHeight() + bot.getHeight();
+ Rectangle2D currentBounds = new Rectangle2D.Double(x, y, w, h);
+ Rectangle2D snappedBounds = getGraph().getGrid().snap(currentBounds);
+ return snappedBounds;
+ }
+
+ /**
+ * Draws the stick man
+ */
+ @Override
+ public void draw(Graphics2D g2)
+ {
+ Rectangle2D bounds = getBounds();
+
+ // Draw stick person
+ GeneralPath path = new GeneralPath();
+ float neckX = (float) (bounds.getX() + bounds.getWidth() / 2);
+ float neckY = (float) (bounds.getY() + HEAD_SIZE + GAP_ABOVE);
+ // head
+ path.moveTo(neckX, neckY);
+ path.quadTo(neckX + HEAD_SIZE / 2, neckY, neckX + HEAD_SIZE / 2, neckY - HEAD_SIZE / 2);
+ path.quadTo(neckX + HEAD_SIZE / 2, neckY - HEAD_SIZE, neckX, neckY - HEAD_SIZE);
+ path.quadTo(neckX - HEAD_SIZE / 2, neckY - HEAD_SIZE, neckX - HEAD_SIZE / 2, neckY - HEAD_SIZE / 2);
+ path.quadTo(neckX - HEAD_SIZE / 2, neckY, neckX, neckY);
+ // body
+ float hipX = neckX;
+ float hipY = neckY + BODY_SIZE;
+ path.lineTo(hipX, hipY);
+ // arms
+ path.moveTo(neckX - ARMS_SIZE / 2, neckY + BODY_SIZE / 3);
+ path.lineTo(neckX + ARMS_SIZE / 2, neckY + BODY_SIZE / 3);
+ // legs
+ float dx = (float) (LEG_SIZE / Math.sqrt(2));
+ float feetX1 = hipX - dx;
+ float feetX2 = hipX + dx + 1;
+ float feetY = hipY + dx + 1;
+ path.moveTo(feetX1, feetY);
+ path.lineTo(hipX, hipY);
+ path.lineTo(feetX2, feetY);
+
+ g2.draw(path);
+
+ // Draw name
+ Rectangle2D bot = name.getBounds();
+ Rectangle2D namebox = new Rectangle2D.Double(bounds.getX() + (bounds.getWidth() - bot.getWidth()) / 2, bounds.getY()
+ + DEFAULT_HEIGHT, bot.getWidth(), bot.getHeight());
+ name.draw(g2, namebox);
+ }
+
+ /**
+ * Sets the name property value.
+ *
+ * @param newValue the new actor name
+ */
+ public void setName(MultiLineString newValue)
+ {
+ name = newValue;
+ }
+
+ /**
+ * Gets the name property value.
+ *
+ * @param the actor name
+ */
+ public MultiLineString getName()
+ {
+ return name;
+ }
+
+ public ActorNode clone()
+ {
+ ActorNode cloned = (ActorNode) super.clone();
+ cloned.name = (MultiLineString) name.clone();
+ return cloned;
+ }
+
+ /** Actor name */
+ private MultiLineString name;
+ /** Bounding rectangle width */
+ private static int DEFAULT_WIDTH = 48;
+ /** Bounding rectangle height */
+ private static int DEFAULT_HEIGHT = 64;
+
+ /** Stick man : neck size */
+ private static int GAP_ABOVE = 4;
+ /** Stick man : head size */
+ private static int HEAD_SIZE = DEFAULT_WIDTH * 4 / 12;
+ /** Stick man : body size */
+ private static int BODY_SIZE = DEFAULT_WIDTH * 5 / 12;
+ /** Stick man : leg size - Note : Height = HEAD_SIZE + BODY_SIZE + LEG_SIZE/sqrt(2) */
+ private static int LEG_SIZE = DEFAULT_WIDTH * 5 / 12;
+ /** Stick man : arm size */
+ private static int ARMS_SIZE = DEFAULT_WIDTH * 6 / 12;
+}
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramConstant.java b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramConstant.java
new file mode 100644
index 0000000..2497988
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramConstant.java
@@ -0,0 +1,8 @@
+package com.horstmann.violet.product.diagram.usecase;
+
+public interface UseCaseDiagramConstant
+{
+
+ public static final String USECASE_DIAGRAM_STRINGS = "properties.UseCaseDiagramGraphStrings";
+
+}
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramGraph.java b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramGraph.java
new file mode 100644
index 0000000..adf4dc7
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramGraph.java
@@ -0,0 +1,114 @@
+/*
+ Violet - A program for editing UML diagrams.
+
+ Copyright (C) 2007 Cay S. Horstmann (http://horstmann.com)
+ Alexandre de Pellegrin (http://alexdp.free.fr);
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package com.horstmann.violet.product.diagram.usecase;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import com.horstmann.violet.product.diagram.abstracts.AbstractGraph;
+import com.horstmann.violet.product.diagram.abstracts.edge.IEdge;
+import com.horstmann.violet.product.diagram.abstracts.node.INode;
+import com.horstmann.violet.product.diagram.abstracts.property.ArrowHead;
+import com.horstmann.violet.product.diagram.abstracts.property.BentStyle;
+import com.horstmann.violet.product.diagram.abstracts.property.LineStyle;
+import com.horstmann.violet.product.diagram.common.DiagramLinkNode;
+import com.horstmann.violet.product.diagram.common.NoteEdge;
+import com.horstmann.violet.product.diagram.common.NoteNode;
+
+/**
+ * A UML use case diagram.
+ */
+public class UseCaseDiagramGraph extends AbstractGraph
+{
+
+ public List getNodePrototypes()
+ {
+ return NODE_PROTOTYPES;
+ }
+
+ public List getEdgePrototypes()
+ {
+ return EDGE_PROTOTYPES;
+ }
+
+ private static final List NODE_PROTOTYPES = new ArrayList();
+
+ private static final List EDGE_PROTOTYPES = new ArrayList();
+
+ static
+ {
+ ResourceBundle rs = ResourceBundle.getBundle(UseCaseDiagramConstant.USECASE_DIAGRAM_STRINGS, Locale.getDefault());
+
+ ActorNode actorNode = new ActorNode();
+ actorNode.setToolTip(rs.getString("node0.tooltip"));
+ NODE_PROTOTYPES.add(actorNode);
+
+ UseCaseNode useCaseNode = new UseCaseNode();
+ useCaseNode.setToolTip(rs.getString("node1.tooltip"));
+ NODE_PROTOTYPES.add(useCaseNode);
+
+ NoteNode noteNode = new NoteNode();
+ noteNode.setToolTip(rs.getString("node2.tooltip"));
+ NODE_PROTOTYPES.add(noteNode);
+
+ DiagramLinkNode diagramLinkNode = new DiagramLinkNode();
+ diagramLinkNode.setToolTip(rs.getString("node3.tooltip"));
+ NODE_PROTOTYPES.add(diagramLinkNode);
+
+ UseCaseRelationshipEdge communication = new UseCaseRelationshipEdge();
+ communication.setBentStyle(BentStyle.STRAIGHT);
+ communication.setLineStyle(LineStyle.SOLID);
+ communication.setEndArrowHead(ArrowHead.NONE);
+ communication.setToolTip(rs.getString("edge0.tooltip"));
+ EDGE_PROTOTYPES.add(communication);
+
+ UseCaseRelationshipEdge extendRel = new UseCaseRelationshipEdge();
+ extendRel.setBentStyle(BentStyle.STRAIGHT);
+ extendRel.setLineStyle(LineStyle.DOTTED);
+ extendRel.setEndArrowHead(ArrowHead.V);
+ extendRel.setMiddleLabel("\u00ABextend\u00BB");
+ extendRel.setToolTip(rs.getString("edge1.tooltip"));
+ EDGE_PROTOTYPES.add(extendRel);
+
+ UseCaseRelationshipEdge includeRel = new UseCaseRelationshipEdge();
+ includeRel.setBentStyle(BentStyle.STRAIGHT);
+ includeRel.setLineStyle(LineStyle.DOTTED);
+ includeRel.setEndArrowHead(ArrowHead.V);
+ includeRel.setMiddleLabel("\u00ABinclude\u00BB");
+ includeRel.setToolTip(rs.getString("edge2.tooltip"));
+ EDGE_PROTOTYPES.add(includeRel);
+
+ UseCaseRelationshipEdge generalization = new UseCaseRelationshipEdge();
+ generalization.setBentStyle(BentStyle.STRAIGHT);
+ generalization.setLineStyle(LineStyle.SOLID);
+ generalization.setEndArrowHead(ArrowHead.TRIANGLE);
+ generalization.setToolTip(rs.getString("edge3.tooltip"));
+ EDGE_PROTOTYPES.add(generalization);
+
+ NoteEdge noteEdge = new NoteEdge();
+ noteEdge.setToolTip(rs.getString("edge4.tooltip"));
+ EDGE_PROTOTYPES.add(noteEdge);
+ }
+
+}
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramPlugin.java b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramPlugin.java
new file mode 100644
index 0000000..5047a69
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseDiagramPlugin.java
@@ -0,0 +1,103 @@
+package com.horstmann.violet.product.diagram.usecase;
+
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+
+import com.horstmann.violet.framework.plugin.IDiagramPlugin;
+import com.horstmann.violet.framework.plugin.extensionpoint.Violet016FileFilterExtensionPoint;
+import com.horstmann.violet.product.diagram.abstracts.IGraph;
+
+/**
+ * Describes use case diagram graph type
+ *
+ * @author Alexandre de Pellegrin
+ *
+ */
+public class UseCaseDiagramPlugin implements IDiagramPlugin, Violet016FileFilterExtensionPoint
+{
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.horstmann.violet.framework.plugin.AbstractPlugin#getDescription()
+ */
+ public String getDescription()
+ {
+ return "Use case UML diagram";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.horstmann.violet.framework.plugin.AbstractPlugin#getProvider()
+ */
+ public String getProvider()
+ {
+ return "Alexandre de Pellegrin / Cays S. Horstmann";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.horstmann.violet.framework.plugin.AbstractPlugin#getVersion()
+ */
+ public String getVersion()
+ {
+ return "1.0.0";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.horstmann.violet.product.diagram.abstracts.GraphType#getName()
+ */
+ public String getName()
+ {
+ return this.rs.getString("menu.usecase_diagram.text");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.horstmann.violet.product.diagram.abstracts.GraphType#getFileExtension()
+ */
+ public String getFileExtension()
+ {
+ return this.rs.getString("files.usecase.extension");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.horstmann.violet.product.diagram.abstracts.GraphType#getFileExtensionName()
+ */
+ public String getFileExtensionName()
+ {
+ return this.rs.getString("files.usecase.name");
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.horstmann.violet.product.diagram.abstracts.GraphType#getGraphClass()
+ */
+ public Class extends IGraph> getGraphClass()
+ {
+ return UseCaseDiagramGraph.class;
+ }
+
+ public Map getMappingToKeepViolet016Compatibility()
+ {
+ Map replaceMap = new HashMap();
+ replaceMap.put("com.horstmann.violet.ActorNode", ActorNode.class.getName());
+ replaceMap.put("com.horstmann.violet.UseCaseDiagramGraph", UseCaseDiagramGraph.class.getName());
+ replaceMap.put("com.horstmann.violet.UseCaseNode", UseCaseNode.class.getName());
+ replaceMap.put("com.horstmann.violet.UseCaseRelationshipEdge", UseCaseRelationshipEdge.class.getName());
+ return replaceMap;
+ }
+
+ private ResourceBundle rs = ResourceBundle.getBundle(UseCaseDiagramConstant.USECASE_DIAGRAM_STRINGS, Locale.getDefault());
+
+}
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseNode.java b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseNode.java
new file mode 100644
index 0000000..4a95058
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseNode.java
@@ -0,0 +1,115 @@
+/*
+ Violet - A program for editing UML diagrams.
+
+ Copyright (C) 2007 Cay S. Horstmann (http://horstmann.com)
+ Alexandre de Pellegrin (http://alexdp.free.fr);
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package com.horstmann.violet.product.diagram.usecase;
+
+import java.awt.Graphics2D;
+import java.awt.geom.Point2D;
+import java.awt.geom.Rectangle2D;
+
+import com.horstmann.violet.product.diagram.abstracts.edge.IEdge;
+import com.horstmann.violet.product.diagram.abstracts.node.EllipticalNode;
+import com.horstmann.violet.product.diagram.abstracts.property.MultiLineString;
+
+/**
+ * A use case node in a use case diagram.
+ */
+public class UseCaseNode extends EllipticalNode
+{
+ /**
+ * Construct a use case node with a default size
+ */
+ public UseCaseNode()
+ {
+ name = new MultiLineString();
+ }
+
+ @Override
+ public Rectangle2D getBounds()
+ {
+ double aspectRatio = DEFAULT_WIDTH / DEFAULT_HEIGHT;
+ Rectangle2D b = name.getBounds();
+ double bw = b.getWidth();
+ double bh = b.getHeight();
+ double minWidth = Math.sqrt(bw * bw + aspectRatio * aspectRatio * bh * bh);
+ double minHeight = minWidth / aspectRatio;
+ Point2D currentLocation = getLocation();
+ double x = currentLocation.getX();
+ double y = currentLocation.getY();
+ double w = Math.max(minWidth, DEFAULT_WIDTH);
+ double h = Math.max(minHeight, DEFAULT_HEIGHT);
+ Rectangle2D currentBounds = new Rectangle2D.Double(x, y, w, h);
+ Rectangle2D snappedBounds = getGraph().getGrid().snap(currentBounds);
+ return snappedBounds;
+ }
+
+ @Override
+ public Point2D getConnectionPoint(IEdge e)
+ {
+ // if use case node is atatched to an actor node, we force connection point to cardianl points
+ if (e.getStart().getClass().isAssignableFrom(ActorNode.class) || e.getEnd().getClass().isAssignableFrom(ActorNode.class)) {
+
+ }
+
+ return super.getConnectionPoint(e);
+ }
+
+ @Override
+ public void draw(Graphics2D g2)
+ {
+ super.draw(g2);
+ g2.draw(getShape());
+ name.draw(g2, getBounds());
+ }
+
+ /**
+ * Sets the name property value.
+ *
+ * @param newValue the new use case name
+ */
+ public void setName(MultiLineString newValue)
+ {
+ name = newValue;
+ }
+
+ /**
+ * Gets the name property value.
+ *
+ * @param the use case name
+ */
+ public MultiLineString getName()
+ {
+ return name;
+ }
+
+ @Override
+ public UseCaseNode clone()
+ {
+ UseCaseNode cloned = (UseCaseNode) super.clone();
+ cloned.name = name.clone();
+ return cloned;
+ }
+
+ private MultiLineString name;
+
+ private static int DEFAULT_WIDTH = 110;
+ private static int DEFAULT_HEIGHT = 40;
+}
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseRelationshipEdge.java b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseRelationshipEdge.java
new file mode 100644
index 0000000..7a006d7
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseRelationshipEdge.java
@@ -0,0 +1,47 @@
+/*
+ Violet - A program for editing UML diagrams.
+
+ Copyright (C) 2007 Cay S. Horstmann (http://horstmann.com)
+ Alexandre de Pellegrin (http://alexdp.free.fr);
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package com.horstmann.violet.product.diagram.usecase;
+
+import java.awt.geom.Point2D;
+import java.util.ArrayList;
+
+import com.horstmann.violet.product.diagram.abstracts.edge.SegmentedLineEdge;
+import com.horstmann.violet.product.diagram.abstracts.property.BentStyle;
+
+/**
+ * An edge that is shaped like a line with up to three segments with an arrowhead
+ */
+public class UseCaseRelationshipEdge extends SegmentedLineEdge
+{
+
+ @Override
+ public ArrayList getPoints() {
+ // TODO Auto-generated method stub tms
+ return null;
+ }
+
+ public void setBentStyle(BentStyle straight) {
+ // TODO Auto-generated method stub tms
+
+ }
+
+}
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseRelationshipEdgeBeanInfo.java b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseRelationshipEdgeBeanInfo.java
new file mode 100644
index 0000000..51baec5
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/java/com/horstmann/violet/product/diagram/usecase/UseCaseRelationshipEdgeBeanInfo.java
@@ -0,0 +1,65 @@
+/*
+ Violet - A program for editing UML diagrams.
+
+ Copyright (C) 2007 Cay S. Horstmann (http://horstmann.com)
+ Alexandre de Pellegrin (http://alexdp.free.fr);
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package com.horstmann.violet.product.diagram.usecase;
+
+import java.beans.IntrospectionException;
+import java.beans.PropertyDescriptor;
+import java.beans.SimpleBeanInfo;
+
+/**
+ * The bean info for the ClassRelationshipEdge type.
+ */
+public class UseCaseRelationshipEdgeBeanInfo extends SimpleBeanInfo
+{
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.beans.BeanInfo#getPropertyDescriptors()
+ */
+ public PropertyDescriptor[] getPropertyDescriptors()
+ {
+ try
+ {
+ PropertyDescriptor[] descriptors = new PropertyDescriptor[]
+ {
+ new PropertyDescriptor("startArrowHead", UseCaseRelationshipEdge.class),
+ new PropertyDescriptor("startLabel", UseCaseRelationshipEdge.class),
+ new PropertyDescriptor("middleLabel", UseCaseRelationshipEdge.class),
+ new PropertyDescriptor("endLabel", UseCaseRelationshipEdge.class),
+ new PropertyDescriptor("endArrowHead", UseCaseRelationshipEdge.class),
+ new PropertyDescriptor("bentStyle", UseCaseRelationshipEdge.class),
+ new PropertyDescriptor("lineStyle", UseCaseRelationshipEdge.class),
+ };
+ for (int i = 0; i < descriptors.length; i++)
+ {
+ descriptors[i].setValue("priority", new Integer(i));
+ }
+ return descriptors;
+ }
+ catch (IntrospectionException exception)
+ {
+ exception.printStackTrace();
+ return null;
+ }
+ }
+
+}
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/META-INF/services/com.horstmann.violet.framework.plugin.IDiagramPlugin b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/META-INF/services/com.horstmann.violet.framework.plugin.IDiagramPlugin
new file mode 100644
index 0000000..9802fe8
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/META-INF/services/com.horstmann.violet.framework.plugin.IDiagramPlugin
@@ -0,0 +1 @@
+com.horstmann.violet.product.diagram.usecase.UseCaseDiagramPlugin
\ No newline at end of file
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/properties/UseCaseDiagramGraphStrings.properties b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/properties/UseCaseDiagramGraphStrings.properties
new file mode 100644
index 0000000..de37094
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/properties/UseCaseDiagramGraphStrings.properties
@@ -0,0 +1,12 @@
+node0.tooltip=Actor
+node1.tooltip=Use case
+node2.tooltip=Note
+node3.tooltip=Linked diagram
+edge0.tooltip=Interaction
+edge1.tooltip=\u00ABextend\u00BB : precises the behaviour of
+edge2.tooltip=\u00ABinclude\u00BB : includes call to
+edge3.tooltip=Generalization : is a more specific version of
+edge4.tooltip=Note connector
+menu.usecase_diagram.text=Use case diagram
+files.usecase.name=Use Case Diagram Files
+files.usecase.extension=.ucase.violet
diff --git a/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/properties/UseCaseDiagramGraphStrings_fr.properties b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/properties/UseCaseDiagramGraphStrings_fr.properties
new file mode 100644
index 0000000..ea300de
--- /dev/null
+++ b/VioletPluginUseCase/VioletPlugin.UseCaseDiagram/src/main/resources/properties/UseCaseDiagramGraphStrings_fr.properties
@@ -0,0 +1,12 @@
+node0.tooltip=Acteur
+node1.tooltip=Cas d'utilisation
+node2.tooltip=Note
+node3.tooltip=Diagramme li\u00E9
+edge0.tooltip=Interaction
+edge1.tooltip=\u00ABextend\u00BB : pr\u00E9cise le comportement de
+edge2.tooltip=\u00ABinclude\u00BB : inclut l'appel \u00E0
+edge3.tooltip=G\u00E9n\u00E9ralisation : est une version plus sp\u00E9cifique de
+edge4.tooltip=Connection \u00E0 la note
+menu.usecase_diagram.text=Diagramme de cas d'utilisation
+files.usecase.name=Diagramme de cas d'utilisation
+files.usecase.extension=.ucase.violet
\ No newline at end of file