diff --git a/New folder/VioletPlugin.ClassDiagram/.classpath b/New folder/VioletPlugin.ClassDiagram/.classpath new file mode 100644 index 0000000..2d9e006 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/New folder/VioletPlugin.ClassDiagram/.project b/New folder/VioletPlugin.ClassDiagram/.project new file mode 100644 index 0000000..9f0c30b --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/.project @@ -0,0 +1,17 @@ + + + VioletPlugin.ClassDiagram + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/New folder/VioletPlugin.ClassDiagram/horstmann.eclipse.code.formatter.xml b/New folder/VioletPlugin.ClassDiagram/horstmann.eclipse.code.formatter.xml new file mode 100644 index 0000000..bef0923 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/horstmann.eclipse.code.formatter.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/New folder/VioletPlugin.ClassDiagram/pom.xml b/New folder/VioletPlugin.ClassDiagram/pom.xml new file mode 100644 index 0000000..49e3a87 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + com.horstmann.violet.plugin + com.horstmann.violet.plugin.classdiagram + Violet UML Editor Class 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 + 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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramConstant.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramConstant.java new file mode 100644 index 0000000..3403d47 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramConstant.java @@ -0,0 +1,8 @@ +package com.horstmann.violet.product.diagram.classes; + +public interface ClassDiagramConstant +{ + + public static final String CLASS_DIAGRAM_STRINGS = "properties.ClassDiagramGraphStrings"; + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramGraph.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramGraph.java new file mode 100644 index 0000000..1697f01 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramGraph.java @@ -0,0 +1,97 @@ +package com.horstmann.violet.product.diagram.classes; + +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.classes.edges.AggregationEdge; +import com.horstmann.violet.product.diagram.classes.edges.AssociationEdge; +import com.horstmann.violet.product.diagram.classes.edges.CompositionEdge; +import com.horstmann.violet.product.diagram.classes.edges.DependencyEdge; +import com.horstmann.violet.product.diagram.classes.edges.InheritanceEdge; +import com.horstmann.violet.product.diagram.classes.edges.InterfaceInheritanceEdge; +import com.horstmann.violet.product.diagram.classes.nodes.ClassNode; +import com.horstmann.violet.product.diagram.classes.nodes.InterfaceNode; +import com.horstmann.violet.product.diagram.classes.nodes.PackageNode; +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 class diagram. + */ +public class ClassDiagramGraph 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(ClassDiagramConstant.CLASS_DIAGRAM_STRINGS, Locale.getDefault()); + + ClassNode node0 = new ClassNode(); + node0.setToolTip(rs.getString("node0.tooltip")); + NODE_PROTOTYPES.add(node0); + + InterfaceNode node1 = new InterfaceNode(); + node1.setToolTip(rs.getString("node1.tooltip")); + NODE_PROTOTYPES.add(node1); + + PackageNode node2 = new PackageNode(); + node2.setToolTip(rs.getString("node2.tooltip")); + NODE_PROTOTYPES.add(node2); + + NoteNode node3 = new NoteNode(); + node3.setToolTip(rs.getString("node3.tooltip")); + NODE_PROTOTYPES.add(node3); + + DiagramLinkNode node4 = new DiagramLinkNode(); + node4.setToolTip(rs.getString("node4.tooltip")); + NODE_PROTOTYPES.add(node4); + + DependencyEdge dependency = new DependencyEdge(); + dependency.setToolTip(rs.getString("edge0.tooltip")); + EDGE_PROTOTYPES.add(dependency); + + InheritanceEdge inheritance = new InheritanceEdge(); + inheritance.setToolTip(rs.getString("edge1.tooltip")); + EDGE_PROTOTYPES.add(inheritance); + + InterfaceInheritanceEdge interfaceInheritance = new InterfaceInheritanceEdge(); + interfaceInheritance.setToolTip(rs.getString("edge2.tooltip")); + EDGE_PROTOTYPES.add(interfaceInheritance); + + AssociationEdge association = new AssociationEdge(); + association.setToolTip(rs.getString("edge3.tooltip")); + EDGE_PROTOTYPES.add(association); + + AggregationEdge aggregation = new AggregationEdge(); + aggregation.setToolTip(rs.getString("edge4.tooltip")); + EDGE_PROTOTYPES.add(aggregation); + + CompositionEdge composition = new CompositionEdge(); + composition.setToolTip(rs.getString("edge5.tooltip")); + EDGE_PROTOTYPES.add(composition); + + NoteEdge noteEdge = new NoteEdge(); + noteEdge.setToolTip(rs.getString("edge6.tooltip")); + EDGE_PROTOTYPES.add(noteEdge); + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramPlugin.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramPlugin.java new file mode 100644 index 0000000..2eb40e3 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramPlugin.java @@ -0,0 +1,109 @@ +package com.horstmann.violet.product.diagram.classes; + +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; +import com.horstmann.violet.product.diagram.classes.edges.ClassRelationshipEdge; +import com.horstmann.violet.product.diagram.classes.nodes.ClassNode; +import com.horstmann.violet.product.diagram.classes.nodes.InterfaceNode; +import com.horstmann.violet.product.diagram.classes.nodes.PackageNode; + +/** + * Describes class diagram graph type + * + * @author Alexandre de Pellegrin + * + */ +public class ClassDiagramPlugin implements IDiagramPlugin, Violet016FileFilterExtensionPoint +{ + /* + * (non-Javadoc) + * + * @see com.horstmann.violet.framework.plugin.AbstractPlugin#getDescription() + */ + public String getDescription() + { + return "Class 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.class_diagram.text"); + } + + /* + * (non-Javadoc) + * + * @see com.horstmann.violet.product.diagram.abstracts.GraphType#getFileExtension() + */ + public String getFileExtension() + { + return this.rs.getString("files.class.extension"); + } + + /* + * (non-Javadoc) + * + * @see com.horstmann.violet.product.diagram.abstracts.GraphType#getFileExtensionName() + */ + public String getFileExtensionName() + { + return this.rs.getString("files.class.name"); + } + + /* + * (non-Javadoc) + * + * @see com.horstmann.violet.product.diagram.abstracts.GraphType#getGraphClass() + */ + public Class getGraphClass() + { + return ClassDiagramGraph.class; + } + + + public Map getMappingToKeepViolet016Compatibility() + { + Map replaceMap = new HashMap(); + replaceMap.put("com.horstmann.violet.ClassDiagramGraph", ClassDiagramGraph.class.getName()); + replaceMap.put("com.horstmann.violet.ClassNode", ClassNode.class.getName()); + replaceMap.put("com.horstmann.violet.ClassRelationshipEdge", ClassRelationshipEdge.class.getName()); + replaceMap.put("com.horstmann.violet.InterfaceNode", InterfaceNode.class.getName()); + replaceMap.put("com.horstmann.violet.PackageNode", PackageNode.class.getName()); + return replaceMap; + } + + private ResourceBundle rs = ResourceBundle.getBundle(ClassDiagramConstant.CLASS_DIAGRAM_STRINGS, Locale.getDefault()); + + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/FileCompatiliblyServiceToDelete.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/FileCompatiliblyServiceToDelete.java new file mode 100644 index 0000000..ca7683c --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/FileCompatiliblyServiceToDelete.java @@ -0,0 +1,180 @@ +/* + 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.classes; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.UnsupportedEncodingException; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +import com.horstmann.violet.framework.util.StringFilterOutputStream; +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.classes.edges.ClassRelationshipEdge; +import com.horstmann.violet.product.diagram.classes.nodes.ClassNode; +import com.horstmann.violet.product.diagram.classes.nodes.InterfaceNode; +import com.horstmann.violet.product.diagram.classes.nodes.PackageNode; +import com.horstmann.violet.product.diagram.common.DiagramLinkNode; +import com.horstmann.violet.product.diagram.common.NoteEdge; +import com.horstmann.violet.product.diagram.common.NoteNode; +import com.horstmann.violet.product.diagram.common.PointNode; + +/** + * This class provides file format services + * + * @author Alexandre de Pellegrin + * + */ +public class FileCompatiliblyServiceToDelete +{ + + /** + * This filter guarantees compatibility for Violet 0.16 file format + * + * @param in raw input stream + * @return converted input stream + */ + public static InputStream convertFromViolet016(InputStream in) + { + + Map replaceMap = new Hashtable(); + + // fix framework elements + replaceMap.put("com.horstmann.violet.BentStyle", BentStyle.class.getName()); + replaceMap.put("com.horstmann.violet.LineStyle", LineStyle.class.getName()); + replaceMap.put("com.horstmann.violet.ArrowHead", ArrowHead.class.getName()); + + // fix common elements package + replaceMap.put("com.horstmann.violet.DiagramLinkNode", DiagramLinkNode.class.getName()); + replaceMap.put("com.horstmann.violet.NoteEdge", NoteEdge.class.getName()); + replaceMap.put("com.horstmann.violet.NoteNode", NoteNode.class.getName()); + replaceMap.put("com.horstmann.violet.PointNode", PointNode.class.getName()); + + // fix class diagram package + replaceMap.put("com.horstmann.violet.ClassDiagramGraph", ClassDiagramGraph.class.getName()); + replaceMap.put("com.horstmann.violet.ClassNode", ClassNode.class.getName()); + replaceMap.put("com.horstmann.violet.ClassRelationshipEdge", ClassRelationshipEdge.class.getName()); + replaceMap.put("com.horstmann.violet.InterfaceNode", InterfaceNode.class.getName()); + replaceMap.put("com.horstmann.violet.PackageNode", PackageNode.class.getName()); + + String original = getInputStreamContent(in); + String replaced = replaceAll(original, replaceMap); + try + { + return new ByteArrayInputStream(replaced.getBytes("UTF-8")); + } + catch (UnsupportedEncodingException ex) + { + ex.printStackTrace(); + return new ByteArrayInputStream(replaced.getBytes()); + } + } + + /** + * Converts inputStream to String + * + * @param in stream + * @return string + */ + private static String getInputStreamContent(InputStream in) + { + try + { + InputStreamReader isr = new InputStreamReader(in, "UTF-8"); + StringBuffer buffer = new StringBuffer(); + int len = 1024; + char buf[] = new char[len]; + int numRead; + while ((numRead = isr.read(buf, 0, len)) != -1) + { + buffer.append(buf, 0, numRead); + } + isr.close(); + return buffer.toString(); + } + catch (IOException e) + { + throw new RuntimeException(e); + } + } + + /** + * Filters a string and replaces all key courrences issed from the map by its valye + * + * @param input string + * @param replaceMap key = searchedString / value = replaceString + * @return filtered string + */ + private static String replaceAll(String input, Map replaceMap) + { + Set set = replaceMap.keySet(); + for (Iterator iter = set.iterator(); iter.hasNext();) + { + String searchedStr = iter.next(); + String replaceStr = replaceMap.get(searchedStr); + input = input.replaceAll(searchedStr, replaceStr); + } + return input; + } + + /** + * This filter guarantees compatibility for Violet 0.16 file format + * + * @param out raw output stream + * @return converted output stream + */ + public static OutputStream convertToViolet016(OutputStream out) + { + + Map replaceMap = new Hashtable(); + + // fix framework elements + replaceMap.put(BentStyle.class.getName(), "com.horstmann.violet.BentStyle"); + replaceMap.put(LineStyle.class.getName(), "com.horstmann.violet.LineStyle"); + replaceMap.put(ArrowHead.class.getName(), "com.horstmann.violet.ArrowHead"); + + // fix common elements package + replaceMap.put(DiagramLinkNode.class.getName(), "com.horstmann.violet.DiagramLinkNode"); + replaceMap.put(NoteEdge.class.getName(), "com.horstmann.violet.NoteEdge"); + replaceMap.put(NoteNode.class.getName(), "com.horstmann.violet.NoteNode"); + replaceMap.put(PointNode.class.getName(), "com.horstmann.violet.PointNode"); + + // fix class diagram package + replaceMap.put(ClassDiagramGraph.class.getName(), "com.horstmann.violet.ClassDiagramGraph"); + replaceMap.put(ClassNode.class.getName(), "com.horstmann.violet.ClassNode"); + replaceMap.put(ClassRelationshipEdge.class.getName(), "com.horstmann.violet.ClassRelationshipEdge"); + replaceMap.put(InterfaceNode.class.getName(), "com.horstmann.violet.InterfaceNode"); + replaceMap.put(PackageNode.class.getName(), "com.horstmann.violet.PackageNode"); + + StringFilterOutputStream filteredOutputStream = new StringFilterOutputStream(out, replaceMap); + return filteredOutputStream; + + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AggregationEdge.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AggregationEdge.java new file mode 100644 index 0000000..770a704 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AggregationEdge.java @@ -0,0 +1,27 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import com.horstmann.violet.product.diagram.abstracts.property.ArrowHead; +import com.horstmann.violet.product.diagram.abstracts.property.LineStyle; + +public class AggregationEdge extends ClassRelationshipEdge +{ + + @Override + public ArrowHead getStartArrowHead() + { + return ArrowHead.NONE; + } + + @Override + public ArrowHead getEndArrowHead() + { + return ArrowHead.DIAMOND; + } + + @Override + public LineStyle getLineStyle() + { + return LineStyle.SOLID; + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AggregationEdgeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AggregationEdgeBeanInfo.java new file mode 100644 index 0000000..5468c82 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AggregationEdgeBeanInfo.java @@ -0,0 +1,38 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassRelationshipEdge type. + */ +public class AggregationEdgeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor[] descriptors = new PropertyDescriptor[] + { + new PropertyDescriptor("startLabel", AggregationEdge.class), + new PropertyDescriptor("middleLabel", AggregationEdge.class), + new PropertyDescriptor("endLabel", AggregationEdge.class), + new PropertyDescriptor("bentStyle", AggregationEdge.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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AssociationEdge.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AssociationEdge.java new file mode 100644 index 0000000..34aa159 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AssociationEdge.java @@ -0,0 +1,27 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import com.horstmann.violet.product.diagram.abstracts.property.ArrowHead; +import com.horstmann.violet.product.diagram.abstracts.property.LineStyle; + +public class AssociationEdge extends ClassRelationshipEdge +{ + + @Override + public ArrowHead getStartArrowHead() + { + return ArrowHead.NONE; + } + + @Override + public ArrowHead getEndArrowHead() + { + return ArrowHead.V; + } + + @Override + public LineStyle getLineStyle() + { + return LineStyle.SOLID; + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AssociationEdgeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AssociationEdgeBeanInfo.java new file mode 100644 index 0000000..2493a87 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/AssociationEdgeBeanInfo.java @@ -0,0 +1,38 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassRelationshipEdge type. + */ +public class AssociationEdgeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor[] descriptors = new PropertyDescriptor[] + { + new PropertyDescriptor("startLabel", AssociationEdge.class), + new PropertyDescriptor("middleLabel", AssociationEdge.class), + new PropertyDescriptor("endLabel", AssociationEdge.class), + new PropertyDescriptor("bentStyle", AssociationEdge.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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/ClassRelationshipEdge.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/ClassRelationshipEdge.java new file mode 100644 index 0000000..6aa090d --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/ClassRelationshipEdge.java @@ -0,0 +1,22 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import java.awt.geom.Point2D; +import java.util.ArrayList; + +import com.horstmann.violet.product.diagram.abstracts.edge.SegmentedLineEdge; + +/** + * An edge that is shaped like a line with up to three segments with an arrowhead + * @deprecated kept for compatibility + */ +public class ClassRelationshipEdge extends SegmentedLineEdge +{ + + @Override + public ArrayList getPoints() { + // TODO Auto-generated method stub, tms + return null; + } + + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/ClassRelationshipEdgeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/ClassRelationshipEdgeBeanInfo.java new file mode 100644 index 0000000..99eaf3e --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/ClassRelationshipEdgeBeanInfo.java @@ -0,0 +1,42 @@ +package com.horstmann.violet.product.diagram.classes.edges; + + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassRelationshipEdge type. + */ +public class ClassRelationshipEdgeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor[] descriptors = new PropertyDescriptor[] + { + new PropertyDescriptor("startArrowHead", ClassRelationshipEdge.class), + new PropertyDescriptor("startLabel", ClassRelationshipEdge.class), + new PropertyDescriptor("middleLabel", ClassRelationshipEdge.class), + new PropertyDescriptor("endLabel", ClassRelationshipEdge.class), + new PropertyDescriptor("endArrowHead", ClassRelationshipEdge.class), + new PropertyDescriptor("bentStyle", ClassRelationshipEdge.class), + new PropertyDescriptor("lineStyle", ClassRelationshipEdge.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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/CompositionEdge.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/CompositionEdge.java new file mode 100644 index 0000000..e7bef66 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/CompositionEdge.java @@ -0,0 +1,27 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import com.horstmann.violet.product.diagram.abstracts.property.ArrowHead; +import com.horstmann.violet.product.diagram.abstracts.property.LineStyle; + +public class CompositionEdge extends ClassRelationshipEdge +{ + + @Override + public ArrowHead getStartArrowHead() + { + return ArrowHead.NONE; + } + + @Override + public ArrowHead getEndArrowHead() + { + return ArrowHead.BLACK_DIAMOND; + } + + @Override + public LineStyle getLineStyle() + { + return LineStyle.SOLID; + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/CompositionEdgeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/CompositionEdgeBeanInfo.java new file mode 100644 index 0000000..e932010 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/CompositionEdgeBeanInfo.java @@ -0,0 +1,38 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassRelationshipEdge type. + */ +public class CompositionEdgeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor[] descriptors = new PropertyDescriptor[] + { + new PropertyDescriptor("startLabel", CompositionEdge.class), + new PropertyDescriptor("middleLabel", CompositionEdge.class), + new PropertyDescriptor("endLabel", CompositionEdge.class), + new PropertyDescriptor("bentStyle", CompositionEdge.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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/DependencyEdge.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/DependencyEdge.java new file mode 100644 index 0000000..cbdfc95 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/DependencyEdge.java @@ -0,0 +1,27 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import com.horstmann.violet.product.diagram.abstracts.property.ArrowHead; +import com.horstmann.violet.product.diagram.abstracts.property.LineStyle; + +public class DependencyEdge extends ClassRelationshipEdge +{ + + @Override + public ArrowHead getStartArrowHead() + { + return ArrowHead.NONE; + } + + @Override + public ArrowHead getEndArrowHead() + { + return ArrowHead.V; + } + + @Override + public LineStyle getLineStyle() + { + return LineStyle.DOTTED; + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/DependencyEdgeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/DependencyEdgeBeanInfo.java new file mode 100644 index 0000000..07c2ff2 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/DependencyEdgeBeanInfo.java @@ -0,0 +1,38 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassRelationshipEdge type. + */ +public class DependencyEdgeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor[] descriptors = new PropertyDescriptor[] + { + new PropertyDescriptor("startLabel", DependencyEdge.class), + new PropertyDescriptor("middleLabel", DependencyEdge.class), + new PropertyDescriptor("endLabel", DependencyEdge.class), + new PropertyDescriptor("bentStyle", DependencyEdge.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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InheritanceEdge.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InheritanceEdge.java new file mode 100644 index 0000000..242e8cb --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InheritanceEdge.java @@ -0,0 +1,27 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import com.horstmann.violet.product.diagram.abstracts.property.ArrowHead; +import com.horstmann.violet.product.diagram.abstracts.property.LineStyle; + +public class InheritanceEdge extends ClassRelationshipEdge +{ + + @Override + public ArrowHead getStartArrowHead() + { + return ArrowHead.NONE; + } + + @Override + public ArrowHead getEndArrowHead() + { + return ArrowHead.TRIANGLE; + } + + @Override + public LineStyle getLineStyle() + { + return LineStyle.SOLID; + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InheritanceEdgeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InheritanceEdgeBeanInfo.java new file mode 100644 index 0000000..db9c644 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InheritanceEdgeBeanInfo.java @@ -0,0 +1,38 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassRelationshipEdge type. + */ +public class InheritanceEdgeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor[] descriptors = new PropertyDescriptor[] + { + new PropertyDescriptor("startLabel", InheritanceEdge.class), + new PropertyDescriptor("middleLabel", InheritanceEdge.class), + new PropertyDescriptor("endLabel", InheritanceEdge.class), + new PropertyDescriptor("bentStyle", InheritanceEdge.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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InterfaceInheritanceEdge.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InterfaceInheritanceEdge.java new file mode 100644 index 0000000..ebd0777 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InterfaceInheritanceEdge.java @@ -0,0 +1,27 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import com.horstmann.violet.product.diagram.abstracts.property.ArrowHead; +import com.horstmann.violet.product.diagram.abstracts.property.LineStyle; + +public class InterfaceInheritanceEdge extends ClassRelationshipEdge +{ + + @Override + public ArrowHead getStartArrowHead() + { + return ArrowHead.NONE; + } + + @Override + public ArrowHead getEndArrowHead() + { + return ArrowHead.TRIANGLE; + } + + @Override + public LineStyle getLineStyle() + { + return LineStyle.DOTTED; + } + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InterfaceInheritanceEdgeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InterfaceInheritanceEdgeBeanInfo.java new file mode 100644 index 0000000..5ca92bf --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/edges/InterfaceInheritanceEdgeBeanInfo.java @@ -0,0 +1,38 @@ +package com.horstmann.violet.product.diagram.classes.edges; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassRelationshipEdge type. + */ +public class InterfaceInheritanceEdgeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor[] descriptors = new PropertyDescriptor[] + { + new PropertyDescriptor("startLabel", InterfaceInheritanceEdge.class), + new PropertyDescriptor("middleLabel", InterfaceInheritanceEdge.class), + new PropertyDescriptor("endLabel", InterfaceInheritanceEdge.class), + new PropertyDescriptor("bentStyle", InterfaceInheritanceEdge.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/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/ClassNode.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/ClassNode.java new file mode 100644 index 0000000..773bd85 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/ClassNode.java @@ -0,0 +1,223 @@ +package com.horstmann.violet.product.diagram.classes.nodes; + +import java.awt.Graphics2D; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; + +import com.horstmann.violet.product.diagram.abstracts.node.INode; +import com.horstmann.violet.product.diagram.abstracts.node.RectangularNode; +import com.horstmann.violet.product.diagram.abstracts.property.MultiLineString; +import com.horstmann.violet.product.diagram.common.PointNode; + +/** + * A class node in a class diagram. + */ +public class ClassNode extends RectangularNode +{ + /** + * Construct a class node with a default size + */ + public ClassNode() + { + name = new MultiLineString(); + name.setSize(MultiLineString.LARGE); + attributes = new MultiLineString(); + attributes.setJustification(MultiLineString.LEFT); + methods = new MultiLineString(); + methods.setJustification(MultiLineString.LEFT); + } + + private Rectangle2D getTopRectangleBounds() { + Rectangle2D globalBounds = new Rectangle2D.Double(0, 0, 0, 0); + Rectangle2D nameBounds = name.getBounds(); + globalBounds.add(nameBounds); + boolean isMethodsEmpty = (methods.getText().length() == 0); + boolean isAttributesEmpty = (attributes.getText().length() == 0); + double defaultHeight = DEFAULT_HEIGHT; + if (!isMethodsEmpty || !isAttributesEmpty) { + defaultHeight = DEFAULT_COMPARTMENT_HEIGHT; + } + globalBounds.add(new Rectangle2D.Double(0, 0, DEFAULT_WIDTH, defaultHeight)); + Point2D currentLocation = getLocation(); + double x = currentLocation.getX(); + double y = currentLocation.getY(); + double w = globalBounds.getWidth(); + double h = globalBounds.getHeight(); + globalBounds.setFrame(x, y, w, h); + Rectangle2D snappedBounds = getGraph().getGrid().snap(globalBounds); + return snappedBounds; + } + + private Rectangle2D getMiddleRectangleBounds() { + Rectangle2D globalBounds = new Rectangle2D.Double(0, 0, 0, 0); + Rectangle2D attributesBounds = attributes.getBounds(); + globalBounds.add(attributesBounds); + boolean isMethodsEmpty = (methods.getText().length() == 0); + boolean isAttributesEmpty = (attributes.getText().length() == 0); + if (!isMethodsEmpty || !isAttributesEmpty) { + globalBounds.add(new Rectangle2D.Double(0, 0, DEFAULT_WIDTH, DEFAULT_COMPARTMENT_HEIGHT)); + } + Rectangle2D topBounds = getTopRectangleBounds(); + double x = topBounds.getX(); + double y = topBounds.getMaxY(); + double w = globalBounds.getWidth(); + double h = globalBounds.getHeight(); + globalBounds.setFrame(x, y, w, h); + Rectangle2D snappedBounds = getGraph().getGrid().snap(globalBounds); + return snappedBounds; + } + + private Rectangle2D getBottomRectangleBounds() { + Rectangle2D globalBounds = new Rectangle2D.Double(0, 0, 0, 0); + Rectangle2D methodsBounds = methods.getBounds(); + globalBounds.add(methodsBounds); + boolean isMethodsEmpty = (methods.getText().length() == 0); + boolean isAttributesEmpty = (attributes.getText().length() == 0); + if (!isMethodsEmpty || !isAttributesEmpty) { + globalBounds.add(new Rectangle2D.Double(0, 0, DEFAULT_WIDTH, DEFAULT_COMPARTMENT_HEIGHT)); + } + Rectangle2D middleBounds = getMiddleRectangleBounds(); + double x = middleBounds.getX(); + double y = middleBounds.getMaxY(); + double w = globalBounds.getWidth(); + double h = globalBounds.getHeight(); + globalBounds.setFrame(x, y, w, h); + Rectangle2D snappedBounds = getGraph().getGrid().snap(globalBounds); + return snappedBounds; + } + + @Override + public Rectangle2D getBounds() + { + Rectangle2D top = getTopRectangleBounds(); + Rectangle2D mid = getMiddleRectangleBounds(); + Rectangle2D bot = getBottomRectangleBounds(); + top.add(mid); + top.add(bot); + Rectangle2D snappedBounds = getGraph().getGrid().snap(top); + return snappedBounds; + } + + @Override + public void draw(Graphics2D g2) + { + // Translate g2 if node has parent + Point2D nodeLocationOnGraph = getLocationOnGraph(); + Point2D nodeLocation = getLocation(); + Point2D g2Location = new Point2D.Double(nodeLocationOnGraph.getX() - nodeLocation.getX(), nodeLocationOnGraph.getY() - nodeLocation.getY()); + g2.translate(g2Location.getX(), g2Location.getY()); + // Perform drawing + super.draw(g2); + Rectangle2D currentBounds = getBounds(); + Rectangle2D topBounds = getTopRectangleBounds(); + Rectangle2D midBounds = getMiddleRectangleBounds(); + Rectangle2D bottomBounds = getBottomRectangleBounds(); + g2.draw(currentBounds); + name.draw(g2, topBounds); + g2.drawLine((int) topBounds.getX(),(int) topBounds.getMaxY(),(int) currentBounds.getMaxX(),(int) topBounds.getMaxY()); + attributes.draw(g2, midBounds); + g2.drawLine((int) bottomBounds.getX(),(int) bottomBounds.getY(),(int) currentBounds.getMaxX(),(int) bottomBounds.getY()); + methods.draw(g2, bottomBounds); + // Restore g2 original location + g2.translate(-g2Location.getX(), -g2Location.getY()); + } + + /* + * (non-Javadoc) + * + * @see com.horstmann.violet.framework.Node#addNode(com.horstmann.violet.framework.Node, java.awt.geom.Point2D) + */ + public boolean addChild(INode n, Point2D p) + { + // TODO : where is it added? + if (n instanceof PointNode) + { + return true; + } + return false; + } + + /** + * Sets the name property value. + * + * @param newValue the class name + */ + public void setName(MultiLineString newValue) + { + name = newValue; + } + + /** + * Gets the name property value. + * + * @return the class name + */ + public MultiLineString getName() + { + return name; + } + + /** + * Sets the attributes property value. + * + * @param newValue the attributes of this class + */ + public void setAttributes(MultiLineString newValue) + { + attributes = newValue; + } + + /** + * Gets the attributes property value. + * + * @return the attributes of this class + */ + public MultiLineString getAttributes() + { + return attributes; + } + + /** + * Sets the methods property value. + * + * @param newValue the methods of this class + */ + public void setMethods(MultiLineString newValue) + { + methods = newValue; + } + + /** + * Gets the methods property value. + * + * @return the methods of this class + */ + public MultiLineString getMethods() + { + return methods; + } + + /* + * (non-Javadoc) + * + * @see com.horstmann.violet.product.diagram.abstracts.RectangularNode#clone() + */ + public ClassNode clone() + { + ClassNode cloned = (ClassNode) super.clone(); + cloned.name = (MultiLineString) name.clone(); + cloned.methods = (MultiLineString) methods.clone(); + cloned.attributes = (MultiLineString) attributes.clone(); + return cloned; + } + + + private MultiLineString name; + private MultiLineString attributes; + private MultiLineString methods; + + private static int DEFAULT_COMPARTMENT_HEIGHT = 20; + private static int DEFAULT_WIDTH = 100; + private static int DEFAULT_HEIGHT = 60; + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/ClassNodeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/ClassNodeBeanInfo.java new file mode 100644 index 0000000..2da50e7 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/ClassNodeBeanInfo.java @@ -0,0 +1,40 @@ +package com.horstmann.violet.product.diagram.classes.nodes; + + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the ClassNode type. + */ +public class ClassNodeBeanInfo extends SimpleBeanInfo +{ + /* + * (non-Javadoc) + * + * @see java.beans.BeanInfo#getPropertyDescriptors() + */ + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor nameDescriptor = new PropertyDescriptor("name", ClassNode.class); + nameDescriptor.setValue("priority", new Integer(1)); + PropertyDescriptor attributesDescriptor = new PropertyDescriptor("attributes", ClassNode.class); + attributesDescriptor.setValue("priority", new Integer(2)); + PropertyDescriptor methodsDescriptor = new PropertyDescriptor("methods", ClassNode.class); + methodsDescriptor.setValue("priority", new Integer(3)); + return new PropertyDescriptor[] + { + nameDescriptor, + attributesDescriptor, + methodsDescriptor + }; + } + catch (IntrospectionException exception) + { + return null; + } + } +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/InterfaceNode.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/InterfaceNode.java new file mode 100644 index 0000000..7cc756a --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/InterfaceNode.java @@ -0,0 +1,167 @@ +package com.horstmann.violet.product.diagram.classes.nodes; + + +import java.awt.Graphics2D; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; + +import com.horstmann.violet.product.diagram.abstracts.node.INode; +import com.horstmann.violet.product.diagram.abstracts.node.RectangularNode; +import com.horstmann.violet.product.diagram.abstracts.property.MultiLineString; +import com.horstmann.violet.product.diagram.common.PointNode; + +/** + * An interface node in a class diagram. + */ +public class InterfaceNode extends RectangularNode +{ + /** + * Construct an interface node with a default size and the text <>. + */ + public InterfaceNode() + { + name = new MultiLineString(); + name.setSize(MultiLineString.LARGE); + name.setText("\u00ABinterface\u00BB"); + methods = new MultiLineString(); + methods.setJustification(MultiLineString.LEFT); + } + + private Rectangle2D getTopRectangleBounds() { + Rectangle2D globalBounds = new Rectangle2D.Double(0, 0, 0, 0); + Rectangle2D nameBounds = name.getBounds(); + globalBounds.add(nameBounds); + boolean isMethodsEmpty = (methods.getText().length() == 0); + double defaultHeight = DEFAULT_HEIGHT; + if (!isMethodsEmpty) { + defaultHeight = DEFAULT_COMPARTMENT_HEIGHT; + } + globalBounds.add(new Rectangle2D.Double(0, 0, DEFAULT_WIDTH, defaultHeight)); + Point2D currentLocation = getLocation(); + double x = currentLocation.getX(); + double y = currentLocation.getY(); + double w = globalBounds.getWidth(); + double h = globalBounds.getHeight(); + globalBounds.setFrame(x, y, w, h); + Rectangle2D snappedBounds = getGraph().getGrid().snap(globalBounds); + return snappedBounds; + } + + + private Rectangle2D getBottomRectangleBounds() { + Rectangle2D globalBounds = new Rectangle2D.Double(0, 0, 0, 0); + Rectangle2D methodsBounds = methods.getBounds(); + globalBounds.add(methodsBounds); + if (methodsBounds.getHeight() > 0) { + globalBounds.add(new Rectangle2D.Double(0, 0, DEFAULT_WIDTH, DEFAULT_COMPARTMENT_HEIGHT)); + } + Rectangle2D topBounds = getTopRectangleBounds(); + double x = topBounds.getX(); + double y = topBounds.getMaxY(); + double w = globalBounds.getWidth(); + double h = globalBounds.getHeight(); + globalBounds.setFrame(x, y, w, h); + Rectangle2D snappedBounds = getGraph().getGrid().snap(globalBounds); + return snappedBounds; + } + + @Override + public Rectangle2D getBounds() + { + Rectangle2D top = getTopRectangleBounds(); + Rectangle2D bot = getBottomRectangleBounds(); + top.add(bot); + Rectangle2D snappedBounds = getGraph().getGrid().snap(top); + return snappedBounds; + } + + @Override + public void draw(Graphics2D g2) + { + // Translate g2 if node has parent + Point2D nodeLocationOnGraph = getLocationOnGraph(); + Point2D nodeLocation = getLocation(); + Point2D g2Location = new Point2D.Double(nodeLocationOnGraph.getX() - nodeLocation.getX(), nodeLocationOnGraph.getY() - nodeLocation.getY()); + g2.translate(g2Location.getX(), g2Location.getY()); + // Perform drawing + super.draw(g2); + Rectangle2D currentBounds = getBounds(); + Rectangle2D topBounds = getTopRectangleBounds(); + Rectangle2D bottomBounds = getBottomRectangleBounds(); + g2.draw(currentBounds); + name.draw(g2, topBounds); + g2.drawLine((int) topBounds.getX(),(int) topBounds.getMaxY(),(int) currentBounds.getMaxX(),(int) topBounds.getMaxY()); + methods.draw(g2, bottomBounds); + // Restore g2 original location + g2.translate(-g2Location.getX(), -g2Location.getY()); + } + + + @Override + public boolean addChild(INode n, Point2D p) + { + if (n instanceof PointNode) + { + return true; + } + return false; + } + + /** + * Sets the name property value. + * + * @param newValue the interface name + */ + public void setName(MultiLineString newValue) + { + name = newValue; + } + + /** + * Gets the name property value. + * + * @return the interface name + */ + public MultiLineString getName() + { + return name; + } + + /** + * Sets the methods property value. + * + * @param newValue the methods of this interface + */ + public void setMethods(MultiLineString newValue) + { + methods = newValue; + } + + /** + * Gets the methods property value. + * + * @return the methods of this interface + */ + public MultiLineString getMethods() + { + return methods; + } + + @Override + public InterfaceNode clone() + { + InterfaceNode cloned = (InterfaceNode)super.clone(); + cloned.name = name.clone(); + cloned.methods = methods.clone(); + return cloned; + } + + //private transient double midHeight; + //private transient double botHeight; + private MultiLineString name; + private MultiLineString methods; + + private static int DEFAULT_COMPARTMENT_HEIGHT = 20; + private static int DEFAULT_WIDTH = 100; + private static int DEFAULT_HEIGHT = 60; +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/InterfaceNodeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/InterfaceNodeBeanInfo.java new file mode 100644 index 0000000..bb6bad1 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/InterfaceNodeBeanInfo.java @@ -0,0 +1,33 @@ +package com.horstmann.violet.product.diagram.classes.nodes; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the InterfaceNode type. + */ +public class InterfaceNodeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor nameDescriptor = new PropertyDescriptor("name", InterfaceNode.class); + nameDescriptor.setValue("priority", new Integer(1)); + PropertyDescriptor methodsDescriptor = new PropertyDescriptor("methods", InterfaceNode.class); + methodsDescriptor.setValue("priority", new Integer(2)); + return new PropertyDescriptor[] + { + nameDescriptor, + methodsDescriptor + }; + } + catch (IntrospectionException exception) + { + return null; + } + } +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/PackageNode.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/PackageNode.java new file mode 100644 index 0000000..cc68053 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/PackageNode.java @@ -0,0 +1,238 @@ +package com.horstmann.violet.product.diagram.classes.nodes; + +import java.awt.Graphics2D; +import java.awt.Shape; +import java.awt.geom.GeneralPath; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; + +import com.horstmann.violet.product.diagram.abstracts.Direction; +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.node.IResizableNode; +import com.horstmann.violet.product.diagram.abstracts.node.RectangularNode; +import com.horstmann.violet.product.diagram.abstracts.property.MultiLineString; + +/** + * A package node in a UML diagram. + */ +public class PackageNode extends RectangularNode implements IResizableNode +{ + /** + * Construct a package node with a default size + */ + public PackageNode() + { + name = new MultiLineString(); + name.setSize(MultiLineString.LARGE); + content = new MultiLineString(); + } + + @Override + public Point2D getConnectionPoint(IEdge e) + { + Point2D connectionPoint = super.getConnectionPoint(e); + + // Fix location to stick to shape (because of the top rectangle) + Direction d = e.getDirection(this); + Direction nearestCardinalDirection = d.getNearestCardinalDirection(); + if (Direction.SOUTH.equals(nearestCardinalDirection)) + { + Rectangle2D topRectangleBounds = getTopRectangleBounds(); + if (!topRectangleBounds.contains(connectionPoint)) { + double x = connectionPoint.getX(); + double y = connectionPoint.getY(); + double h = topRectangleBounds.getHeight(); + connectionPoint = new Point2D.Double(x, y + h); + } + } + + return connectionPoint; + } + + @Override + public void setWantedSize(Rectangle2D size) + { + this.wantedSize = size; + } + + private Rectangle2D getTopRectangleBounds() + { + Rectangle2D globalBounds = new Rectangle2D.Double(0, 0, 0, 0); + Rectangle2D nameBounds = name.getBounds(); + globalBounds.add(nameBounds); + globalBounds.add(new Rectangle2D.Double(0, 0, DEFAULT_TOP_WIDTH, DEFAULT_TOP_HEIGHT)); + Point2D currentLocation = getLocation(); + double x = currentLocation.getX(); + double y = currentLocation.getY(); + double w = globalBounds.getWidth(); + double h = globalBounds.getHeight(); + globalBounds.setFrame(x, y, w, h); + Rectangle2D snappedBounds = getGraph().getGrid().snap(globalBounds); + return snappedBounds; + } + + private Rectangle2D getBottomRectangleBounds() + { + Rectangle2D globalBounds = new Rectangle2D.Double(0, 0, 0, 0); + Rectangle2D contentsBounds = content.getBounds(); + globalBounds.add(contentsBounds); + globalBounds.add(new Rectangle2D.Double(0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT)); + Rectangle2D childrenBounds = new Rectangle2D.Double(0, 0, 0, 0); + for (INode child : getChildren()) + { + Rectangle2D childBounds = child.getBounds(); + childrenBounds.add(childBounds); + } + childrenBounds.setFrame(childrenBounds.getX(), childrenBounds.getY(), childrenBounds.getWidth() + CHILD_GAP, + childrenBounds.getHeight() + CHILD_GAP); + globalBounds.add(childrenBounds); + Rectangle2D topBounds = getTopRectangleBounds(); + double x = topBounds.getX(); + double y = topBounds.getMaxY(); + double w = Math.max(globalBounds.getWidth(), topBounds.getWidth() + 2 * NAME_GAP); + double h = globalBounds.getHeight() - topBounds.getHeight(); + globalBounds.setFrame(x, y, w, h); + Rectangle2D snappedBounds = getGraph().getGrid().snap(globalBounds); + return snappedBounds; + } + + @Override + public Rectangle2D getBounds() + { + Rectangle2D top = getTopRectangleBounds(); + Rectangle2D bot = getBottomRectangleBounds(); + top.add(bot); + Rectangle2D snappedBounds = getGraph().getGrid().snap(top); + return snappedBounds; + } + + @Override + public void draw(Graphics2D g2) + { + // Translate g2 if node has parent + Point2D nodeLocationOnGraph = getLocationOnGraph(); + Point2D nodeLocation = getLocation(); + Point2D g2Location = new Point2D.Double(nodeLocationOnGraph.getX() - nodeLocation.getX(), nodeLocationOnGraph.getY() + - nodeLocation.getY()); + g2.translate(g2Location.getX(), g2Location.getY()); + // Perform drawing + super.draw(g2); + Rectangle2D topBounds = getTopRectangleBounds(); + Rectangle2D bottomBounds = getBottomRectangleBounds(); + g2.draw(topBounds); + g2.draw(bottomBounds); + name.draw(g2, topBounds); + content.draw(g2, bottomBounds); + // Restore g2 original location + g2.translate(-g2Location.getX(), -g2Location.getY()); + // Draw its children + for (INode node : getChildren()) + { + fixChildLocation(topBounds, node); + node.draw(g2); + } + } + + /** + * Ensure that child node respects the minimum gap with package borders + * + * @param topBounds + * @param node + */ + private void fixChildLocation(Rectangle2D topBounds, INode node) + { + Point2D childLocation = node.getLocation(); + if (childLocation.getY() <= topBounds.getHeight() + CHILD_GAP) + { + node.translate(0, topBounds.getHeight() + CHILD_GAP - childLocation.getY()); + } + if (childLocation.getX() < CHILD_GAP) + { + node.translate(CHILD_GAP - childLocation.getX(), 0); + } + } + + @Override + public Shape getShape() + { + GeneralPath path = new GeneralPath(); + path.append(getTopRectangleBounds(), false); + path.append(getBottomRectangleBounds(), false); + return path; + } + + @Override + public boolean addChild(INode n, Point2D p) + { + if (n instanceof ClassNode || n instanceof InterfaceNode || n instanceof PackageNode) + { + n.setParent(this); + n.setGraph(this.getGraph()); + n.setLocation(p); + addChild(n, getChildren().size()); + return true; + } + return false; + } + + public PackageNode clone() + { + PackageNode cloned = (PackageNode) super.clone(); + cloned.name = name.clone(); + cloned.content = content.clone(); + return cloned; + } + + /** + * Sets the name property value. + * + * @param newValue the class name + */ + public void setName(MultiLineString newValue) + { + name = newValue; + } + + /** + * Gets the name property value. + * + * @return the class name + */ + public MultiLineString getName() + { + return name; + } + + /** + * Sets the contents property value. + * + * @param newValue the contents of this class + */ + public void setContent(MultiLineString newValue) + { + content = newValue; + } + + /** + * Gets the contents property value. + * + * @return the contents of this class + */ + public MultiLineString getContent() + { + return content; + } + + private MultiLineString name; + private MultiLineString content; + private Rectangle2D wantedSize; + + private static int DEFAULT_TOP_WIDTH = 60; + private static int DEFAULT_TOP_HEIGHT = 20; + private static int DEFAULT_WIDTH = 100; + private static int DEFAULT_HEIGHT = 80; + private static final int NAME_GAP = 3; + private static final int CHILD_GAP = 20; + +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/PackageNodeBeanInfo.java b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/PackageNodeBeanInfo.java new file mode 100644 index 0000000..70799f7 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/java/com/horstmann/violet/product/diagram/classes/nodes/PackageNodeBeanInfo.java @@ -0,0 +1,34 @@ +package com.horstmann.violet.product.diagram.classes.nodes; + + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; + +/** + * The bean info for the PackageNode type. + */ +public class PackageNodeBeanInfo extends SimpleBeanInfo +{ + + @Override + public PropertyDescriptor[] getPropertyDescriptors() + { + try + { + PropertyDescriptor nameDescriptor = new PropertyDescriptor("name", PackageNode.class); + nameDescriptor.setValue("priority", new Integer(1)); + PropertyDescriptor contentDescriptor = new PropertyDescriptor("content", PackageNode.class); + contentDescriptor.setValue("priority", new Integer(2)); + return new PropertyDescriptor[] + { + nameDescriptor, + contentDescriptor + }; + } + catch (IntrospectionException exception) + { + return null; + } + } +} diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/resources/properties/ClassDiagramGraphStrings.properties b/New folder/VioletPlugin.ClassDiagram/src/main/resources/properties/ClassDiagramGraphStrings.properties new file mode 100644 index 0000000..083d8fa --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/resources/properties/ClassDiagramGraphStrings.properties @@ -0,0 +1,16 @@ +node0.tooltip=Class +node1.tooltip=Interface +node2.tooltip=Package +node3.tooltip=Note +node4.tooltip=Linked diagram +edge0.tooltip=Depends on +edge1.tooltip=Inherits from +edge2.tooltip=Implements interface +edge3.tooltip=Is associated with +edge4.tooltip=Is an aggregate of +edge5.tooltip=Is composed of +edge6.tooltip=Note connector +menu.class_diagram.text=Class diagram +files.class.name=Class Diagram Files +files.class.extension=.class.violet + diff --git a/New folder/VioletPlugin.ClassDiagram/src/main/resources/properties/ClassDiagramGraphStrings_fr.properties b/New folder/VioletPlugin.ClassDiagram/src/main/resources/properties/ClassDiagramGraphStrings_fr.properties new file mode 100644 index 0000000..5a76052 --- /dev/null +++ b/New folder/VioletPlugin.ClassDiagram/src/main/resources/properties/ClassDiagramGraphStrings_fr.properties @@ -0,0 +1,15 @@ +node0.tooltip=Classe +node1.tooltip=Interface +node2.tooltip=Package +node3.tooltip=Note +node4.tooltip=Diagramme li\u00E9 +edge0.tooltip=D\u00E9pend de +edge1.tooltip=H\u00E9rite de +edge2.tooltip=Impl\u00E9mente l'interface +edge3.tooltip=Est associ\u00E9 \u00E0 +edge4.tooltip=Est un agr\u00E9gat de +edge5.tooltip=Est compos\u00E9 de +edge6.tooltip=Connexion \u00E0 la note +menu.class_diagram.text=Diagramme de classe +files.class.name=Diagramme de classe +files.class.extension=.class.violet \ No newline at end of file diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/delete.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/delete.png new file mode 100644 index 0000000..dfb80b2 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/delete.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/export.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/export.png new file mode 100644 index 0000000..91e3b24 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/export.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/exporttoclipboard.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/exporttoclipboard.png new file mode 100644 index 0000000..e8b6c8c Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/exporttoclipboard.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/help.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/help.png new file mode 100644 index 0000000..28a0f9e Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/help.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/new.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/new.png new file mode 100644 index 0000000..f38d02e Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/new.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/open.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/open.png new file mode 100644 index 0000000..5b9d2c8 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/open.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/paste.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/paste.png new file mode 100644 index 0000000..f6a1db8 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/paste.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/print.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/print.png new file mode 100644 index 0000000..fdf67a1 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/print.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/properties.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/properties.png new file mode 100644 index 0000000..423187c Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/properties.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/redo.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/redo.png new file mode 100644 index 0000000..f1e45cf Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/redo.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/save.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/save.png new file mode 100644 index 0000000..fd0048d Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/save.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/saveas.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/saveas.png new file mode 100644 index 0000000..71602bc Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/saveas.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/sharedocument.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/sharedocument.png new file mode 100644 index 0000000..dc60725 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/sharedocument.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/sidebar.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/sidebar.png new file mode 100644 index 0000000..bdc03f7 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/sidebar.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/undo.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/undo.png new file mode 100644 index 0000000..6129fa0 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/undo.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/violet.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/violet.png new file mode 100644 index 0000000..119930a Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/violet.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/zoomin.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/zoomin.png new file mode 100644 index 0000000..f10b2ec Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/zoomin.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/16x16/zoomout.png b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/zoomout.png new file mode 100644 index 0000000..f276ad5 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/16x16/zoomout.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/copy.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/copy.png new file mode 100644 index 0000000..eac4d8c Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/copy.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/cut.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/cut.png new file mode 100644 index 0000000..192b575 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/cut.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/delete.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/delete.png new file mode 100644 index 0000000..da1e944 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/delete.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/exporttoclipboard.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/exporttoclipboard.png new file mode 100644 index 0000000..bc889a9 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/exporttoclipboard.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/help.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/help.png new file mode 100644 index 0000000..8aef08e Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/help.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/paste.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/paste.png new file mode 100644 index 0000000..b8454f9 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/paste.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/print.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/print.png new file mode 100644 index 0000000..0e02d8d Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/print.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/redo.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/redo.png new file mode 100644 index 0000000..7067f58 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/redo.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/sharedocument.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/sharedocument.png new file mode 100644 index 0000000..1929fe1 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/sharedocument.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/undo.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/undo.png new file mode 100644 index 0000000..a1021b6 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/undo.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/zoomin.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/zoomin.png new file mode 100644 index 0000000..22c31ac Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/zoomin.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/22x22/zoomout.png b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/zoomout.png new file mode 100644 index 0000000..911a5c0 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/22x22/zoomout.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/64x64/error.png b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/error.png new file mode 100644 index 0000000..e5a5143 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/error.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/64x64/exit.png b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/exit.png new file mode 100644 index 0000000..1c97def Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/exit.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/64x64/exporttoclipboard.png b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/exporttoclipboard.png new file mode 100644 index 0000000..bc420e6 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/exporttoclipboard.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/64x64/information.png b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/information.png new file mode 100644 index 0000000..e8b4285 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/information.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/64x64/save.png b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/save.png new file mode 100644 index 0000000..fac5eeb Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/save.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/64x64/warning.png b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/warning.png new file mode 100644 index 0000000..db52b85 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/64x64/warning.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/72x72/welcome_create.png b/VioletFramework/VioletFramework/src/main/resources/icons/72x72/welcome_create.png new file mode 100644 index 0000000..9580c5e Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/72x72/welcome_create.png differ diff --git a/VioletFramework/VioletFramework/src/main/resources/icons/72x72/welcome_open.png b/VioletFramework/VioletFramework/src/main/resources/icons/72x72/welcome_open.png new file mode 100644 index 0000000..29ac461 Binary files /dev/null and b/VioletFramework/VioletFramework/src/main/resources/icons/72x72/welcome_open.png differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/about-layer1.gif b/VioletFramework/VioletFramework/src/site/resources/icons/about-layer1.gif new file mode 100644 index 0000000..f09afb5 Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/about-layer1.gif differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/about-layer2.gif b/VioletFramework/VioletFramework/src/site/resources/icons/about-layer2.gif new file mode 100644 index 0000000..2880cce Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/about-layer2.gif differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/about-violet-banner.png b/VioletFramework/VioletFramework/src/site/resources/icons/about-violet-banner.png new file mode 100644 index 0000000..993f8be Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/about-violet-banner.png differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/about-violet.png b/VioletFramework/VioletFramework/src/site/resources/icons/about-violet.png new file mode 100644 index 0000000..18d449d Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/about-violet.png differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-banner-100x500.gif b/VioletFramework/VioletFramework/src/site/resources/icons/violet-banner-100x500.gif new file mode 100644 index 0000000..8a40913 Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-banner-100x500.gif differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-banner-100x500.pspimage b/VioletFramework/VioletFramework/src/site/resources/icons/violet-banner-100x500.pspimage new file mode 100644 index 0000000..1d4a4ff Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-banner-100x500.pspimage differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-downloadit.gif b/VioletFramework/VioletFramework/src/site/resources/icons/violet-downloadit.gif new file mode 100644 index 0000000..1857490 Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-downloadit.gif differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-jws-icon.jpg b/VioletFramework/VioletFramework/src/site/resources/icons/violet-jws-icon.jpg new file mode 100644 index 0000000..4399429 Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-jws-icon.jpg differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-original.jpg b/VioletFramework/VioletFramework/src/site/resources/icons/violet-original.jpg new file mode 100644 index 0000000..4399429 Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-original.jpg differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-runit.gif b/VioletFramework/VioletFramework/src/site/resources/icons/violet-runit.gif new file mode 100644 index 0000000..4a4c12b Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-runit.gif differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-runit.pspimage b/VioletFramework/VioletFramework/src/site/resources/icons/violet-runit.pspimage new file mode 100644 index 0000000..437c1ef Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-runit.pspimage differ diff --git a/VioletFramework/VioletFramework/src/site/resources/icons/violet-webstart-icon.gif b/VioletFramework/VioletFramework/src/site/resources/icons/violet-webstart-icon.gif new file mode 100644 index 0000000..bb4cba0 Binary files /dev/null and b/VioletFramework/VioletFramework/src/site/resources/icons/violet-webstart-icon.gif differ diff --git a/VioletPlugin/VioletPlugin.ActivityDiagram/src/main/resources/META-INF/services/com.horstmann.violet.framework.plugin.IDiagramPlugin b/VioletPlugin/VioletPlugin.ActivityDiagram/src/main/resources/META-INF/services/com.horstmann.violet.framework.plugin.IDiagramPlugin new file mode 100644 index 0000000..2922f11 --- /dev/null +++ b/VioletPlugin/VioletPlugin.ActivityDiagram/src/main/resources/META-INF/services/com.horstmann.violet.framework.plugin.IDiagramPlugin @@ -0,0 +1 @@ +com.horstmann.violet.product.diagram.activity.ActivityDiagramPlugin \ No newline at end of file diff --git a/dummy b/dummy new file mode 160000 index 0000000..d9f4838 --- /dev/null +++ b/dummy @@ -0,0 +1 @@ +Subproject commit d9f4838e048e92670efdec63cc3c8a5b146412fe