4 Replies Latest reply on Feb 12, 2008 11:39 AM by Koen Aers

    GPD process designer - gpd.xml coordinates relative to what?

    s b Newbie

      In the gpd.xml file, what are the coordinates relative to? For example, the first node in my graph:

       <node name="Start" x="161" y="-32" width="215" height="40">
       <transition name="Done">
       <label x="5" y="-10"/>
       </transition>
       </node>
      


      has a y coordinate of -32. Yet the node is completely visible in the designer. What part of the node is at a negative coordinate?


        • 1. Re: GPD process designer - gpd.xml coordinates relative to w
          Koen Aers Master

          Eclipse GEF is handling this. The coordinates are normally relative to the upper-left corner, but a GEF canvas may extend towards the left and towards above. This would result in negative coordinates.

          Regards,
          Koen

          • 2. Re: GPD process designer - gpd.xml coordinates relative to w
            s b Newbie

            Thanks for the reply, but I still don't get it. If my nodes have negative coordinates, it implies that the origin is somewhere in the viewable part of the canvas, for example, below my start node. I can't think of any sensible scheme for such coordinates.

            We are trying to use the gpd.xml file to draw our own graph so any help understanding the coordinates is appreciated.

            • 3. Re: GPD process designer - gpd.xml coordinates relative to w
              s b Newbie

              I would greatly appreciate some more help with this topic as we are using JGraph to re-draw our process definition graph for the user. I don't understand how to use the various x, y, h.., w.. values to position the transition labels and draw the bends in the arrows.

              For example, here is a typical node in gpd.xml file:

               <node name="Manager - Review Holds" x="290" y="301" width="256" height="40">
               <transition name="Officer - Adjust Holds">
               <label x="43" y="-4"/>
               <bendpoint w1="-162" h1="-29" w2="5" h2="66"/>
               <bendpoint w1="-188" h1="-59" w2="130" h2="42"/>
               </transition>
               <transition name="Manager - Adjust Hold">
               <label x="62" y="-18"/>
               <bendpoint w1="-312" h1="84" w2="-1" h2="62"/>
               </transition>
               <transition name="Done">
               <label x="5" y="-10"/>
               </transition>
               </node>
              


              Can the author of the GPD process designer help us understand how to interpret the attributes in the "label" and "bendpoint" elements so we can redraw these features in another coordinate system?


              • 4. Re: GPD process designer - gpd.xml coordinates relative to w
                Koen Aers Master

                Simon,

                I use those coordinates as a black box. They are generated automatically by the Eclipse GEF framework. I remember having seen some documentation about those, probably in the Eclipse GEF JavaDocs.

                I hope this helps a bit.

                Regards,
                Koen