svn commit: r16479 - branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml: persistence uml/diagram/ui
Dave Thompson <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: dthompson
Date: 2008-12-31 14:05:49-0800
New Revision: 16479
Modified:
branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/persistence/PGML.tee
branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/PathItemPlacement.java
Log:
Implemented saving of path item data using new PGML templates.
Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/persistence/PGML.tee
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/persistence/PGML.tee?view=diff&pathrev=16479&r1=16478&r2=16479
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/persistence/PGML.tee (original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/persistence/PGML.tee 2008-12-31 14:05:49-0800
@@ -137,6 +137,41 @@
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+<template class="org.tigris.gef.base.PathConv">
+
+<![CDATA[
+
+<argouml:pathitem name="<ocl>org.argouml.persistence.PgmlUtility.getId(self.pathFig)</ocl>"
+ description="<ocl>self.class.name</ocl>"
+ href="<ocl ignoreNull>org.argouml.uml.UUIDHelper.getUUID(self.pathFig)</ocl>"
+ pathFig="<ocl>self.pathFig.toString</ocl>" />
+
+]]>
+
+</template>
+
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+<template class="org.argouml.uml.diagram.ui.PathItemPlacement">
+
+<![CDATA[
+
+<argouml:pathitem figname="<ocl>org.argouml.persistence.PgmlUtility.getId(self.itemFig)</ocl>"
+ description="<ocl>self.class.name</ocl>"
+ figdescription="<ocl>self.itemFig.class.name</ocl>"
+ href="<ocl ignoreNull>org.argouml.uml.UUIDHelper.getUUID(self.itemFig)</ocl>"
+ percent="<ocl>self.percent</ocl>"
+ angle="<ocl>self.angle</ocl>"
+ offset="<ocl>self.pathOffset</ocl>" />
+
+]]>
+
+</template>
+
+
+<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
<template class="org.tigris.gef.presentation.FigRect">
<![CDATA[
@@ -525,7 +560,8 @@
sourceFigNode="<ocl>org.argouml.persistence.PgmlUtility.getId(self.sourceFigNode)</ocl>"
destFigNode="<ocl>org.argouml.persistence.PgmlUtility.getId(self.destFigNode)</ocl>"
-
+
+ <ocl>self.pathItemStrategies</ocl>
</private>
Modified: branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/PathItemPlacement.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/PathItemPlacement.java?view=diff&pathrev=16479&r1=16478&r2=16479
==============================================================================
--- branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/PathItemPlacement.java (original)
+++ branches/work_issue1048_dthompson/src/argouml-app/src/org/argouml/uml/diagram/ui/PathItemPlacement.java 2008-12-31 14:05:49-0800
@@ -177,6 +177,17 @@
setAnchor(pathPercent, pathDelta);
setAbsoluteOffset(absoluteOffset);
}
+
+ /**
+ * Returns the Fig that this PathItemPlacement places.
+ * To get the Fig of the Edge which owns this fig, use use getPathFig()
+ * @see org.tigris.gef.base.PathConv#getPathFig()
+ * @note Used by PGML.tee.
+ * @return The fig that this path item places.
+ */
+ public Fig getItemFig() {
+ return itemFig;
+ }
/**
* Compute a position. This strangely named method computes a
@@ -675,4 +686,37 @@
double y = m.getY1() + as * (m.getY2() - m.getY1());
return new Point((int) x, (int) y);
}
+
+ /**
+ * Returns the value of the percent field - the position of the anchor
+ * point as a percentage of the edge.
+ * @important Used by PGML.tee.
+ * @return The value of the percent field.
+ */
+ public int getPercent() {
+ return percent;
+ }
+
+ /**
+ * Returns the value of the angle field.
+ * The angle of the path item relative to the edge.
+ * @important Used by PGML.tee.
+ * @return The value of the angle field.
+ */
+ public double getAngle() {
+ return angle;
+ }
+
+ /**
+ * Returns the value of the pathOffset field.
+ * The pathOffset field is the distance away from the edge, along the
+ * path vector that the item Fig is placed.
+ * @important Used by PGML.tee.
+ * @return The value of the pathOffset field.
+ */
+ public int getPathOffset() {
+ return pathOffset;
+ }
+ /** End of methods used by PGML.tee */
+
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=997387
To unsubscribe from this discussion, e-mail: [[email protected]].