Login | Register
My pages Projects Community openCollabNet

gef
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author dthompson
Full name Dave Thompson
Date 2008-12-09 13:36:04 PST
Message Bob Tarling wrote:
> I just opened the patch attached to your email and it contains the
> same text as your email, so I can't comment on that directly.

Here it is again, inline this time..

Dave




Index: src/org/tigris/gef/p​resentation/FigEdge.​java
====================​====================​====================​=======
--- src/org/tigris/gef/p​resentation/FigEdge.​java (revision 1184)
+++ src/org/tigris/gef/p​resentation/FigEdge.​java (working copy)
@@ -366,6 +366,27 @@

          return figs;
      }
+
+ /**
+ * Gets the PathItemPlacementStrategy for the given fig.
+ * The given fig must be one of the pathItem figs, otherwise null will be
+ * returned.
+ * @param fig The fig to look for.
+ * @return The PathItemPlacementStrategy for fig.
+ */
+ public PathItemPlacementStrategy getPathItemPlacement​Strategy(Fig fig) {
+ for (PathItem pi : _pathItems) {
+ Fig f = getPathItemFig(pi);
+ if (fig.equals(f)) {
+ return pi.getPathItemPlacem​entStrategy();
+ }
+ }
+ // Something bad has happened if we get here, it means the fig that
+ // we were asked to look for was not on a PathItem.
+ //System.out.println("Could not find PathItemPlacementStrategy for fig '"
+ // + fig + "'.");
+ return null;
+ }

      /**
       * Return the vector of path items on this FigEdge.